netbird icon indicating copy to clipboard operation
netbird copied to clipboard

failed to login android localhost:53000 refused

Open alexunderboots opened this issue 2 years ago • 18 comments

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

alexunderboots avatar Dec 16 '23 14:12 alexunderboots

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

mlsmaycon avatar Dec 18 '23 08:12 mlsmaycon

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 avatar Dec 18 '23 08:12 alexunderboots

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 avatar Jun 21 '24 14:06 j007bond007

Got the same issue today with a brand new account.

Only one node is registered

P4uLT avatar Jul 16 '24 15:07 P4uLT

@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 avatar Jul 16 '24 15:07 mlsmaycon

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

P4uLT avatar Jul 16 '24 16:07 P4uLT

I managed to get this before the login popup opens Screenshot_20240716_182004_NetBird

P4uLT avatar Jul 16 '24 16:07 P4uLT

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

tojoski avatar Sep 05 '24 23:09 tojoski

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

the-real-naxgo avatar Sep 16 '24 14:09 the-real-naxgo

same problem

dportabella avatar Nov 21 '24 21:11 dportabella

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

the-real-naxgo avatar Nov 21 '24 21:11 the-real-naxgo

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

it works, thanks

dportabella avatar Nov 21 '24 22:11 dportabella

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

nazarewk avatar Apr 28 '25 15:04 nazarewk

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 avatar Jun 05 '25 14:06 nazarewk

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 avatar Jun 26 '25 17:06 NielsenMax

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 avatar Jul 25 '25 13:07 ishmaelds

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

Thank you, reboot helped me

Dichmarck avatar Aug 09 '25 04:08 Dichmarck