OS think's I'm offline even though i'm not - captive portal server?

I am not suffering from this issue but I notice that on an Android 13 (T) build the system app CaptivePortalLogin does not exist, while it is present in my Android 11 (R) phone.

As a test (on R) I went to Settings > Apps and notifications > See all … apps > Top right 3 dot menu, Show system > CaptivePortalLogin

and disabled the app. Despite a warning that the phone may not work as intended, the phone seems ok in a short test.

If you were to try this disabling of CaptivePortalLogin does it have any effect? Does it seem connected with the problem?

1 Like

No offence @aibd but i tried what you said despite copying what strangers on the internet say not being a good idea.
“Disable” was greyed out so i hit “force stop”. After that both buttons were no longer greyed out, but pressing them did not seem to do anything. I restarted the phone, but the buttons still do not do anything.
Nothing seems to have changed for the better or worse.

Update: there was a negative consequence.
Before the change, it was possible to connect to open networks like at the train station or some businesses. For these networks the internet behaved normally. The last couple of days i have used them to sync my cals and update an app or two if possible.
Since making the change @aibd suggested, this is no longer working. CaptivePortalLogin still shows “disable” and “force stop”.
Any idea how i can re-enable it?
My keyboard is also misbehaving. Is this coincidence, or could it be related? Specifically, swipe typing and word suggestions no longer work.

The keyboard started working again, so either that was not related, or CaptivePortalLogin kicked in again.

Hi,

I also fixed it by updating my /e/OS from v1.7-20230110250404 to 2.0. I tried with “Easy installer” but I was blocked in a step “restart in bootloader mode”. So I followed these steps :

  1. I downloaded e-2.0-s-20240506399550-stable-coral.zip
  2. I restarted the device in recovery mode
  3. I followed the manual process (https://doc.e.foundation/devices/coral/install) from “Steps to install /e/OS from recovery” > “Install /e/OS” without doing the “Format the device” and “Locking the bootloader” part. I haven’t lost my data. All seems good.

My bootloader was already unlocked and the command “fastboot devices” return nothing I can’t relock it.

I am pleased to hear the difficulty seems not so long lasting!

None taken, thanks for testing.

Two commands which might help diagnose the situation

I had run this on my device, might throw light if needed by anyone else

$ adb shell
bacon:/ $ ls /system/app
...
CaptivePortalLogin
...

bacon:/ $ pm list packages -e    # list enabled packages
...
package:com.android.captiveportallogin
...

My reading of this rather complex page https://developer.android.com/about/versions/11/features/captive-portal is “things have moved on” and many leads on the internet regarding this blocker may not get us very far.

Interesting, as these networks might have included a certain redirect which provided some sort of short cut to the “blocker”.

This, as I understand it, is a link from “the old technology”

Different browsers will maybe handle this link in different ways, but I wonder again if, on a “problem device”, this redirect might lift / bypass “no internet”.

On Windows PC this would quite likely be a drivers issue, where the required “combination driver” was not installed. Should be fixed with running Windows update while the phone is connected in fastboot mode.

Any time you lock or unlock the bootloader the phone will format data. Your data will not be preserved.

2 Likes

I tried to search drivers updates from the “windows update” (optionnal updates), but all my drivers are already up to date (I’m doing that on my company’s laptop, maybe there is some policies…).

Any time you lock or unlock the bootloader the phone will format data. Your data will not be preserved.
Thanks for this information.

The need or not of drivers would be indicated in Device manager; further drivers only required if the phone in fastboot mode shows up as a " :warning: Problem device".

there was a negative consequence.

I am pleased to hear the difficulty seems not so long lasting!

Thanks aibd. The open networks are working again now. Strangly, my keyboard is misbehaving again though.

This must be a coincidence right?
I’m using AnysoftKeyboard.

I hope so. With a Samsung sometimes a Soft reset can close down unwanted behaviour. Power + Volume down for 10 seconds or more.

uh, one of the connectivity check urls isn’t responding. Does it check for user-agent (java something)? The subdomain 204 is fine. Is that one phased out? cc @arnauvp

Failed to connect to connectivity.ecloud.global port 80 after 134236 ms: Couldn't connect to server

log
~$ for url in connectivity.ecloud.global 204.ecloud.global;  do curl "$url" -I -v; done
* Host connectivity.ecloud.global:80 was resolved.
* IPv6: 2001:41d0:304:100::672
* IPv4: 51.91.138.20
*   Trying [2001:41d0:304:100::672]:80...
*   Trying 51.91.138.20:80...
* connect to 2001:41d0:304:100::672 port 80 from 2001:1a81:5370:a000:b210:4f66:af11:7fb3 port 50018 failed: Die Wartezeit für die Verbindung ist abgelaufen
* connect to 51.91.138.20 port 80 from 192.168.1.101 port 33400 failed: Die Wartezeit für die Verbindung ist abgelaufen
* Failed to connect to connectivity.ecloud.global port 80 after 134236 ms: Couldn't connect to server
* Closing connection
curl: (28) Failed to connect to connectivity.ecloud.global port 80 after 134236 ms: Couldn't connect to server
* Host 204.ecloud.global:80 was resolved.
* IPv6: 2a01:4f8:1c17:4e10:d00b::2
* IPv4: 157.90.154.178
*   Trying [2a01:4f8:1c17:4e10:d00b::2]:80...
* Connected to 204.ecloud.global (2a01:4f8:1c17:4e10:d00b::2) port 80
> HEAD / HTTP/1.1
> Host: 204.ecloud.global
> User-Agent: curl/8.7.1
> Accept: */*
> 
* Request completely sent off
< HTTP/1.1 204 No Content
HTTP/1.1 204 No Content
< cache-control: no-cache
cache-control: no-cache
< 

* Connection #0 to host 204.ecloud.global left intact
3 Likes

There was no indication that drivers were required or any thing that show “Problem device”. Whatever now my device is updated thanks for your help :slight_smile:

Hi aibd, I am not sure what I should do with this link. I have clicked on it when on a secure wifi and also on a public wifi. If I click on it normally, nothing happens, if I open in a new tab, I get a blank page.

Is the test now complete, or was I supposed to do something more?

set either that google url or 204.ecloud.global via adb as described in https://gitlab.e.foundation/e/backlog/-/issues/1429#note_109784 to have working connectivity-checks again.

Newer lineage/android moved the code and offers to disable it altogether in a setup wizard (see further up the comment - that too is a valid fix I guess).

3 Likes

I am still facing the same problem.
I have tried connecting my phone to my Linux computer and typing the adb commands from the link above (https://gitlab.e.foundation/e/backlog/-/issues/1429#note_109784)
I also installed captiveportalcontroller and enabled it after typing adb shell.
I could then enter the URLs again, this time from my phone, but I still have the same cross on my wifi and mobile internet symbols after turning them off and on again and after a restart and a soft rest by holding down power and volume down. Here are the URLs I used:
http://204.ecloud.global # captive_portal_fallback_url
http://ecloud.global/generate_204 # captive_portal_other_fallback_urls
https://connectivity.ecloud.global # captive_portal_https_url
http://connectivity.ecloud.global # captive_portal_http_url
from the same link.
I feel I am somehow missing a step, or that I am entering the wrong URLs.
I feel a bit silly.
Can someone please help me out?

… Deleted broken link

1 Like

your not missing a step, read more closely - the 1429 gitlab issue is old, it is this url that rode into the sunset. Use any of the other ones or change to the murena.io domain where it says ecloud.global altogether.

these work (http or https)

connectivity.murena.io
204.murena.io
murena.io/generate_204
2 Likes

Thanks for the help @aibd and @tcecyk. You have both given a lot of useful advice over several threads, needing to repeat yourselves quite a lot. You have replied to my questions and to others with the same issues and I genuinely appreciate the help.
However, I do not feel any less silly :frowning:
I have got it working on my phone now. I used the defaults from the captiveportalcontroller app and they seem to work. I do not know why, or how or if they are good alternatives or if they are privacy respecting ones.
@aibd, the post you linked to just says to use custom servers. For someone of my knowledge this is really not enough info.
@tcecyk, you provide three links for four slots in the app. Can we simply pick 2 with http:// at the beginning and 2 with https:// and put them into any of the relevant positions.
I will try just that now, but I feel that you could be a little clearer in case someone else is just as silly as me :wink:

thanks to @tcecyk @poiuzzz @aibd @4nthony for the solution

Résumé