Unable to play off local server without internet connection #439

Closed
opened 2026-04-24 23:23:03 +02:00 by adam · 30 comments
Owner

Originally created by @Jab2870 on GitHub (Feb 9, 2023).

I have various wall mounted tablets and similar devices dotted around my house that are on my local network, but do not have wider internet access. The ABS server is accessible to them. However, I am unable to connect to it as the Android app checks for internet connectivity before logging into the serve.

Could the app attempt to connect to the specified ABS server, rather than the generic connectivitycheck.gstatic.com?

Originally created by @Jab2870 on GitHub (Feb 9, 2023). I have various wall mounted tablets and similar devices dotted around my house that are on my local network, but do not have wider internet access. The ABS server is accessible to them. However, I am unable to connect to it as the Android app checks for internet connectivity before logging into the serve. Could the app attempt to connect to the specified ABS server, rather than the generic connectivitycheck.gstatic.com?
adam added the bug label 2026-04-24 23:23:03 +02:00
adam closed this issue 2026-04-24 23:23:03 +02:00
Author
Owner

@advplyr commented on GitHub (Feb 9, 2023):

I don't know what you mean. I don't think there are generic connectivity checks. When you put in your server address there is a ping request sent to your server. If it responds then you can login.

@advplyr commented on GitHub (Feb 9, 2023): I don't know what you mean. I don't think there are generic connectivity checks. When you put in your server address there is a ping request sent to your server. If it responds then you can login.
Author
Owner

@Jab2870 commented on GitHub (Feb 9, 2023):

No. On the login form, the login button is replaced by a "No Internet" button that I can't push.

@Jab2870 commented on GitHub (Feb 9, 2023): No. On the login form, the login button is replaced by a "No Internet" button that I can't push.
Author
Owner

@advplyr commented on GitHub (Feb 9, 2023):

Oh. Maybe a bug then I will see

@advplyr commented on GitHub (Feb 9, 2023): Oh. Maybe a bug then I will see
Author
Owner

@Jab2870 commented on GitHub (Feb 9, 2023):

image
Here you go. This should demonstrate the issue

@Jab2870 commented on GitHub (Feb 9, 2023): ![image](https://user-images.githubusercontent.com/1909202/217791771-029692f5-8aa0-47fc-9822-0d6855c06a61.png) Here you go. This should demonstrate the issue
Author
Owner

@Jab2870 commented on GitHub (Feb 9, 2023):

If I click "Add new server", I get the "No internet" button

@Jab2870 commented on GitHub (Feb 9, 2023): If I click "Add new server", I get the "No internet" button
Author
Owner

@Jab2870 commented on GitHub (Feb 9, 2023):

So, to add a little bit more to this. I have set up my local DNS server to point connectivitycheck.gstatic.com to a web server on my local network. The ABS app now works as expected, so I think I can say confidently that somewhere, a request to that domain is being made to verify connectivity.

@Jab2870 commented on GitHub (Feb 9, 2023): So, to add a little bit more to this. I have set up my local DNS server to point connectivitycheck.gstatic.com to a web server on my local network. The ABS app now works as expected, so I think I can say confidently that somewhere, a request to that domain is being made to verify connectivity.
Author
Owner

@advplyr commented on GitHub (Feb 9, 2023):

Must be yeah, we are using a capacitor plugin for the frontend network connectivity check.
We'll probably need to replace that plugin and setup something native.

@advplyr commented on GitHub (Feb 9, 2023): Must be yeah, we are using a capacitor plugin for the frontend network connectivity check. We'll probably need to replace that plugin and setup something native.
Author
Owner

@yuuzhan commented on GitHub (Feb 11, 2023):

I know that this has happened for me with other apps. @Jab2870 are you able to remove the local DNS entry so it stops working again, then turn off your Data connection on your phone (while connected to wifi still) and try to have the app connect?

Some apps try to be "smart" and it senses that there is no internet on the wifi so it switches to a Data connection (which when you are trying to do local connections is a dumb thing to do).

@yuuzhan commented on GitHub (Feb 11, 2023): I know that this has happened for me with other apps. @Jab2870 are you able to remove the local DNS entry so it stops working again, then turn off your Data connection on your phone (while connected to wifi still) and try to have the app connect? Some apps try to be "smart" and it senses that there is no internet on the wifi so it switches to a Data connection (which when you are trying to do local connections is a dumb thing to do).
Author
Owner

@Jab2870 commented on GitHub (Feb 11, 2023):

So, the device I was using has no sim card so there is no way that it was doing anything other than wifi @yuuzhan

@Jab2870 commented on GitHub (Feb 11, 2023): So, the device I was using has no sim card so there is no way that it was doing anything other than wifi @yuuzhan
Author
Owner

@advplyr commented on GitHub (Feb 12, 2023):

I took a look at the plugin and it just using the regular Android Connectivity Manager api to check for connection. This will need to be investigated further by seeing what info the connectivity manager is returning in this instance.

@advplyr commented on GitHub (Feb 12, 2023): I took a look at the plugin and it just using the regular Android Connectivity Manager api to check for connection. This will need to be investigated further by seeing what info the connectivity manager is returning in this instance.
Author
Owner

@Jab2870 commented on GitHub (Feb 14, 2023):

Strange...

Please let me know if there is anything else I can do to assist with this then.

@Jab2870 commented on GitHub (Feb 14, 2023): Strange... Please let me know if there is anything else I can do to assist with this then.
Author
Owner

@C3POH2SO4 commented on GitHub (Feb 16, 2023):

Hi there,

had the same Problem...

Made a Blocking group in my Pi-Hole wich blocks all DNS Querrys with a "." in it. -> Everything to Internet is Blocked.
Then made a Whitelist with some entry's like "(.|^)antolin.de$".

App won't show login due Android "Online" checks !

So what i did on my side was following:

  • Disabled WiFi on my Android Tab
  • Opened Live Query's on Pi-hole (on second device) and set a filter for affected device to see blocked query's.
  • Enabled Wifi and checked logs.

In my case (FireHD10) the DNS query for online check is "tabletcaptiveportal.com" -> After whitelisting that, the app login works again. ;-)

@C3POH2SO4 commented on GitHub (Feb 16, 2023): Hi there, had the same Problem... Made a Blocking group in my Pi-Hole wich blocks all DNS Querrys with a "." in it. -> Everything to Internet is Blocked. Then made a Whitelist with some entry's like "(\.|^)antolin\.de$". App won't show login due Android "Online" checks ! So what i did on my side was following: - Disabled WiFi on my Android Tab - Opened Live Query's on Pi-hole (on second device) and set a filter for affected device to see blocked query's. - Enabled Wifi and checked logs. In my case (FireHD10) the DNS query for online check is "tabletcaptiveportal.com" -> After whitelisting that, the app login works again. ;-)
Author
Owner

@GuyverFX commented on GitHub (Nov 30, 2023):

So is there a Fix for this? Do I need to put in DNS entries to resolve back to my server just to get this to work?
I only have this issue when my internet is down and honestly cant see why you would ever do a external dns call to validate connectivity.

@GuyverFX commented on GitHub (Nov 30, 2023): So is there a Fix for this? Do I need to put in DNS entries to resolve back to my server just to get this to work? I only have this issue when my internet is down and honestly cant see why you would ever do a external dns call to validate connectivity.
Author
Owner

@GuyverFX commented on GitHub (Nov 30, 2023):

I read another article in this chain (see below) and disabling a phones internal process to bypass a application dependency is not a solution but a workaround. Dont get me wrong, thanks for the information but any workaround could have other unintended impacts due to that change being in the android OS. The application is making that check dependent for itself before functioning.

Trick is to bypass this check by running the following command in ADB shell of the your Android device which is either not connected to the internet or Google's DNS is blocked at firewall level:

settings put global captive_portal_mode 0

@GuyverFX commented on GitHub (Nov 30, 2023): I read another article in this chain (see below) and disabling a phones internal process to bypass a application dependency is not a solution but a workaround. Dont get me wrong, thanks for the information but any workaround could have other unintended impacts due to that change being in the android OS. The application is making that check dependent for itself before functioning. Trick is to bypass this check by running the following command in ADB shell of the your Android device which is either not connected to the internet or Google's DNS is blocked at firewall level: settings put global captive_portal_mode 0
Author
Owner

@hobesman commented on GitHub (Dec 2, 2023):

It seems like one solution would be for the app instead of disabling the sign in button, just say "You don't appear to be online. Attempt connection anyway?" And let the user override it.

@hobesman commented on GitHub (Dec 2, 2023): It seems like one solution would be for the app instead of disabling the sign in button, just say "You don't appear to be online. Attempt connection anyway?" And let the user override it.
Author
Owner

@xarath commented on GitHub (Feb 2, 2024):

I had the same problem and I can confirm that @GuyverFX 's workaround is working for me.

Here are the steps I used:

  1. Enable developper options
  2. Enable USB debugging
  3. Connect phone to PC and run adb shell in PC's terminal
  4. In adb shell: settings put global captive_portal_mode 0
  5. Restart phone

App version: v0.9.71-beta

@xarath commented on GitHub (Feb 2, 2024): I had the same problem and I can confirm that @GuyverFX 's workaround is working for me. Here are the steps I used: 1. Enable developper options 2. Enable USB debugging 3. Connect phone to PC and run `adb shell` in PC's terminal 4. In adb shell: `settings put global captive_portal_mode 0` 5. Restart phone App version: v0.9.71-beta
Author
Owner

@stratus-ss commented on GitHub (Feb 28, 2024):

This work around doesn't really scale. Or at least it's kind of a pain and it may get reset in the future.

I have a couple of tablets that I use ABS with and they all experience this problem. I might use the ADB route but it is not ideal

@stratus-ss commented on GitHub (Feb 28, 2024): This work around doesn't really scale. Or at least it's kind of a pain and it may get reset in the future. I have a couple of tablets that I use ABS with and they all experience this problem. I might use the ADB route but it is not ideal
Author
Owner

@Jab2870 commented on GitHub (Feb 29, 2024):

@stratus-ss

I mentioned a much more scalable solution earlier that I use. I have set up my local DNS server to point connectivitycheck.gstatic.com to a web server on my local network which solves the problem.

The relevant part of my nginx config is:

server {
    listen       80;
    listen  [::]:80;

    server_name          connectivitycheck.gstatic.com;

    location / {
            return 204;
    }
}
@Jab2870 commented on GitHub (Feb 29, 2024): @stratus-ss I mentioned a much more scalable solution earlier that I use. I have set up my local DNS server to point connectivitycheck.gstatic.com to a web server on my local network which solves the problem. The relevant part of my nginx config is: ```nginx server { listen 80; listen [::]:80; server_name connectivitycheck.gstatic.com; location / { return 204; } } ```
Author
Owner

@stratus-ss commented on GitHub (Mar 1, 2024):

That's an interesting solution. I could even use a vhost on the server ABS is running on. If apache is down on the ABS server, ABS isnt going to work anyways.

Thanks for the tip!

@stratus-ss commented on GitHub (Mar 1, 2024): That's an interesting solution. I could even use a vhost on the server ABS is running on. If apache is down on the ABS server, ABS isnt going to work anyways. Thanks for the tip!
Author
Owner

@skyzuma commented on GitHub (Apr 5, 2024):

0.9.73-beta ... no internet, no login on local IP ...

@skyzuma commented on GitHub (Apr 5, 2024): 0.9.73-beta ... no internet, no login on local IP ...
Author
Owner

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

Same issue here. I like the idea of allowing the user to attempt the connection anyway, most of us know what we are doing as we are all fiddling with containers and all sorts of other self hosted stuff anyway. Devices bound to local network access only are quite common.

Great to see a work around, going to update my local Bind with that..

Update : Have nginx up and running, curling http://connectivitycheck.gstatic.com returns a 204 (so does any path under that host) and yet my galaxy tab a still says there is no internet connectivity and audiobookshelf client still won't let me connect to a local server...

@nrjohnstone commented on GitHub (Jun 21, 2024): Same issue here. I like the idea of allowing the user to attempt the connection anyway, most of us know what we are doing as we are all fiddling with containers and all sorts of other self hosted stuff anyway. Devices bound to local network access only are quite common. Great to see a work around, going to update my local Bind with that.. Update : Have nginx up and running, curling http://connectivitycheck.gstatic.com returns a 204 (so does any path under that host) and yet my galaxy tab a still says there is no internet connectivity and audiobookshelf client still won't let me connect to a local server...
Author
Owner

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

@nrjohnstone - can you see what it is trying to connect to? I believe amazon devices try to connect to something amazon owned, it wouldn't surprise me all that much if Samsung also had a domain they used. Easiest way is probably to look at dns requests if you have a pi hole or similar set up. Failing that you could try wireshark although you'll have to hunt through a lot of junk to find what you want. Also make sure your samsung device is using your dns resolver.

@Jab2870 commented on GitHub (Jun 21, 2024): @nrjohnstone - can you see what it is trying to connect to? I believe amazon devices try to connect to something amazon owned, it wouldn't surprise me all that much if Samsung also had a domain they used. Easiest way is probably to look at dns requests if you have a pi hole or similar set up. Failing that you could try wireshark although you'll have to hunt through a lot of junk to find what you want. Also make sure your samsung device is using your dns resolver.
Author
Owner

@upais commented on GitHub (Jul 12, 2024):

Internet checking in the Network.java file has been removed.
Attached is the file itself for self-build and the builded apk version 0.9.4.
MOD_no_check_internet.zip

@upais commented on GitHub (Jul 12, 2024): Internet checking in the Network.java file has been removed. Attached is the file itself for self-build and the builded apk version 0.9.4. [MOD_no_check_internet.zip](https://github.com/user-attachments/files/16193978/MOD_no_check_internet.zip)
Author
Owner

@Tobsic commented on GitHub (Aug 7, 2024):

I would really appreciate if the check gets removed. I try to get ABS connect to a server that is accessible through a Wireguard VPN. On one phone (Oneplus) that works as expected, on another phone (Samsung Galaxy A5) it fails. When the phone was in the same network, it could just connect to the local IP. But now that it is in another network, it needs the VPN and a new connection entry. The form to add a new connection is disabled as soon as I connect to the VPN. The internet is working fine (everything gets resolved as usual, only the ABS server is reachable by its IP). I don't understand why the online check fails. But I also don't know why this check prevents an attempt to login.

Please remove the online check or make it non-blocking 🙏

@Tobsic commented on GitHub (Aug 7, 2024): I would really appreciate if the check gets removed. I try to get ABS connect to a server that is accessible through a Wireguard VPN. On one phone (Oneplus) that works as expected, on another phone (Samsung Galaxy A5) it fails. When the phone was in the same network, it could just connect to the local IP. But now that it is in another network, it needs the VPN and a new connection entry. The form to add a new connection is disabled as soon as I connect to the VPN. The internet is working fine (everything gets resolved as usual, only the ABS server is reachable by its IP). I don't understand why the online check fails. But I also don't know why this check prevents an attempt to login. Please remove the online check or make it non-blocking :pray:
Author
Owner

@stratus-ss commented on GitHub (Aug 8, 2024):

I would consider adding a small bounty to this if ABS has bug bounties

@stratus-ss commented on GitHub (Aug 8, 2024): I would consider adding a small bounty to this if ABS has bug bounties
Author
Owner

@zzyzx-dc commented on GitHub (Aug 26, 2024):

I just ran into this issue too. Samsung Galaxy phone - ABS reports no network, and will not let the on-screen keyboard come up.

Disconnecting temporarily from the VPN allows you to pull up a keyboard and enter the URL. Then reconnecting the VPN instantly causes ABS to revert back to "No network connection" and you cannot submit the URL. So is the network connectivity check running continuously?

The VPN is the only way to connect to the ABS instance.

I reviewed the workarounds but reluctant to reroute connectivity checks for every device on my LAN just to avoid this.

I'm curious why does the app do a connectivity check at all? Just let it try to access the server and fail if there's no network. I do not have this issue with other selfhosted servers and their accompanying apps.

@zzyzx-dc commented on GitHub (Aug 26, 2024): I just ran into this issue too. Samsung Galaxy phone - ABS reports no network, and will not let the on-screen keyboard come up. Disconnecting temporarily from the VPN allows you to pull up a keyboard and enter the URL. Then reconnecting the VPN instantly causes ABS to revert back to "No network connection" and you cannot submit the URL. So is the network connectivity check running continuously? The VPN is the only way to connect to the ABS instance. I reviewed the workarounds but reluctant to reroute connectivity checks for every device on my LAN just to avoid this. I'm curious why does the app do a connectivity check at all? Just let it try to access the server and fail if there's no network. I do not have this issue with other selfhosted servers and their accompanying apps.
Author
Owner

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

Is the network check really providing enough value to warrant this anyway? It should be a warning at most, not a block.

@ashanrath commented on GitHub (Sep 5, 2024): Is the network check really providing enough value to warrant this anyway? It should be a warning at most, not a block.
Author
Owner

@stratus-ss commented on GitHub (Sep 9, 2024):

IMHO there is no value in this network check. Checking the destination resolves the IP or that you can ping the endpoint specifically has value, but a general internet check has no value in an self hosted app you want to use offline

@stratus-ss commented on GitHub (Sep 9, 2024): IMHO there is no value in this network check. Checking the destination resolves the IP or that you can ping the endpoint specifically has value, but a general internet check has no value in an self hosted app you want to use offline
Author
Owner

@tshimalatji commented on GitHub (Oct 22, 2024):

Internet checking in the Network.java file has been removed. Attached is the file itself for self-build and the builded apk version 0.9.4. MOD_no_check_internet.zip

This worked for me. I will use this version until they update the official release with this feature. Thank you!

@tshimalatji commented on GitHub (Oct 22, 2024): > Internet checking in the Network.java file has been removed. Attached is the file itself for self-build and the builded apk version 0.9.4. [MOD_no_check_internet.zip](https://github.com/user-attachments/files/16193978/MOD_no_check_internet.zip) This worked for me. I will use this version until they update the official release with this feature. Thank you!
Author
Owner

@github-actions[bot] commented on GitHub (Nov 6, 2024):

Fixed in v0.9.77-beta.

@github-actions[bot] commented on GitHub (Nov 6, 2024): Fixed in [v0.9.77-beta](https://github.com/advplyr/audiobookshelf-app/releases/tag/v0.9.77-beta).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#439