-
Notifications
You must be signed in to change notification settings - Fork 25
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
Unable to log in (Cross-Origin Request Blocked) #424
Comments
I was, yes.
Trying to log in in an Edge incognito session without any extensions installed has the same result.
Upon attempting to log in I see two requests: Both of these attempt to query The I have tested a bit more and after restarting the server completely it (somewhat) works now (although I am not sure how...). If I use the IP-address-based configuration I posted above, I can now successfully log in when accessing the frontend via Like I said, it's not ideal but definitely workable, especially if a future update may resolve this entirely anyway. |
Odd that is breaks when trying to use the hostname. When you changed the |
Yes, I ran |
Just dropping in to mention Ive been having similar issues. Same troubleshooting steps, checking across browsers without extension, different machines, etc. I tried wrapping the address in quotes, in case the extra colon was throwing things off, as well as trying from different PCs - Nothing worked, same CORS issue when trying to log in. This is on the latest version: 3.0.1 - but its been happening for months and I finally sat down to fix and update it |
Can you post your full docker-compose file, redacting any sensitive variables? |
Heres the full compose: version: "3.3"
services:
ganymede-api:
container_name: ganymede-api
image: ghcr.io/zibbp/ganymede:latest
restart: unless-stopped
depends_on:
- ganymede-db
environment:
- DEBUG=false # set to true for debug logs
- VIDEOS_DIR=/data/videos
- TEMP_DIR=/data/temp
- LOGS_DIR=/data/logs
- CONFIG_DIR=/data/config
- TZ=America/Denver # Set to your timezone
- DB_HOST=ganymede-db
- DB_PORT=5432
- DB_USER=ganymede
- DB_PASS=
- DB_NAME=ganymede-prd
- DB_SSL=disable
- JWT_SECRET=
- JWT_REFRESH_SECRET=
- TWITCH_CLIENT_ID=
- TWITCH_CLIENT_SECRET=
- FRONTEND_HOST='http://10.0.0.101:4801'
# OPTIONAL
# - OAUTH_PROVIDER_URL=
# - OAUTH_CLIENT_ID=
# - OAUTH_CLIENT_SECRET=
# - OAUTH_REDIRECT_URL=http://IP:PORT/api/v1/auth/oauth/callback # Points to the API service
# WORKER
- MAX_CHAT_DOWNLOAD_EXECUTIONS=5
- MAX_CHAT_RENDER_EXECUTIONS=3
- MAX_VIDEO_DOWNLOAD_EXECUTIONS=5
- MAX_VIDEO_CONVERT_EXECUTIONS=3
volumes:
- /mnt/user/Media/Twitch:/data/videos
- /mnt/user/appdata/compose-ganymede/logs:/data/logs
- /mnt/user/appdata/compose-ganymede/data:/data/config
# Uncomment below to persist temp files
- /mnt/user/tmp/GanymedeDownloads:/data/temp
ports:
- 4800:4000
ganymede-frontend:
container_name: ganymede-frontend
image: ghcr.io/zibbp/ganymede-frontend:latest
restart: unless-stopped
environment:
- API_URL=http://10.0.0.101:4800 # Points to the API service
- CDN_URL=http://10.0.0.101:4802 # Points to the CDN service
- SHOW_SSO_LOGIN_BUTTON=false # show/hide SSO login button on login page
- FORCE_SSO_AUTH=false # force SSO auth for all users (bypasses login page and redirects to SSO)
- REQUIRE_LOGIN=false # require login to view videos
ports:
- 4801:3000
ganymede-db:
container_name: ganymede-db
image: postgres:14
volumes:
- /mnt/user/appdata/compose-ganymede/ganymede-db:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=
- POSTGRES_USER=ganymede
- POSTGRES_DB=ganymede-prd
ports:
- 4803:5432
ganymede-nginx:
container_name: ganymede-nginx
image: nginx
volumes:
- /mnt/user/appdata/compose-ganymede/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- /mnt/user/Media/Twitch:/data/videos
ports:
- 4802:8080
ganymede-river-ui:
image: ghcr.io/riverqueue/riverui:0.3
environment:
- DATABASE_URL=postgres://ganymede:PGPWD@ganymede-db:5432/ganymede-prd # update with env settings from the ganymede-db container
ports:
- 8233:8080 |
I copied it to a test server and replaced the
Is the computer you're logging in with on the same subnet? EDIT: can you also upload a |
Yep. Thats the Lan address of my server. When running that command, I don't see Ganymede API in the output. This is the full output of the command:
And yep, all computers are on the same subnet. Github doesnt allow .har files as attachments, so I put the text (minus some cookies I took out) into a pastebin for you: https://pastebin.com/g0WcyQTD I did only test edge/firefox/safari, since I dont use Chrome at all. This is also persistent across all pages. I have the 'require login to see videos' env set to False, but going to the Playlists/Channels page result in a CORS error as well |
The output of the
You should see "Ganymede API" at the bottom, maybe on the same line as your next shell prompt zibbp@media:~$ docker exec -u root ganymede-frontend apk add curl && curl 10.0.10.50:4800 -vvv
OK: 16 MiB in 26 packages
* Trying 10.0.10.50:4800...
* Connected to 10.0.10.50 (10.0.10.50) port 4800
> GET / HTTP/1.1
> Host: 10.0.10.50:4800
> User-Agent: curl/8.5.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: text/plain; charset=UTF-8
< Vary: Origin
< Date: Sun, 01 Sep 2024 15:23:20 GMT
< Content-Length: 12
<
* Connection #0 to host 10.0.10.50 left intact
Ganymede APIzibbp@media:~$ If you try removing the single quotes from the I can't actually see the CORS error in the HAR you uploaded. Can you take a screenshot of the error in the console or network tab? |
Interestingly, I went to go test it, and it logged in fine this morning (minus a bunch of bad thumbnails and messed up display layout issues). Ive noticed this in the past when I was having the login issue months ago - It would do the CORS problem, then I would compose-down > compose-up it, and it would let me log in. Lately though, that trick hasnt been working, which is why I added on to the thread. Usually when its a Cors issue, there is no Video section on the main page, but today there was. When I opened the page, instead of CORS issues, I had 30+ "Invalid Token" errors pop up with a ton of 401s instead. Unfortunately Im going out of the country for 3 weeks in about an hour, so I won't be able to provide any more info on this until I get back, when it will hopefully return to being a CORS issue. |
I am trying to set up Ganymede on a server in my local network. (It's a basic home network, so no proxy or other network restricting shenanigans)
I am able to start all the containers and do not get any errors in any container logs (with
"debug": true
in myconfig.json
). However, when I visit the frontend and try to log in, nothing happens. Looking at the devtools console shows the following error messages:I've looked at other relevant issues that were submitted in the past but could not come up with a solution.
My
docker-compose.yml
looks like this:I have also tried using my servers hostname instead of the IP address in my configuration with the same result. I can provide the logs or any additional info if necessary.
(Looking at similar issues submitted in the past I've gathered that setting the
COOKIE_DOMAIN
env variable might resolve this. Am I correct in thinking that this is not an option for me, since I do not have a DNS server set up to assign a domain name to my server in my local network?)Any help would be greatly appreciated. Thank you!
The text was updated successfully, but these errors were encountered: