How to best deal with captive portals and outdated browser

The issue with connman is, that the android layer is sometimes loosing connection when switching networks.

1 Like

NO! This one works “fine” with the default browser, just does not work with the android browser fennec. It kind of needs the 4G turned off to make sure i actually go to that portal and not use my dataplan.

And i know several “no SSL” sites. So this issue here is really “meta” with me not being able to tell for sure. What seems sure is that the sailfish browser is often not capable enough to deal with weird js. And that the routing prios are off, so you do not get that portal and end up using your data.

And for the “js” part of the story i would certainly blaim the default browser. There are like so many “sophisticated” websites for which i have to resort to an android browser already. It is just a real bummer when your portal ends up being one of them … and maybe you do not even have a signal.

You simply get no internet! While all old android phones and other devices will just happily connect.

A smartphone with no internet is really bad in my book. I can suffer a lot of pains, but that is not one of them.

Did I give you any reason to yell at me?

Maybe asking for help nicely would have helped.

1 Like

Given i was pissed off and not so nice. But the issue remains, and i keep hearing that the problem is known. So i have to assume that others have asked nicely before me and nothing happened.

Where connman might help is with DNS resolution prios, not sure what happened on that end since sailfish last updated. Once dual-homed (4G and portal wifi) one actually wants to do DNS for the “portal browser” only via WiFi and take it from there.

I am still traveling and visiting such portalled WiFis (seem to be very common in NZ) and still always have issues with my phone. The best workaround is to make sure to turn off mobile data (nasty because you have to remember to turn it back on), and visit a site that is http-only with the sailfish browser. If the sailfish browser can not handle the portal … you are out of luck, android browsers will not be able to jump in.

2 Likes

And you made sure that fennec is still not working after restarting appsupport? (on the 10ii it used to be flightmode, restart networking, flightmode off, may also try that)

What i am talking about relates to those issues: Android Mobile Data Connectivity Broken (they are not mobile only)

1 Like

Having people abusing folk in the forums that are looking for help with the product is a major disadvantage to Jolla, sadly, given that it’s the main/only source of support available.
I’m not sure whether that’s the point of people doing it but …

5 Likes

Agree. Even if it’s only because it’s what a decent human being does, be nice to the newcomers.

Both firefox and fennec will claim “no internet” and not open the portal. When i use an IP instead of a name it seems to “kind of work” but the redirect uses a name and i am back to “no internet”.

So android browsers do not seem to cut it.

I invite anyone to simply try. Should not be too hard to find a portal near you, you do not even need credentials to log in.

You will see:

  1. portal redirect does not work reliable while you still have data on your mobile
  • both in the special portal browser and the browser
  1. portal detection likely fails in like 30+% of the cases while you still have data on
  2. android browsers will not be able to open the portal at all, so if you needed a modern browser to pass the portal … well you shall not
1 Like

How did I not know about this?! Absolute game changer! Thank you gabrielg, this is super useful.

@hennsch I for one am glad to see this question pop up, I have searched before myself but was never sure what exactly to search for, so appreciate seeing this today.

1 Like

An attempt to solve issues with captive portals in easy way:

CPH

Due to testing limited opportunities a feedback is welcome.

3 Likes

I did not try it but looked at the code. To me it looks like it will try to reach a http server on the first “nameserver” entry found in resolv.conf. This can potentially help but seems wrong.

In case one can see multiple “nameserver” entries, how would one be sure to choose the WiFi one?
The assumption that the portal is on the same IP as DNS might not be true for every network, probably especially those with demanding portals.

No, this is the idea.

Every nameserver is the WiFi one. This file is created by connmand from DNS provided by WiFi DHCP. Should someone edited it manualy then he surely knows what to do.

No, captive portal should not be on the same IP but captive portal have to allow DNS IP that provides to connect to. It is enough to redirect this request to captive portal page.
I strongly suggest you to test it.

1 Like

I am not using sailfish OS any longer. Except for playing around at home, where captive portals are no issue and the device has no SIM which probably makes tests rather unrealistic.

I also had resigned regarding SF browser and therefore installed Fennec from F-Droid. Fennec also includes direct installation of uBlock Origin out of the box in Extensions menu. Now I have a full functional browser on Sailfish device.

1 Like

As discussed before Android browsers will not help to visit and pass portals. They will show “no internet” instead of the portal.

It means that you are wasting my time.

2 Likes

OK, if an access point’s captive portal requests the browser, and Sailfish Browser launches.
This is surely done by a ‘terminal’ command like ‘sailfish-browser’ or the full
‘/usr/bin/invoker --type=browser,silica-qt5 -A – /usr/bin/sailfish-browser %U’, as it’s written in the ‘/usr/share/applications/sailfish-browser.desktop’ flie.

Q1: What is the cli command to start Fennec by cli?
Q2: Where is the launcher command defined that a captive portal sends to open the browser?

Goal is to force captive portals to open Fennec and not the outdated stock browser.

I can’t find the .desktop files for Android apps! Where are they?

1 Like

/home/defaultuser/.local/share/applications

1 Like

I suggest you try Fennec for a portal, or maybe 3 different ones, manually first. You will likely not want to make it the default portal browser after that experiment.

When trying the same portal with multiple browsers, make sure to change your MAC before each attempt.