Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh install stuck on "Before we start..." consent form, "Invalid Path" response #5824

Open
LivingWithHippos opened this issue Nov 28, 2024 · 0 comments

Comments

@LivingWithHippos
Copy link

Expected Behavior

After a fresh install, selecting yes or no to the consent form for the telemetry and the newsletter should bring me to the homepage

Current Behavior

The page gets reloaded with the consent form, choosing yes or no won't do anything. The newsletter form does not reappear, suggesting that gets accepted.

We utilize Countly to understand user interactions and collect feedback, helping us enhance our product continuously. However, your privacy remains our priority. This analysis is done on the server level, so we won't see or collect any individual details or any data you record. The data is reported back only to our dedicated Countly server based in Europe. Please note, you can change your mind at any time in the settings.

Possible Solution

Aside from the "correct" fix would it be possible to bypass this form?

Steps to Reproduce (for bugs)

  1. Fresh install of latest countly
  2. Create a new user
  3. Create a new app or demo app
  4. Answer the consent forms

More Description

Tried using the demo app or creating one from zero, and choosing yes or no to the consent form, without success

On the page https://my.domain/dashboard#/123_my_app_id/not-responded-consent these calls

https://my.domain/i/configs?configs={"api":{"domain":"https://my.domain"}}&app_id=123_my_app_id
https://my.domain/o/configs?app_id=123_my_app_id
https://my.domain/o/themes?app_id=123_my_app_id

all result in a 400 response with

{"result":"Invalid path"}

all other calls including to o?app_id=123_my_app_id /i/cms/save_entries and to cms.count.ly work

Reloading the containers allow me to log in (so the user and app do get saved) but directly go to the consent page

Removing volumes and containers and recreating everything reproduces the issue

Your Environment

Note: I had an older installation (countly 20) with these changes and it worked

  • Operating System and version:

Ubuntu 22

  • Any changes you have made to your instance:
  • removed the exposed ports from nginx and used caddy to pass everything to it and provide https
  • added container names to the compose file
  • edited the nginx file to use the new container names
docker compose
services:
  countly-api-2:
    image: "countly/api:latest"
    container_name: countly_api_2
    environment:
      - COUNTLY_PLUGINS=${COUNTLY_PLUGINS}
      # - COUNTLY_CONFIG__MONGODB_HOST=mongodb2
      - COUNTLY_CONFIG_API_API_WORKERS=4 # CPU core count
      - COUNTLY_CONFIG__FILESTORAGE="gridfs"
      - COUNTLY_CONFIG__MONGODB="mongodb://${MONGO_USER}:${MONGO_PASSWORD}@${MONGODB_HOST}/countly?maxPoolSize=500"
      - NODE_OPTIONS="--max-old-space-size=2048"
      - COUNTLY_CONFIG_HOSTNAME=${COUNTLY_HOSTNAME}
    deploy:
      restart_policy:
        condition: on-failure
        max_attempts: 3
    depends_on:
      - mongodb2
    networks:
      - backend

  countly-frontend-2:
    image: "countly/frontend:latest"
    container_name: countly_frontend_2
    environment:
      - COUNTLY_PLUGINS=${COUNTLY_PLUGINS}
      # - COUNTLY_CONFIG__MONGODB_HOST=mongodb2
      - NODE_OPTIONS="--max-old-space-size=2048"
      - COUNTLY_CONFIG__MONGODB="mongodb://${MONGO_USER}:${MONGO_PASSWORD}@${MONGODB_HOST}/countly?maxPoolSize=500"
      - COUNTLY_CONFIG_HOSTNAME=${COUNTLY_HOSTNAME}
    depends_on:
      - mongodb2
    deploy:
      # There is usually no need in multiple frontends, so throttling down resources for it
      mode: global
      resources:
        limits:
          cpus: "0.5"
      restart_policy:
        condition: on-failure
        max_attempts: 3
    networks:
      - backend

  nginx2:
    image: "bitnami/nginx"
    # ports:
    #  - "80:8080"'
    container_name: countly_proxy_2
    volumes:
      - "./nginx.server.conf:/opt/bitnami/nginx/conf/server_blocks/countly.conf:ro"
    networks:
      - backend
      - caddy
    depends_on:
      - countly-api-2
      - countly-frontend-2

  mongodb2:
    image: "bitnami/mongodb:8.0"
    container_name: countly_mongodb_2
    environment:
      - MONGODB_ROOT_PASSWORD=${MONGO_4_INITDB_ROOT_PASSWORD}
    volumes:
      - "mongodb_data_countly:/bitnami"
      - ./mongo_init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
    networks:
      - backend

volumes:
  mongodb_data_countly:

networks:
  backend:
    name: countly_backend
    driver: bridge
  caddy:
    external: true
nginx conf
server {
	listen   8080;
	listen   [::]:8080 ipv6only=on;
	server_name  localhost;

	access_log  off;

	location = /i {
        if ($http_content_type = "text/ping") {
             return 404;
        }
		proxy_pass http://countly_api_2:3001;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Real-IP $remote_addr;
	}

	location ^~ /i/ {
        if ($http_content_type = "text/ping") {
             return 404;
        }
		proxy_pass http://countly_api_2:3001;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Real-IP $remote_addr;
	}

	location = /o {
        if ($http_content_type = "text/ping") {
             return 404;
        }
		proxy_pass http://countly_api_2:3001;
	}

	location ^~ /o/ {
        if ($http_content_type = "text/ping") {
             return 404;
        }
		proxy_pass http://countly_api_2:3001;
	}

	location / {
        if ($http_content_type = "text/ping") {
             return 404;
        }
		proxy_pass http://countly_frontend_2:6001;
		proxy_set_header Host $http_host;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Real-IP $remote_addr;
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant