netbird
netbird copied to clipboard
Application error: a client-side exception has occurred (see the browser console for more information).
Describe the problem
I am trying to setup the self hosted version of Netbird and I used the docker quick setup and the advanced setup and with both I am getting this error when i try to get to the dashboard:
Application error: a client-side exception has occurred (see the browser console for more information).
If i go to the zitadel console that works fine i just cannot load the actual netbird dashboard. I do not get this error on anything else except netbird.
I have tried Chrome, Edge, Firefox and incognito in each of those.
To Reproduce
Steps to reproduce the behavior: Install netbird and open dashboard
Expected behavior
Load the dashboard
Are you using NetBird Cloud?
Self host
NetBird version
management server version 0.26.3
| latest
NetBird status -d output:
If applicable, add the `netbird status -d' command output.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
This was installed on a fresh Alma Linux VM that has a public IP address and all ports listed in documentation are open on the firewall. DNS is hosted by CloudFlare and CF proxy is turned off for this subdomain.
If anyone can help me determine what the issue is I would be grateful
This is the only error in the browser console:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
NextJS 10
getLoginParams
default
wf
rr
gk
Xe
Xe
Ye
gf
P
[2472-d2675ce40f6cc81a.js:1:3899](https://vpn.domain.com/_next/static/chunks/2472-d2675ce40f6cc81a.js)
NextJS 26
error
Fg
callback
Zd
$d
Fi
Hi
Ii
Hi
Ii
Hi
Ii
Hi
Ii
Hi
Ii
Hi
Ii
Hi
Ii
Hi
bf
bf
Tj
gf
P
Hello @xionous can you please share the logs from the management and dashboard services?
You can get those with the command: docker compose logs <service name> > /tmp/<service>.log 2>&1
Sure, here are the logs:
dashboard-1 | + LETSENCRYPT_DOMAIN=vpn.domain.com
dashboard-1 | + LETSENCRYPT_EMAIL=<removed>
dashboard-1 | + NGINX_SSL_PORT=443
dashboard-1 | + '[' vpn.domain.com-x == none-x ']'
dashboard-1 | + certbot -n --nginx --agree-tos --email <removed> -d vpn.domain.com --https-port 443
dashboard-1 | AUTH_AUTHORITY or AUTH0_DOMAIN environment variable must be set
dashboard-1 | AUTH_AUTHORITY or AUTH0_DOMAIN environment variable must be set
dashboard-1 | Saving debug log to /var/log/letsencrypt/letsencrypt.log
dashboard-1 | Certificate not yet due for renewal
dashboard-1 | Deploying certificate
dashboard-1 | Successfully deployed certificate for vpn.domain.com to /etc/nginx/http.d/default.conf
dashboard-1 | Congratulations! You have successfully enabled HTTPS on https://vpn.domain.com
dashboard-1 |
dashboard-1 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
dashboard-1 | If you like Certbot, please consider supporting our work by:
dashboard-1 | * Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
dashboard-1 | * Donating to EFF: https://eff.org/donate-le
dashboard-1 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
dashboard-1 | + cat
dashboard-1 | + supervisorctl start cron
dashboard-1 | crond: crond (busybox 1.33.1) started, log level 8
dashboard-1 | cron: started
dashboard-1 | 45.138.16.120 - - [17/Mar/2024:18:25:03 +0000] "GET /.git/config HTTP/1.1" 404 1649 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_7; en-us) AppleWebKit/534.20.8 (KHTML, like Gecko) Version/5.1 Safari/534.20.8" "-"
dashboard-1 | 91.92.244.152 - - [17/Mar/2024:18:26:18 +0000] "GET http://httpbin.org/ip HTTP/1.1" 400 248 "-" "Go-http-client/1.1" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:28 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:28 +0000] "GET /_next/static/media/c9a5bc6a7c948fb0-s.p.woff2 HTTP/1.1" 200 46552 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:31 +0000] "GET / HTTP/1.1" 200 1676 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:35 +0000] "GET / HTTP/1.1" 200 1676 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:35 +0000] "GET /_next/static/chunks/webpack-367277a25e05e1c8.js HTTP/1.1" 200 2685 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:35 +0000] "GET /_next/static/chunks/2472-d2675ce40f6cc81a.js HTTP/1.1" 200 27683 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:35 +0000] "GET /_next/static/chunks/fd9d1056-94d51a7229cdc644.js HTTP/1.1" 200 50961 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:36 +0000] "GET /_next/static/chunks/main-app-93a82954f85f60f8.js HTTP/1.1" 200 249 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:36 +0000] "GET /apple-icon.png?d2c7863352226aa3 HTTP/1.1" 200 3410 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:36 +0000] "GET /_next/static/media/c9a5bc6a7c948fb0-s.p.woff2 HTTP/1.1" 200 46552 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:36 +0000] "GET /_next/static/css/4ac80d88599231c0.css HTTP/1.1" 200 23311 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:36 +0000] "GET /favicon.ico HTTP/1.1" 200 2031 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:36 +0000] "GET /_next/static/css/88e44018c13b0515.css HTTP/1.1" 200 1053 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:36 +0000] "GET /_next/static/chunks/1677-a6abbc331a81fc74.js HTTP/1.1" 200 7378 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:37 +0000] "GET /_next/static/chunks/8712-4a7d449a5289449b.js HTTP/1.1" 200 1803 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:37 +0000] "GET /_next/static/chunks/704-b5f3a234f54e322b.js HTTP/1.1" 200 58243 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:37 +0000] "GET /_next/static/chunks/6691-c79d5fd1722acd36.js HTTP/1.1" 200 5298 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:37 +0000] "GET /_next/static/chunks/7280-032bedaa37817ea8.js HTTP/1.1" 200 44653 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:37 +0000] "GET /_next/static/chunks/app/layout-87f581d0dd39bc8f.js HTTP/1.1" 200 9401 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:37 +0000] "GET /_next/static/chunks/app/not-found-a28aa0db5fd95d48.js HTTP/1.1" 200 1584 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:37 +0000] "GET /_next/static/chunks/app/page-1ad2a8d69c24d7ce.js HTTP/1.1" 200 2436 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:37 +0000] "GET /_next/static/chunks/8444-ff4532f12ce7edd9.js HTTP/1.1" 200 9529 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:37 +0000] "GET /_next/static/chunks/9081a741-6b4ac6fffb63fe9f.js HTTP/1.1" 200 313 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:37 +0000] "GET /_next/static/chunks/93854f56-7de4e40453afe2a9.js HTTP/1.1" 200 1250 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:37 +0000] "GET /_next/static/chunks/5945-9e246bd3b917fdd6.js HTTP/1.1" 200 6336 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:37 +0000] "GET /_next/static/chunks/2731-e746de7d02695f25.js HTTP/1.1" 200 18189 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
dashboard-1 | 0.0.0.0 - - [17/Mar/2024:18:29:38 +0000] "GET /_next/static/chunks/6435.a00e370b6b967c48.js HTTP/1.1" 200 1641 "https://vpn.domain.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0" "-"
management-1 | 2024-03-17T18:24:32Z INFO management/cmd/management.go:449: loading OIDC configuration from the provided IDP configuration endpoint https://login.microsoftonline.com/<removed>/v2.0/.well-known/openid-configuration
management-1 | 2024-03-17T18:24:33Z INFO management/cmd/management.go:454: loaded OIDC configuration from the provided IDP configuration endpoint: https://login.microsoftonline.com/<removed>/v2.0/.well-known/openid-configuration
management-1 | 2024-03-17T18:24:33Z INFO management/cmd/management.go:456: overriding HttpConfig.AuthIssuer with a new value https://login.microsoftonline.com/<removed>/v2.0, previously configured value: https://login.microsoftonline.com/<removed>/v2.0
management-1 | 2024-03-17T18:24:33Z INFO management/cmd/management.go:460: overriding HttpConfig.AuthKeysLocation (JWT certs) with a new value https://login.microsoftonline.com/<removed>/discovery/v2.0/keys, previously configured value: https://login.microsoftonline.com/<removed>/discovery/v2.0/keys
management-1 | 2024-03-17T18:24:33Z INFO management/cmd/management.go:486: overriding PKCEAuthorizationFlow.TokenEndpoint with a new value: https://login.microsoftonline.com/<removed>/oauth2/v2.0/token, previously configured value: https://login.microsoftonline.com/<removed>/oauth2/v2.0/token
management-1 | 2024-03-17T18:24:33Z INFO management/cmd/management.go:489: overriding PKCEAuthorizationFlow.AuthorizationEndpoint with a new value: https://login.microsoftonline.com/<removed>/oauth2/v2.0/authorize, previously configured value: https://login.microsoftonline.com/<removed>/oauth2/v2.0/authorize
management-1 | 2024-03-17T18:24:33Z INFO management/server/telemetry/app_metrics.go:177: enabled application metrics and exposing on http://0.0.0.0:8081
management-1 | 2024-03-17T18:24:33Z INFO management/server/store.go:92: using SQLite store engine
management-1 | 2024-03-17T18:24:34Z INFO management/cmd/management.go:172: geo location service has been initialized from /var/lib/netbird/
management-1 | 2024-03-17T18:24:34Z INFO management/server/account.go:848: single account mode enabled, accounts number 0
management-1 | 2024-03-17T18:24:34Z INFO encryption/letsencrypt.go:22: running with LetsEncrypt (vpn.domain.com). Cert will be stored in /var/lib/netbird/letsencrypt
management-1 | 2024-03-17T18:24:35Z INFO management/cmd/management.go:287: running gRPC backward compatibility server: [::]:33073
management-1 | 2024-03-17T18:24:35Z INFO management/cmd/management.go:319: management server version 0.26.3
management-1 | 2024-03-17T18:24:35Z INFO management/cmd/management.go:320: running HTTP server and gRPC server on the same port: [::]:443
management-1 | 2024-03-17T18:24:35Z INFO management/server/account.go:1033: 1 entries received from IdP management
management-1 | 2024-03-17T18:24:35Z INFO management/server/account.go:1062: warmed up IDP cache with 0 entries
@xionous, thanks, the logs seem fine. I believe it might be an extension blocking some script execution for the dashboard or some browser(s) compatibility issue.
Can you test our cloud-hosted version? https://app.netbird.io. The dashboard is the same there, and it should fail there too. If it doesn't fail, please try using the previous dashboard container image version, (v2.1.2)
I actually already tested that and I am able to use the cloud version and login.
I don't know if this is helpful but here is the HAR from loading my self hosted version:
https://pastes.io/vw8ua3engl
Ill try that version and reply with results
I tried v2.0.0, v2.0.4, v2.1.0, and v2.1.2 all have the same issue.
In that case, can you please join our Slack community and share your dashboard URL with me? you can find me with the same handle there.
Issue has been resolved, not entirely sure what was wrong.
@xionous Hello, brother. I am now having the same problem as you, I am using the self-deployed version, self-deployed zitadel and using my own NGINX agent, and when I am ready together, I open the dashboard and have the same problem as you. How did you solve it, may I ask?
@xiaojueshi As per my last post on this, I have no idea what fixed it, it seemingly starting working completely on it's own.
@xionous When I turned it on today, it also worked on its own, which is really an amazing thing!
Same thing is happening for me after upgrading to the latest dashboard (from the old wiretrustee image). It only happens on the /peers page. If I can click out to another page (like network-routes for instance) then it will load that content without a problem. My logs also didn't have anything strange in them.
Happens on any browser. Here's the chrome console:
I gave up waiting for this automagically self-heal after 12 hours and reverted to the wiretrustee/dashboard image which works fine.
@heisbrot Some users still facing this issue, can you have a look?
I can confirm that this issue can be reproduced with a self-hosted setup by following https://docs.netbird.io/selfhosted/selfhosted-guide with NGINX proxy:
Turning on the debugger show that the code throw an error trying to access sessionStorage['oidc_login.default']
, which for some reason, isn't populated. I cannot trace down this line of code in the dashboard codebase.
For anybody seeing this problem doing a self-host installation, it is because this script dashboard/init_react_env.sh failed to run when the dashboard docker container start, therefore it fails to substitute all the OIDC configuration.
To fix this, ensure you have filled all OIDC related environment variable in setup.env
(I was missing AUTH_SUPPORTED_SCOPES="openid profile email offline_access api"
)
I have a suggestion for the developers, because right now this script is triggered through supervisord
, the error will be swallowed silently. You guys should put those script into the entrypoint of the Docker image, so in case of a failure, the Docker container will fail loudly and user will be able to catch the bug in Docker log. I can open a PR for this.
I can confirm that this issue can be reproduced with a self-hosted setup by following https://docs.netbird.io/selfhosted/selfhosted-guide with NGINX proxy: Turning on the debugger show that the code throw an error trying to access
sessionStorage['oidc_login.default']
, which for some reason, isn't populated. I cannot trace down this line of code in the dashboard codebase.
same error :(
I checked it via Docker PS, it just can’t start managment netbird, it restarts every time
I have the same issues. Tried walking back in time, can confirm that the last docker image version of dashboard that is working for me is the v2.1.2, after that, the error starts. Little sad, as I wanted to use default routes (https://docs.netbird.io/how-to/configuring-default-routes-for-internet-traffic), but this old version of the dashboard doesn't seem to support it...
Newest release fixes it at least for me.