[GH-ISSUE #4189] Dashboard freezes on first reload #8228

Open
opened 2026-08-05 01:16:58 -04:00 by saavagebueno · 5 comments
Owner

Originally created by @AbsurdlySuspicious on GitHub (Jul 21, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/4189

Describe the problem

When you open new tab, dashboard goes to oauth authorize endpoint and loads fine, but on first reload of the same tab it usually hangs on loading screen. Nothing happens in network tab during this other that getting web assets and querying openid-configuration.

Reload usually works fine if you've clicked on any section in sidebar and then pressed reload, but sometimes after this it fails with error: unauthorized due to "code": "undefined" sent to oauth token endpoint (see https://github.com/netbirdio/dashboard/issues/218)

To Reproduce

Steps to reproduce the behavior:

  1. Open new tab
  2. Go to your self-hosted netbird domain
  3. Reload once

Expected behavior

Dashboard works fine across reloads

Are you using NetBird Cloud?

Self-hosted

NetBird version

0.51.1

Is any other VPN software installed?

No

Debug output

N/A

Screenshots

N/A

Additional context

N/A

Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting (if applicable)
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings
Originally created by @AbsurdlySuspicious on GitHub (Jul 21, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/4189 **Describe the problem** When you open new tab, dashboard goes to oauth authorize endpoint and loads fine, but on first reload of the same tab it usually hangs on loading screen. Nothing happens in network tab during this other that getting web assets and querying openid-configuration. Reload usually works fine if you've clicked on any section in sidebar and then pressed reload, but sometimes after this it fails with `error: unauthorized` due to `"code": "undefined"` sent to oauth token endpoint (see https://github.com/netbirdio/dashboard/issues/218) **To Reproduce** Steps to reproduce the behavior: 1. Open new tab 2. Go to your self-hosted netbird domain 3. Reload once **Expected behavior** Dashboard works fine across reloads **Are you using NetBird Cloud?** Self-hosted **NetBird version** `0.51.1` **Is any other VPN software installed?** No **Debug output** N/A **Screenshots** N/A **Additional context** N/A **Have you tried these troubleshooting steps?** - [x] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) - [x] Checked for newer NetBird versions - [x] Searched for similar issues on GitHub (including closed ones) - [x] Restarted the NetBird client - [x] Disabled other VPN software - [x] Checked firewall settings
saavagebueno added the triage-neededself-hosting labels 2026-08-05 01:16:58 -04:00
Author
Owner

@nazarewk commented on GitHub (Jul 22, 2025):

Could you give us more info on which identity provider you are using? Team mentioned it could be a factor.

<!-- gh-comment-id:3103356305 --> @nazarewk commented on GitHub (Jul 22, 2025): Could you give us more info on which identity provider you are using? Team mentioned it could be a factor.
Author
Owner

@AbsurdlySuspicious commented on GitHub (Jul 22, 2025):

I'm using my own idP which I believe is OIDC compliant. If you could point out what particular part to check I would appreciate it. While debugging I've traced this issue to some setTimeout call inside @axa-fr/oidc-client

<!-- gh-comment-id:3103959899 --> @AbsurdlySuspicious commented on GitHub (Jul 22, 2025): I'm using my own idP which I believe is OIDC compliant. If you could point out what particular part to check I would appreciate it. While debugging I've traced this issue to some setTimeout call inside @axa-fr/oidc-client
Author
Owner

@ovlach commented on GitHub (Feb 4, 2026):

Same issue here. The dashboard loads correctly in v2.23.1, but v2.31.0 gets stuck on the loading screen. OIDC is Kanidm.

<!-- gh-comment-id:3847386547 --> @ovlach commented on GitHub (Feb 4, 2026): Same issue here. The dashboard loads correctly in v2.23.1, but v2.31.0 gets stuck on the loading screen. OIDC is Kanidm.
Author
Owner

@AbsurdlySuspicious commented on GitHub (Mar 18, 2026):

As of dashboard v2.34.2:

I've been able to overcome this issue. To anyone encountering this issue (or other dashboard authorization isssues) I recommend to check for these issues:

  • Ensure that id_token returned from token endpoint is correct. It should pass nonce from auth endpoint correctly, also my idP did not previously provide at_hash field, though I'm not sure if dashboard requires it
  • Access token should be a JWT. Although AFAIK this is not required by OIDC spec, it is popular practice with modern off-the-shelf idP implementations. It should be signed with same key as id_token (jwks_uri in openid-configuration) and should at least contain iss, exp, iat, aud and sub claims. Custom claims included in token do not break anything.
  • NETBIRD_AUTH_REDIRECT_URI in setup.env should be set to custom url that does not conflict with any urls used in dashboard (something like /_netbird_auth). It will return 404 response if you inspect this redirect in devtools but it doesn't seem to matter, as I understand it dashboard`s service worker will use code passed to this url anyway.
  • Audience (aud) claims in both access_token and id_token: I'm not sure if that's the only configuration that works, but I've come to this one: both id_token and access_token contain aud claim that contain netbird's client_id as string (it should be client_id in id_token as per OIDC spec, behavior for access_token is undefined in specs), and setup.env should be configured with NETBIRD_AUTH_AUDIENCE=<client_id> env variable

To netbird developers:

Better documentation and/or error reporting regarding oauth would have saved a lot of time troubleshooting this issue, especially considering that Netbird`s oauth impl is not entirely up to spec. Unfortunately, not everyone uses off-the-shelf idP's, so authorization flow should be better documented.

<!-- gh-comment-id:4085111713 --> @AbsurdlySuspicious commented on GitHub (Mar 18, 2026): As of dashboard v2.34.2: I've been able to overcome this issue. To anyone encountering this issue (or other dashboard authorization isssues) I recommend to check for these issues: - Ensure that `id_token` returned from token endpoint is correct. It should pass `nonce` from auth endpoint correctly, also my idP did not previously provide `at_hash` field, though I'm not sure if dashboard requires it - Access token should be a JWT. Although AFAIK this is not required by OIDC spec, it is popular practice with modern off-the-shelf idP implementations. It should be signed with same key as `id_token` (`jwks_uri` in openid-configuration) and should at least contain `iss`, `exp`, `iat`, `aud` and `sub` claims. Custom claims included in token do not break anything. - `NETBIRD_AUTH_REDIRECT_URI` in `setup.env` should be set to custom url that does not conflict with any urls used in dashboard (something like `/_netbird_auth`). It will return 404 response if you inspect this redirect in devtools but it doesn't seem to matter, as I understand it dashboard\`s service worker will use `code` passed to this url anyway. - Audience (`aud`) claims in both access_token and id_token: I'm not sure if that's the only configuration that works, but I've come to this one: both `id_token` and `access_token` contain `aud` claim that contain netbird's `client_id` as string (it should be client_id in id_token as per OIDC spec, behavior for access_token is undefined in specs), and `setup.env` should be configured with `NETBIRD_AUTH_AUDIENCE=<client_id>` env variable To netbird developers: Better documentation and/or error reporting regarding oauth would have saved a lot of time troubleshooting this issue, especially considering that Netbird`s oauth impl is not entirely up to spec. Unfortunately, not everyone uses off-the-shelf idP's, so authorization flow should be better documented.
Author
Owner

@AbsurdlySuspicious commented on GitHub (Mar 18, 2026):

@nazarewk FYI, this issue probably needs missing-docs label. I hope this will be addressed eventually

<!-- gh-comment-id:4085145130 --> @AbsurdlySuspicious commented on GitHub (Mar 18, 2026): @nazarewk FYI, this issue probably needs `missing-docs` label. I hope this will be addressed eventually
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#8228