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

Failed to auth with github #725

Open
oxblixxx opened this issue Aug 13, 2024 · 1 comment
Open

Failed to auth with github #725

oxblixxx opened this issue Aug 13, 2024 · 1 comment

Comments

@oxblixxx
Copy link

oxblixxx commented Aug 13, 2024

Whenever I try to login using gitlab from the Appflowy app, it redirects to my browser but doesn't respond. I have my docker compose services running perfectly except from the admin_frontend where I have this in the logs

admin_frontend-1    | {"timestamp":"2024-08-13T02:27:06.969112Z","level":"ERROR","fields":{"error":"calling http://gotrue:9999/health failed"},"target":"gotrue::api","span":{"name":"health"},"spans":[{"name":"health"}]}
admin_frontend-1    | thread 'main' panicked at admin_frontend/src/main.rs:37:6:
admin_frontend-1    | gotrue health check failed: Unhandled(calling http://gotrue:9999/health failed
admin_frontend-1    |
admin_frontend-1    | Caused by:
admin_frontend-1    |     0: error sending request for url (http://gotrue:9999/health): error trying to connect: tcp connect error: Connection refused (os error 111)
admin_frontend-1    |     1: error trying to connect: tcp connect error: Connection refused (os error 111)
admin_frontend-1    |     2: tcp connect error: Connection refused (os error 111)
admin_frontend-1    |     3: Connection refused (os error 111)
admin_frontend-1    |
admin_frontend-1    | Stack backtrace:
admin_frontend-1    |    0: gotrue::api::Client::health::{{closure}}::{{closure}}
admin_frontend-1    |    1: admin_frontend::main::{{closure}}
admin_frontend-1    |    2: admin_frontend::main
admin_frontend-1    |    3: std::sys_common::backtrace::__rust_begin_short_backtrace
admin_frontend-1    |    4: main
admin_frontend-1    |    5: <unknown>
admin_frontend-1    |    6: __libc_start_main
admin_frontend-1    |    7: _start)
admin_frontend-1    | stack backtrace:
admin_frontend-1    |    0: rust_begin_unwind
admin_frontend-1    |    1: core::panicking::panic_fmt
admin_frontend-1    |    2: core::result::unwrap_failed
admin_frontend-1    |    3: admin_frontend::main::{{closure}}
admin_frontend-1    |    4: admin_frontend::main
admin_frontend-1    | note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Here is the logs of my gotrue service

{"component":"api","level":"warning","msg":"DEPRECATION NOTICE: GOTRUE_JWT_ADMIN_GROUP_NAME not supported by Supabase's GoTrue, will be removed soon","time":"2024-08-13T02:27:07Z"}
{"level":"info","msg":"GoTrue API started on: :9999","time":"2024-08-13T02:27:07Z"}
{"component":"api","level":"info","method":"POST","msg":"request started","path":"/signup","referer":"appflowy-flutter://","remote_addr":"172.20.0.3","time":"2024-08-13T02:27:07Z","timestamp":"2024-08-13T02:27:07Z"}
{"auth_event":{"action":"user_repeated_signup","actor_id":"4104945c-d9f4-41c6-b2ce-0f65b035fa54","actor_username":"[email protected]","actor_via_sso":false,"log_type":"user","traits":{"provider":"email"}},"component":"api","error":"400: User already registered","level":"info","method":"POST","msg":"400: User already registered","path":"/signup","referer":"appflowy-flutter://","remote_addr":"172.20.0.3","time":"2024-08-13T02:27:07Z","timestamp":"2024-08-13T02:27:07Z"}
{"auth_event":{"action":"user_repeated_signup","actor_id":"4104945c-d9f4-41c6-b2ce-0f65b035fa54","actor_username":"[email protected]","actor_via_sso":false,"log_type":"user","traits":{"provider":"email"}},"component":"api","duration":111663582,"level":"info","method":"POST","msg":"request completed","path":"/signup","referer":"appflowy-flutter://","remote_addr":"172.20.0.3","status":400,"time":"2024-08-13T02:27:07Z","timestamp":"2024-08-13T02:27:07Z"}
{"component":"api","level":"info","method":"GET","msg":"request started","path":"/settings","referer":"appflowy-flutter://","remote_addr":"172.20.0.8","time":"2024-08-13T02:39:22Z","timestamp":"2024-08-13T02:39:22Z"}
{"component":"api","duration":636134,"level":"info","method":"GET","msg":"request completed","path":"/settings","referer":"appflowy-flutter://","remote_addr":"172.20.0.8","status":200,"time":"2024-08-13T02:39:22Z","timestamp":"2024-08-13T02:39:22Z"}
{"component":"api","level":"info","method":"GET","msg":"request started","path":"/authorize","referer":"appflowy-flutter://","remote_addr":"172.20.0.8","time":"2024-08-13T02:39:23Z","timestamp":"2024-08-13T02:39:23Z"}
{"component":"api","level":"info","method":"GET","msg":"Redirecting to external provider","path":"/authorize","provider":"github","referer":"appflowy-flutter://","remote_addr":"172.20.0.8","time":"2024-08-13T02:39:23Z","timestamp":"2024-08-13T02:39:23Z"}
{"component":"api","duration":897477,"level":"info","method":"GET","msg":"request com pleted","path":"/authorize","referer":"appflowy-flutter://","remote_addr":"172.20.0.8","status":302,"time":"2024-08-13T02:39:23Z","timestamp":"2024-08-13T02:39:23Z"}

In my .env, I have my client id and secrets set in and this set as

GOTRUE_EXTERNAL_GITHUB_ENABLED=true

Here is workstation details

PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
@speed2exe
Copy link
Collaborator

@oxblixxx for some reason, the gotrue service is not able to be reached by the admin_frontend when it starts, so it exits. Do check that those services are in the same docker network (by default they should be). if your gotrue is running fine, admin_frontend should also be running fine after restart(should be automatic).

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

2 participants