Android 14 App doesn't connect to the peers #526

Closed
opened 2025-11-20 05:13:01 -05:00 by saavagebueno · 29 comments
Owner

Originally created by @nilshee on GitHub (Nov 30, 2023).

Describe the problem
The playstore version of the netbird app won't connect to the peers. The connection and login to the management server works without a problem.

To Reproduce
Steps to reproduce the behavior:

  1. Download APP on an android 14 device (tested with Galaxy S23 Ultra and Pixel 7)
  2. Try to use the app

Expected behavior
Connect to the peers.

NetBird status -d output:
Android app

Screenshots
image
image
image

Originally created by @nilshee on GitHub (Nov 30, 2023). **Describe the problem** The playstore version of the netbird app won't connect to the peers. The connection and login to the management server works without a problem. **To Reproduce** Steps to reproduce the behavior: 1. Download APP on an android 14 device (tested with Galaxy S23 Ultra and Pixel 7) 2. Try to use the app **Expected behavior** Connect to the peers. **NetBird status -d output:** Android app **Screenshots** ![image](https://github.com/netbirdio/netbird/assets/13719337/e0785109-fb46-4e31-9928-270acaa3d0e8) ![image](https://github.com/netbirdio/netbird/assets/13719337/30bfa31a-f7b2-42be-9d2d-72ba2e38fb69) ![image](https://github.com/netbirdio/netbird/assets/13719337/ecb90bf0-710a-469d-b624-f90015c08a8c)
saavagebueno added the bugAndroid labels 2025-11-20 05:13:01 -05:00
Author
Owner

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

Hello @nils1323, we are fixing an issue with IPv6 DNS addresses, can you confirm if your devices are using IPv6?

@mlsmaycon commented on GitHub (Dec 1, 2023): Hello @nils1323, we are fixing an issue with IPv6 DNS addresses, can you confirm if your devices are using IPv6?
Author
Owner

@nilshee commented on GitHub (Dec 1, 2023):

The network, the devices are in, is ipv4 only. There is a local (fe prefix) ipv6 address in the network configuration settings of the phones.
I'm not sure if that somehow interferes.

@nilshee commented on GitHub (Dec 1, 2023): The network, the devices are in, is ipv4 only. There is a local (fe prefix) ipv6 address in the network configuration settings of the phones. I'm not sure if that somehow interferes.
Author
Owner

@jiangslee commented on GitHub (Dec 15, 2023):

Hello @nils1323, we are fixing an issue with IPv6 DNS addresses, can you confirm if your devices are using IPv6?

image

Hello @mlsmaycon , I have the same problem too,According to the https://github.com/netbirdio/netbird/issues/798#issuecomment-1502430133 , I tested my TURN configuration, I think that it is affected by ipv6.

@jiangslee commented on GitHub (Dec 15, 2023): > Hello @nils1323, we are fixing an issue with IPv6 DNS addresses, can you confirm if your devices are using IPv6? ![image](https://github.com/netbirdio/netbird/assets/27892476/2b491966-a0f6-450a-9ac1-6978fabff911) Hello @mlsmaycon , I have the same problem too,According to the https://github.com/netbirdio/netbird/issues/798#issuecomment-1502430133 , I tested my TURN configuration, I think that it is affected by ipv6.
Author
Owner

@jiangslee commented on GitHub (Dec 15, 2023):

self host server: netbird-mgmt version 0.24.4
client: ios 0.0.1(40)/ mac 0.24.4 (on ios hostspot)

@jiangslee commented on GitHub (Dec 15, 2023): self host server: netbird-mgmt version 0.24.4 client: ios 0.0.1(40)/ mac 0.24.4 (on ios hostspot)
Author
Owner

@DENightOne commented on GitHub (Dec 22, 2023):

I have the same problem on my Android phone (Android 13), what i did notice is that it only happens when I add a route, without any routes all peers can see all peers, when I add a route, the Linux nodes can see one another but the Android app sees no other peers. I then remove the route and reconnect the android app i can see all the peers again.

If i run the exact same peers on netbird.io I have no such problem, with and without routes all peers can see all peers

Self Hosted: docker image 0.25.1
Linux client 0.25.1
Android 0.24.4

@DENightOne commented on GitHub (Dec 22, 2023): I have the same problem on my Android phone (Android 13), what i did notice is that it only happens when I add a route, without any routes all peers can see all peers, when I add a route, the Linux nodes can see one another but the Android app sees no other peers. I then remove the route and reconnect the android app i can see all the peers again. If i run the exact same peers on netbird.io I have no such problem, with and without routes all peers can see all peers Self Hosted: docker image 0.25.1 Linux client 0.25.1 Android 0.24.4
Author
Owner

@thefiredragon commented on GitHub (Jan 11, 2024):

Same issue here,
We're using ipv6 only for external communication.
Android devices also have ipv6 addresses.
App shows its connected but peers are down.

@thefiredragon commented on GitHub (Jan 11, 2024): Same issue here, We're using ipv6 only for external communication. Android devices also have ipv6 addresses. App shows its connected but peers are down.
Author
Owner

@thefiredragon commented on GitHub (Jan 11, 2024):

I have a update perhaps related to other issues here

adding to turnserver.conf:

# Allocate Address Family according
# If enabled then TURN server allocates address family according  the TURN
# Client <=> Server communication address family.
# (By default Coturn works according RFC 6156.)
# !!Warning: Enabling this option breaks RFC6156 section-4.2 (violates use default IPv4)!!
#
keep-address-family

make it possible to use netbird over ipv6.
It not resolve the issue for android devices with their app.
I had tested this with 2 linux devices.
DNS only Point to IPv6 external address.

@thefiredragon commented on GitHub (Jan 11, 2024): I have a update perhaps related to other issues here adding to turnserver.conf: ``` # Allocate Address Family according # If enabled then TURN server allocates address family according the TURN # Client <=> Server communication address family. # (By default Coturn works according RFC 6156.) # !!Warning: Enabling this option breaks RFC6156 section-4.2 (violates use default IPv4)!! # keep-address-family ``` make it possible to use netbird over ipv6. It not resolve the issue for android devices with their app. I had tested this with 2 linux devices. DNS only Point to IPv6 external address.
Author
Owner

@j007bond007 commented on GitHub (Jan 12, 2024):

Having same issue but with DNS (routes seem fine). Removing DNS servers causes peers to connect again.

@j007bond007 commented on GitHub (Jan 12, 2024): Having same issue but with DNS (routes seem fine). Removing DNS servers causes peers to connect again.
Author
Owner

@let-lc commented on GitHub (Jan 16, 2024):

Same problem here, IPv4 only home network, I could see the peers connected on the android app. But I couldn't see them after I switch to mobile network which has IPv6 enabled.

I tried to disabled IPv6 by editing the APN setting but it doesn't allow me to do that like the online tutorials. If you can edit your mobile network APN settings, you can try that and see if it works after disabling IPv6. Right now I just have to wait for the new version to fix this problem.

@let-lc commented on GitHub (Jan 16, 2024): Same problem here, IPv4 only home network, I could see the peers connected on the android app. But I couldn't see them after I switch to mobile network which has IPv6 enabled. I tried to disabled IPv6 by editing the APN setting but it doesn't allow me to do that like the online tutorials. If you can edit your mobile network APN settings, you can try that and see if it works after disabling IPv6. Right now I just have to wait for the new version to fix this problem.
Author
Owner

@jiangslee commented on GitHub (Jan 17, 2024):

@let-lc @thefiredragon @DENightOne @nilshee

Hey guys, see https://github.com/netbirdio/netbird/issues/1453#issuecomment-1887207508

add external-ip=<eip> to turnserver.conf and use docker compose up -d --force-recreate coturn

It works for me, I think you can also try it?

@jiangslee commented on GitHub (Jan 17, 2024): @let-lc @thefiredragon @DENightOne @nilshee Hey guys, see https://github.com/netbirdio/netbird/issues/1453#issuecomment-1887207508 add `external-ip=<eip>` to `turnserver.conf` and use `docker compose up -d --force-recreate coturn` It works for me, I think you can also try it?
Author
Owner

@let-lc commented on GitHub (Jan 17, 2024):

@let-lc @thefiredragon @DENightOne @nilshee

Hey guys, see #1453 (comment)

add external-ip=<eip> to turnserver.conf and use docker compose up -d --force-recreate coturn

It works for me, I think you can also try it?

Sadly this doesn't work for me. I tried on my iOS device and faced the same problems.


I also found another problem when I was doing some tests, not related to IPv6, but DNS.

Both my iOS and Android devices, I added a LAN pi-hole DNS server to the WiFi setting. This doesn't cause any problem on my iOS device, but on Android, 0 of n peers connected problem happens again.

If I connect my Android to another SSID of the same router with auto DHCP (no static IP, no custom DNS), I could see the peers connected now. I'm not a network expert, so I don't know why this is happening. Just sharing my finding.

@let-lc commented on GitHub (Jan 17, 2024): > @let-lc @thefiredragon @DENightOne @nilshee > > Hey guys, see [#1453 (comment)](https://github.com/netbirdio/netbird/issues/1453#issuecomment-1887207508) > > add `external-ip=<eip>` to `turnserver.conf` and use `docker compose up -d --force-recreate coturn` > > It works for me, I think you can also try it? Sadly this doesn't work for me. I tried on my iOS device and faced the same problems. --- I also found another problem when I was doing some tests, not related to IPv6, but DNS. Both my iOS and Android devices, I added a LAN pi-hole DNS server to the WiFi setting. This doesn't cause any problem on my iOS device, but on Android, 0 of n peers connected problem happens again. If I connect my Android to another SSID of the same router with auto DHCP (no static IP, no custom DNS), I could see the peers connected now. I'm not a network expert, so I don't know why this is happening. Just sharing my finding.
Author
Owner

@yan-imensar commented on GitHub (Jan 21, 2024):

Got a similar issue,

I have a small homelab with a k8s cluster and an Adguard Home instance running.
I self hosted Netbird and some monitoring tools on a VPS. I'm using adguard as a DNS server on netbird as well as on my router so that all my home equipment (like wife phone) can use services without vpn.

No problem so far with linux or windows clients on netbird, but on my android phone i can see 0 of n Peers connected. Disabling custom DNS in netbird solves the issue, but no custom dns anymore, which is annoying

The DNS Server is on a VM (192.168.1.104) in my local network but it doesnt have netbird installed so I used routing to expose 192.168.1.0/24 through another machine with netbird installed, I don't know if it could be the issue.

I plan on installing netbird on the adguard machine and using it as a dns server with it's netbird ip, don't know if it's possible though.

EDIT :
It looks like installing netbird on the adguard machine and using it's netbird ip to set the dns server is working, I can see my peers connected on my phone again. I'll edit the comment if the situation changes

@yan-imensar commented on GitHub (Jan 21, 2024): Got a similar issue, I have a small homelab with a k8s cluster and an Adguard Home instance running. I self hosted Netbird and some monitoring tools on a VPS. I'm using adguard as a DNS server on netbird as well as on my router so that all my home equipment (like wife phone) can use services without vpn. No problem so far with linux or windows clients on netbird, but on my android phone i can see 0 of n Peers connected. **Disabling custom DNS in netbird solves the issue, but no custom dns anymore, which is annoying** The DNS Server is on a VM (192.168.1.104) in my local network but it doesnt have netbird installed so **I used routing to expose 192.168.1.0/24 through another machine** with netbird installed, I don't know if it could be the issue. I plan on installing netbird on the adguard machine and using it as a dns server with it's netbird ip, don't know if it's possible though. EDIT : It looks like installing netbird on the adguard machine and using it's netbird ip to set the dns server is working, I can see my peers connected on my phone again. I'll edit the comment if the situation changes
Author
Owner

@MatteoPaier commented on GitHub (Jan 25, 2024):

I've a similar setup to @DidZ0 (self hosted Netbird, with adguard DNS server via custom route) and indeed the peers are not connecting.

I'm just speculating, but can it be a chicken/egg problem where the app is trying to resolve the NetBird domain with the provided DNS server?
The issue seems solved if I provide another "bootstrap" nameserver that match only my NetBird domain (netbird.example.com) and resolves with a public DNS server.

@MatteoPaier commented on GitHub (Jan 25, 2024): I've a similar setup to @DidZ0 (self hosted Netbird, with adguard DNS server via custom route) and indeed the peers are not connecting. I'm just speculating, but can it be a chicken/egg problem where the app is trying to resolve the NetBird domain with the provided DNS server? The issue seems solved if I provide another "bootstrap" nameserver that match only my NetBird domain (netbird.example.com) and resolves with a public DNS server.
Author
Owner

@penzoiders commented on GitHub (Feb 27, 2024):

I've found that my version of this issue "Android client not connecting with peers" is related to only specific kind of routes:
as long as you route private ranges (10.0.0.0/8,192.168.0.0/16 or 172.16.0.0/12) your Android client will connect just fine.

As soon as you add a public host route (151.23.52.1/32 for example) the client won't connect anymore, remove that "faulty" route and it will eventually be able to connect, ping peers and use private routes with no issues.

Is it possible that this is an Android-specific routing permissions related thing?

@penzoiders commented on GitHub (Feb 27, 2024): I've found that my version of this issue "Android client not connecting with peers" is related to only specific kind of routes: as long as you route private ranges (10.0.0.0/8,192.168.0.0/16 or 172.16.0.0/12) your Android client will connect just fine. As soon as you add a public host route (151.23.52.1/32 for example) the client won't connect anymore, remove that "faulty" route and it will eventually be able to connect, ping peers and use private routes with no issues. Is it possible that this is an Android-specific routing permissions related thing?
Author
Owner

@nilshee commented on GitHub (Mar 4, 2024):

Can confirm @penzoiders findings. After removing all public networks it works for the private ones just fine

@nilshee commented on GitHub (Mar 4, 2024): Can confirm @penzoiders findings. After removing all public networks it works for the private ones just fine
Author
Owner

@jumski commented on GitHub (Mar 12, 2024):

I have the same problem.
Also noticed that app registers new "hostnames" after reconnect.

@jumski commented on GitHub (Mar 12, 2024): I have the same problem. Also noticed that app registers new "hostnames" after reconnect.
Author
Owner

@Luxosity commented on GitHub (Mar 26, 2024):

Phone: Google Pixel 6a, Android 14
Netbird Android app: v.0.0.20, Netbird Agent: 0.25.6, Netbird Selfhosted

Having the same issue. Never worked for me. Reinstalled app and have the same issue. Shows its connected in the Admin portal. It also shows there is an update to 0.26.3 but unsure how to update the agent for the android app since 0.0.20 is the latest.

@Luxosity commented on GitHub (Mar 26, 2024): Phone: Google Pixel 6a, Android 14 Netbird Android app: v.0.0.20, Netbird Agent: 0.25.6, Netbird Selfhosted Having the same issue. Never worked for me. Reinstalled app and have the same issue. Shows its connected in the Admin portal. It also shows there is an update to 0.26.3 but unsure how to update the agent for the android app since 0.0.20 is the latest.
Author
Owner

@Pumba98 commented on GitHub (Mar 26, 2024):

I can confirm the issue described by DidZ0 and MatteoPaier with a DNS Server in a local network.
It works on all other platform except Android. I really hope for a fix on this, it's the only thing that blocks me from fully switching to netbird.

Is there anything we can provide to help fixing this?

@Pumba98 commented on GitHub (Mar 26, 2024): I can confirm the issue described by DidZ0 and MatteoPaier with a DNS Server in a local network. It works on all other platform except Android. I really hope for a fix on this, it's the only thing that blocks me from fully switching to netbird. Is there anything we can provide to help fixing this?
Author
Owner

@Pumba98 commented on GitHub (Mar 29, 2024):

I can confirm the issue described by DidZ0 and MatteoPaier with a DNS Server in a local network. It works on all other platform except Android. I really hope for a fix on this, it's the only thing that blocks me from fully switching to netbird.

Is there anything we can provide to help fixing this?

Seems like I was able to fix my issue by adding a 2nd public nameserver only for "stun.netbird.io" & "turn.netbird.io".

image

In the logs I saw the client failed to resolve those dns entries when establishing a connection to the peer running in my DNS network.

@Pumba98 commented on GitHub (Mar 29, 2024): > I can confirm the issue described by DidZ0 and MatteoPaier with a DNS Server in a local network. It works on all other platform except Android. I really hope for a fix on this, it's the only thing that blocks me from fully switching to netbird. > > Is there anything we can provide to help fixing this? Seems like I was able to fix my issue by adding a 2nd public nameserver only for "stun.netbird.io" & "turn.netbird.io". ![image](https://github.com/netbirdio/netbird/assets/48259092/1dca9640-2c58-4f09-901d-9e2dc11e4e03) In the logs I saw the client failed to resolve those dns entries when establishing a connection to the peer running in my DNS network.
Author
Owner

@adlion commented on GitHub (Jun 10, 2024):

+1
Pixel 7
Samsung A52 5G

@adlion commented on GitHub (Jun 10, 2024): +1 Pixel 7 Samsung A52 5G
Author
Owner

@mlsmaycon commented on GitHub (Jun 10, 2024):

Hello folks, can you please enable trace logs, reconnect and then share the logs with us for analysis?

To enable trace logs, you can go to the Advanced menu and ticky the enable trace log box:
Advanced menu

@mlsmaycon commented on GitHub (Jun 10, 2024): Hello folks, can you please enable trace logs, reconnect and then share the logs with us for analysis? To enable trace logs, you can go to the Advanced menu and ticky the enable trace log box: <img src="https://github.com/netbirdio/netbird/assets/7747744/32f0106a-fdf7-46f4-883e-3d7de43a58c5" alt="Advanced menu" width="200"/>
Author
Owner

@nilshee commented on GitHub (Aug 25, 2024):

Seems to be working now

@nilshee commented on GitHub (Aug 25, 2024): Seems to be working now
Author
Owner

@deB4SH commented on GitHub (Aug 30, 2024):

Still running into this issue - android device is not connecting to peers.

Android 13
Netbird Client 0.0.24

@deB4SH commented on GitHub (Aug 30, 2024): Still running into this issue - android device is not connecting to peers. Android 13 Netbird Client 0.0.24
Author
Owner

@nilshee commented on GitHub (Aug 30, 2024):

Still running into this issue - android device is not connecting to peers.

Android 13
Netbird Client 0.0.24

Which versions are you running for the other components?
Most likely an update around 0.28.8 fixed it for me.

@nilshee commented on GitHub (Aug 30, 2024): > Still running into this issue - android device is not connecting to peers. > > Android 13 > Netbird Client 0.0.24 Which versions are you running for the other components? Most likely an update around 0.28.8 fixed it for me.
Author
Owner

@v1rusnl commented on GitHub (Oct 9, 2024):

Hello folks, can you please enable trace logs, reconnect and then share the logs with us for analysis?

To enable trace logs, you can go to the Advanced menu and ticky the enable trace log box:

Clean install. Android 13, Galaxy Tab 6 Lite. Netbird selfhosted. All other peers including an Oppo Find X5 Pro with Android 14 connect fine.

netbird-1728498486226.log.txt

I can confirm the issue described by DidZ0 and MatteoPaier with a DNS Server in a local network. It works on all other platform except Android. I really hope for a fix on this, it's the only thing that blocks me from fully switching to netbird.
Is there anything we can provide to help fixing this?

Seems like I was able to fix my issue by adding a 2nd public nameserver only for "stun.netbird.io" & "turn.netbird.io".

In the logs I saw the client failed to resolve those dns entries when establishing a connection to the peer running in my DNS network.

But @Pumba98 is right. I had my NextDNS Public DNS Resolvers and my Fritzbox Router IP for internal DNS stuff additionally configured in control panel. As soon as I deleted the Fritzbox DNS for Home LAN, the Galaxy Tab began to connect to the other peers. Weird that I have another Android device which worked also with Fritzbox DNS activated.

@v1rusnl commented on GitHub (Oct 9, 2024): > Hello folks, can you please enable trace logs, reconnect and then share the logs with us for analysis? > > To enable trace logs, you can go to the Advanced menu and ticky the enable trace log box: Clean install. Android 13, Galaxy Tab 6 Lite. Netbird selfhosted. All other peers including an Oppo Find X5 Pro with Android 14 connect fine. [netbird-1728498486226.log.txt](https://github.com/user-attachments/files/17317131/netbird-1728498486226.log.txt) > > I can confirm the issue described by DidZ0 and MatteoPaier with a DNS Server in a local network. It works on all other platform except Android. I really hope for a fix on this, it's the only thing that blocks me from fully switching to netbird. > > Is there anything we can provide to help fixing this? > > Seems like I was able to fix my issue by adding a 2nd public nameserver only for "stun.netbird.io" & "turn.netbird.io". > > > > In the logs I saw the client failed to resolve those dns entries when establishing a connection to the peer running in my DNS network. But @Pumba98 is right. I had my NextDNS Public DNS Resolvers and my Fritzbox Router IP for internal DNS stuff additionally configured in control panel. As soon as I deleted the Fritzbox DNS for Home LAN, the Galaxy Tab began to connect to the other peers. Weird that I have another Android device which worked also with Fritzbox DNS activated.
Author
Owner

@MarcoLenschau commented on GitHub (Nov 19, 2024):

Hey can i help me please ? xD

When i connect with netbird from my android phone it's not working with mobile internet.
When i give hotspot for my Laptop and i connect my Laptop with netbird then it's work.
The android app works in my home network it's very funny and i can't say what the error might be.

Mobile Internet is only public V6 address and private V4 address.

Homelab Internet is Dual Stack so a Public V4 and V6 address.

VPS Internet is Dual Stack so a Public V4 and V6 address.

I love netbird it's perfect because i can all self hosting.

@MarcoLenschau commented on GitHub (Nov 19, 2024): Hey can i help me please ? xD When i connect with netbird from my android phone it's not working with mobile internet. When i give hotspot for my Laptop and i connect my Laptop with netbird then it's work. The android app works in my home network it's very funny and i can't say what the error might be. Mobile Internet is only public V6 address and private V4 address. Homelab Internet is Dual Stack so a Public V4 and V6 address. VPS Internet is Dual Stack so a Public V4 and V6 address. I love netbird it's perfect because i can all self hosting.
Author
Owner

@turnah commented on GitHub (Dec 23, 2024):

Same issue, works over WiFi but not mobile internet on Android app.

@turnah commented on GitHub (Dec 23, 2024): Same issue, works over WiFi but not mobile internet on Android app.
Author
Owner

@giraypultar commented on GitHub (Feb 2, 2025):

When I was first setting up the android client, I had entered a shared key, thinking that the shared key is the same as the setup key. My android was not working because of the shared key. Once, I removed the shared key, it started working.
Maybe this comment might help someone who made the same mistake.

@giraypultar commented on GitHub (Feb 2, 2025): When I was first setting up the android client, I had entered a shared key, thinking that the shared key is the same as the setup key. My android was not working because of the shared key. Once, I removed the shared key, it started working. Maybe this comment might help someone who made the same mistake.
Author
Owner

@lixmal commented on GitHub (Aug 5, 2025):

@mahehro This issue is already closed. If this is really about PSKs and not setup keys, please create a new GitHub issue

@lixmal commented on GitHub (Aug 5, 2025): @mahehro This issue is already closed. If this is really about PSKs and not setup keys, please create a new GitHub issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#526