failed to login android localhost:53000 refused #551

Open
opened 2025-11-20 05:13:34 -05:00 by saavagebueno · 17 comments
Owner

Originally created by @alexunderboots on GitHub (Dec 16, 2023).

Describe the problem
can't add android to my network

To Reproduce
Android 9

Steps to reproduce the behavior:
0. Fresh install Netbird from PlayM and fresh update chrome from PlayM

  1. Go to 'change server', add self-hosted server
  2. Click on 'connect'
  3. Click on 'admin'account
  4. See error — localhost:53000 err_connection_refused

Expected behavior
I want to connect android to the netbird network

Screenshots
localhost:53000 err_connection_refused

Originally created by @alexunderboots on GitHub (Dec 16, 2023). **Describe the problem** can't add android to my network **To Reproduce** Android 9 Steps to reproduce the behavior: 0. Fresh install Netbird from PlayM and fresh update chrome from PlayM 1. Go to 'change server', add self-hosted server 2. Click on 'connect' 3. Click on 'admin'account 4. See error — localhost:53000 err_connection_refused **Expected behavior** I want to connect android to the netbird network **Screenshots** localhost:53000 err_connection_refused
saavagebueno added the bugAndroidlogin labels 2025-11-20 05:13:34 -05:00
Author
Owner

@mlsmaycon commented on GitHub (Dec 18, 2023):

Hello @alexunderboots, to understand your case better, can you check this behavior with the cloud-hosted version?

@mlsmaycon commented on GitHub (Dec 18, 2023): Hello @alexunderboots, to understand your case better, can you check this behavior with the cloud-hosted version?
Author
Owner

@alexunderboots commented on GitHub (Dec 18, 2023):

Hello @alexunderboots, to understand your case better, can you check this behavior with the cloud-hosted version?

Same error with cloud after pk-request

@alexunderboots commented on GitHub (Dec 18, 2023): > Hello @alexunderboots, to understand your case better, can you check this behavior with the cloud-hosted version? Same error with cloud after pk-request
Author
Owner

@j007bond007 commented on GitHub (Jun 21, 2024):

I'm also getting this on Android on my Pixel 8 phone. I am directed to Authentik, login successfully, and then I'm redirected to localhost:53000 "This site can't be reached: localhost refused to connect". This worked in older client/server version (I had everything turned off and just upgraded all the apps). Odd how it tries to connect to the localhost address after authentication.

@j007bond007 commented on GitHub (Jun 21, 2024): I'm also getting this on Android on my Pixel 8 phone. I am directed to Authentik, login successfully, and then I'm redirected to localhost:53000 "This site can't be reached: localhost refused to connect". This worked in older client/server version (I had everything turned off and just upgraded all the apps). Odd how it tries to connect to the localhost address after authentication.
Author
Owner

@P4uLT commented on GitHub (Jul 16, 2024):

Got the same issue today with a brand new account.

Only one node is registered

@P4uLT commented on GitHub (Jul 16, 2024): Got the same issue today with a brand new account. Only one node is registered
Author
Owner

@mlsmaycon commented on GitHub (Jul 16, 2024):

@P4uLT is this a cloud or self-hosted account? if self-hosted, you may need to add more endpoints for pkce, please share your identity provider.

@mlsmaycon commented on GitHub (Jul 16, 2024): @P4uLT is this a cloud or self-hosted account? if self-hosted, you may need to add more endpoints for pkce, please share your identity provider.
Author
Owner

@P4uLT commented on GitHub (Jul 16, 2024):

@mlsmaycon a cloud account. I got only one peer configured.

@P4uLT commented on GitHub (Jul 16, 2024): @mlsmaycon a cloud account. I got only one peer configured.
Author
Owner

@P4uLT commented on GitHub (Jul 16, 2024):

I managed to get this before the login popup opens
Screenshot_20240716_182004_NetBird

@P4uLT commented on GitHub (Jul 16, 2024): I managed to get this before the login popup opens ![Screenshot_20240716_182004_NetBird](https://github.com/user-attachments/assets/2b2c9bbf-5515-419f-bca7-8ff010c418bc)
Author
Owner

@tojoski commented on GitHub (Sep 5, 2024):

Just got this on a new account, cloud config on a pixel 8 pro.

@tojoski commented on GitHub (Sep 5, 2024): Just got this on a new account, cloud config on a pixel 8 pro.
Author
Owner

@the-real-naxgo commented on GitHub (Sep 16, 2024):

I got the same thing on a Samsung S20 with a brand new account. Any idea why?

@the-real-naxgo commented on GitHub (Sep 16, 2024): I got the same thing on a Samsung S20 with a brand new account. Any idea why?
Author
Owner

@dportabella commented on GitHub (Nov 21, 2024):

same problem

@dportabella commented on GitHub (Nov 21, 2024): same problem
Author
Owner

@the-real-naxgo commented on GitHub (Nov 21, 2024):

I figured it out. After connecting to my truenas, this port sometimes gets messed up. Reboot the phone.

@the-real-naxgo commented on GitHub (Nov 21, 2024): I figured it out. After connecting to my truenas, this port sometimes gets messed up. Reboot the phone.
Author
Owner

@dportabella commented on GitHub (Nov 21, 2024):

I figured it out. After connecting to my truenas, this port sometimes gets messed up. Reboot the phone.

it works, thanks

@dportabella commented on GitHub (Nov 21, 2024): > I figured it out. After connecting to my truenas, this port sometimes gets messed up. Reboot the phone. it works, thanks
Author
Owner

@nazarewk commented on GitHub (Apr 28, 2025):

EDIT: this is still relevant, we were just contacted by a customer with same issue through different support channel today (2025-05-15).

@nazarewk commented on GitHub (Apr 28, 2025): EDIT: this is still relevant, we were just contacted by a customer with same issue through different support channel today (2025-05-15).
Author
Owner

@nazarewk commented on GitHub (Jun 5, 2025):

We have just released the first version of the rewritten client as open test on Google Play, you can sign up for this at play.google.com/apps/testing/io.netbird.client. For whoever still encounters the problem could you check whether that new test version solves it?

@nazarewk commented on GitHub (Jun 5, 2025): We have just released the first version of the rewritten client as open test on Google Play, you can sign up for this at [play.google.com/apps/testing/io.netbird.client](https://play.google.com/apps/testing/io.netbird.client). For whoever still encounters the problem could you check whether that new test version solves it?
Author
Owner

@NielsenMax commented on GitHub (Jun 26, 2025):

I joined the beta and the problem persisted. The only solution was to reboot the phone.
App version: 0.0.27
OS: android 16

@NielsenMax commented on GitHub (Jun 26, 2025): I joined the beta and the problem persisted. The only solution was to reboot the phone. App version: 0.0.27 OS: android 16
Author
Owner

@ishmaelds commented on GitHub (Jul 25, 2025):

I just tried the beta, and the issue is still there, it's redirecting to https://localhost:53000/... if I open that url into my browser and change to http://localhost:53000/... it authenticates, and I show up in the peers list disconnected, but that authentication is not translated to the app so I can never connect.
Turns out I had a different misconfiguration, if I manually go to the URL http://localhost:53000/... it will authenticate and connect my netbird, but it still is broken in that it doesn't go there automatically, it attempts to go to the HTTPS url.

In case it was a default browser issue, I did try both Chrome and Firefox as my browsers, neither worked.

I was hopeful when I saw the new Android client beta allowed PSK, but when I try to use a PSK from my server it tells me invalid key format.

I should also mention that I had this same installation (self-hosted) where I used Zitadel as the backend auth, and when I switched to Keycloak as my backend auth, this problem showed up. The only differences I see in the redirect uri's is that zitadel calls out /auth and /silent-auth and sets them in the setup.env where Keycloak uses /* and doesn't set anything in the setup.env
https://docs.netbird.io/selfhosted/identity-providers
Zitadel:
NETBIRD_AUTH_REDIRECT_URI="/auth"
NETBIRD_AUTH_SILENT_REDIRECT_URI="/silent-auth"

Keycloak:
Root URL: https://YOUR DOMAIN/ (this is the NetBird Dashboard root URL)
Valid redirect URIs: https://YOUR DOMAIN/* and http://localhost:53000
Valid post logout redirect URIs: https://YOUR DOMAIN/*

Android Version 14
App Version: 0.1.7
Netbird: 0.51.1
Keycloak: 26.3.1

@ishmaelds commented on GitHub (Jul 25, 2025): I just tried the beta, and the issue is still there, it's redirecting to https://localhost:53000/... if I open that url into my browser and change to http://localhost:53000/... it authenticates, ~~and I show up in the peers list disconnected, but that authentication is not translated to the app so I can never connect.~~ Turns out I had a different misconfiguration, if I manually go to the URL http://localhost:53000/... it will authenticate and connect my netbird, but it still is broken in that it doesn't go there automatically, it attempts to go to the HTTPS url. In case it was a default browser issue, I did try both Chrome and Firefox as my browsers, neither worked. I was hopeful when I saw the new Android client beta allowed PSK, but when I try to use a PSK from my server it tells me invalid key format. I should also mention that I had this same installation (self-hosted) where I used Zitadel as the backend auth, and when I switched to Keycloak as my backend auth, this problem showed up. The only differences I see in the redirect uri's is that zitadel calls out /auth and /silent-auth and sets them in the setup.env where Keycloak uses /* and doesn't set anything in the setup.env https://docs.netbird.io/selfhosted/identity-providers Zitadel: NETBIRD_AUTH_REDIRECT_URI="/auth" NETBIRD_AUTH_SILENT_REDIRECT_URI="/silent-auth" Keycloak: Root URL: https://YOUR DOMAIN/ (this is the NetBird Dashboard root URL) Valid redirect URIs: https://YOUR DOMAIN/* and http://localhost:53000 Valid post logout redirect URIs: https://YOUR DOMAIN/* Android Version 14 App Version: 0.1.7 Netbird: 0.51.1 Keycloak: 26.3.1
Author
Owner

@Dichmarck commented on GitHub (Aug 9, 2025):

I figured it out. After connecting to my truenas, this port sometimes gets messed up. Reboot the phone.

Thank you, reboot helped me

@Dichmarck commented on GitHub (Aug 9, 2025): > I figured it out. After connecting to my truenas, this port sometimes gets messed up. Reboot the phone. Thank you, reboot helped me
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#551