Browser - not working alongside dnsmask

I had dnsmask on my system which seems to be requirement for waydroid which I’m trying to play with.
After removing dnsmask of course some parts of waydroid has been removed.

The solution you ask me to mark is not actually 100% valid. A valid one would be situation where dnsmask wouldn’t need to be removed from the system. And instead some configuration would need to be added.

Hence I’ll wait till someone will find out how to make changes to dnsmaks so it doesn’t break browser, only after that I’ll make that reply as a solution. Because right now we have a workaround which is not proper solution.

1 Like

In this case, I invite you to update your bug report and add missing information.
Thank you :slight_smile:

done :slight_smile:

Post must be at least 20 characters

I edited the title to correspond the reality. Can you please update the section PRECONDITIONS? Have you only installed dnsmask? Did you applied some other modification? You have waydroid installed? Can you add all these information under this section? Aim is, if someone with no idea see your bug report understand it and can reproduce it easily.
:slight_smile:

sorry for very very late reply, I can’t edit the post I don’t see option for that :frowning:

On trying this: ‘pkcon remove dnsmasq’ it wanted to do this:

[root@VollaPhone defaultuser]# pkcon remove dnsmasq
Auflösen
Abfragen
Änderungen werden getestet
Fertig [ ] (0%)
Die folgenden Pakete müssen entfernt werden:
dnsmasq-2.86-1.4.1.jolla.aarch64 A lightweight DHCP/caching DNS server
waydroid-1.2.0+git6-1.6.1.jolla.noarch Container-based approach to boot a full Android system
waydroid-gbinder-config-hybris-1.2.0+git6-1.6.1.jolla.noarch gbinder config for hybris ports
waydroid-runner-0.3.1-1.4.1.jolla.aarch64 Waydroid session wrapper
Mit Änderungen fortfahren? [N/y] N

Die Transaktion wurde nicht weitergeführt.

Schwerwiegender Fehler: user declined simulation
[root@VollaPhone defaultuser]#

So I aborted. Waydroid survived, but browser has still no address resolution.
@lolek I’ll also better wait now, too.

@akikyo Starting the browser by typing ‘sailfish-browser’ in CLI also works fine on my Volla.

edit: where are the app grid starters stored? Aren’t there some options or arguments how to start an app by tapping on the icon?

I’m not waiting I removed dnsmasq as I don’t need waydroid. I was only testing it.

1 Like

As interim solution I made an alias in ~/.profile:
alias sfb=‘sailfish-browser’

So I can easily start the browser by CLI until the problem is solved.

edit: the other affected app, AllRadio, can be launched in the same way by CLI and this alias in ~/.profile:
alias radio=‘harbour-allradio’

When operating from laptop, this messages appear on the CLI, I hope this may help to find the bug.

Browser:

[defaultuser@VollaPhone ~]$ sfb
[D] unknown:0 - Using Wayland-EGL
library “libpq_cust.so” not found
greHome from GRE_HOME:/usr/bin
libxul.so is not found, in /usr/bin/libxul.so
Created LOG for EmbedLiteTrace
[D] onCompleted:105 - ViewPlaceholder requires a SilicaFlickable parent
Created LOG for EmbedLite
Created LOG for EmbedPrefs
Created LOG for EmbedLiteLayerManager

/# Browser is up and working now
/# after closing Browser, the following lines appear:

Call EmbedLiteApp::StopChildThread()
[defaultuser@VollaPhone ~]$

Allradio:

[defaultuser@VollaPhone ~]$ radio
[W] unknown:0 - SailfishApp::application() called multiple times
[D] unknown:0 - Using Wayland-EGL
library “libpq_cust.so” not found
[W] unknown:166 - file:///usr/share/harbour-allradio/qml/pages/Favorites.qml:166:32: Unable to assign [undefined] to QString
[W] unknown:166 - file:///usr/share/harbour-allradio/qml/pages/Favorites.qml:166:32: Unable to assign [undefined] to QString
[W] unknown:166 - file:///usr/share/harbour-allradio/qml/pages/Favorites.qml:166:32: Unable to assign [undefined] to QString
[W] unknown:166 - file:///usr/share/harbour-allradio/qml/pages/Favorites.qml:166:32: Unable to assign [undefined] to QString
[D] onStatusChanged:236 - STATUS2
[D] onReadyChanged:54 - http://stream01.superfly.fm:8080/live128
[D] onStatusChanged:236 - STATUS4
[D] onStatusChanged:236 - STATUS1

/# Radio is up and playing now
/# on changing stations, some messages appear

onStatusChanged:236 - STATUS2
[D] onStatusChanged:236 - STATUS4
[D] onStatusChanged:236 - STATUS1
[D] onStatusChanged:236 - STATUS2
[D] onReadyChanged:54 - http://i.streams.ovh:9521/stream
[D] onStatusChanged:236 - STATUS4

/# after closing AllRadio, the following lines appear:

Segmentation fault (core dumped)
[defaultuser@VollaPhone ~]$

I hope this small report may help.

edit: Experiments revealed: it was the Sailjail thing.

Adding

[X-Sailjail]
Sandboxing=Disabled

to the application starter file in

/usr/share/applications/

did it. Allradio and Browser now working as usual.

I am getting the same issue with Pro1x on 4.4.0.64, and unfortunately Waydroid seems to depend on dnsmasq so while uninstalling it fixes the browser, it comes with a significant cost:

[root@Pro1-X defaultuser]# pkcon remove dnsmasq
Resolving
Querying
Testing changes
Finished  [    ] (0%)
The following packages have to be removed:
 dnsmasq-2.86-1.4.2.jolla.aarch64    A lightweight DHCP/caching DNS server
 waydroid-1.2.0+git6-1.6.2.jolla.noarch    Container-based approach to boot a full Android system
 waydroid-gbinder-config-hybris-1.2.0+git6-1.6.2.jolla.noarch    gbinder config for hybris ports
 waydroid-runner-0.3.1-1.4.2.jolla.aarch64    Waydroid session wrapper

I’ll try disabling sandboxing as @Seven.of.nine advised above, instead.

[Edit]
Sadly adding Sandboxing=Disabled to the [X-Sailjail] section just breaks the launcher shortcut for me, pressing it no longer starts the browser.

Meanwhile i deinstalled dnsmasq manually and waydroid works and browser + allradio too, in a ‘normal’ way. I don’t know why, but it works (on Volla).

Dnsmasq does nothing but running itself as localhost dns service and it is sufficient to stop dnsmasq service and then disable it.

systemctl stop dnsmasq
systemctl disable dnsmasq

4 Likes

@rainemak so it seems that the fix to get dnsmasq working is to just get the /etc/resolv.conf accessible by it? I’m thinking how this could be handled. I understand that just modifying the rpm package won’t help but maybe?

1 Like

Today I tried to install dnsmasq on Xperia 10 / SFOS 4.4.0.72 and result still was that Browser had no more network access. Unfortunately also the Mobile Access Point was broken, so on a laptop that was connected, browser also did not work any more.

Only deinstalling dnsmask brought browser and tethering back, will check again tomorrow and report more details.

I tried this on a Xperia 10 / SFOS 4.4.0.72, that I just use as Internet access point for the house (W)LAN, but the problem still persists. With installed ‘dnsmasq’, Browser doesn’t work on the phone and also not on the laptop connected to the Mobile Access Point!

I tried a lot of things in the last two days but couldn’t find any way to make it work.

Is there any solution meanwhile? I really would like to have some services that dnsmasq provide on my ‘gateway’ phone, but ironically dnsmasq breaks just the Mobile Access Point, while ‘the rest’ of the phone still works fine.

What can I try next to solve the problem? Does anyone know?

Found the solution by learning about dnsmasq and experiment:

in /etc/dnsmasq.conf
uncomment the following line (line 124):
#bind-interfaces

AND
from line 111, following the example there, I added:
listen-address=127.0.0.1
listen-address=192.168.0.1

(192.168.0.1 according with my Tethering address range defined in /etc/connman/main.conf )

Have now tested and Browser on the phone works now fine as also on the laptop.

2 Likes

Another way to work around this may be the tricks layed out in the Arch wiki here:

https://wiki.archlinux.org/title/ConnMan#Avoiding_conflicts_with_local_DNS_server
https://wiki.archlinux.org/title/ConnMan#/etc/resolv.conf

2 Likes

Browser now works fine but I read about dnsmasq’s ability to block unwanted domains from routing, so I added for experiment e.g.

address=/g**gle.com/127.0.0.1

and tried also

address=/g**gle.com/

and

local=/g**gle.com/

but it didn’t block if I call this address with browser, website is still displayed.

Does ‘connman’ provide a DNS in parallel, that is doing the DNS query in parallel to dnsmasq despite the address (URL) is blocked there?
How can I disable DNS resolution in connman, to only use dnsmasq for this and not override the blacklist?

edit: Browser is noteable faster now and on some websites some (unwanted) elements are no more displayed. But if calling a ‘blacklisted’ website directly, it will be displayed anyway. What can be the reason?

The address formulation seems odd to me, specially the / before g**gle.

Just as a guess:
If you add https://www. or just www. ?

No, I don’t think so. I followed exactly the syntax descriptions in the comment lines of /etc/dnsmasq.conf and a check didn’t report any error:

[root@gateway defaultuser]# dnsmasq --test
dnsmasq: syntax check OK.
[root@gateway defaultuser]# 

(‘gateway’ is the host name of my Xperia 10 that I use as Internet access point for the home network)

The comments say that the server names (URLs) include all subdomains.

In fact, now webpages load faster and Sailfish Browser did no more crash from overload after this modification, but despite the ‘blocked’ URLs are still visible if directly typed into the address line of Browser on the SF phone and also on the laptop connected to the Mobile Access Point. I would expect an ‘unknown address’ report or opening a ‘startpage’ query (startpage is the standard search engine of Sailfish Browser and also Firefox on the laptop).

Yes, connman provides a dns proxy listening on port 53 on local address.
if you run connmanctl services, you get a list of connections services like:

*A0  SSID1        wifi_XXXXXX_managed_psk
*A  SSID2         wifi_YYYYYY_managed_psk

and if your run connmanctl services wifi_XXXXXX_managed_psk, you get:

/net/connman/service/wifi_XXXXX_managed_psk
Type = wifi
Security = [ psk, wps ]
State = online
Strength = 60
Favorite = True
Immutable = False
AutoConnect = True
Name = SSID1
BSSID = xxxxxxxxxxx
MaxRate = 54000000
Frequency = 5180
EncryptionMode = aes
Ethernet = [ Method=auto, Interface=wlan0, Address=xxxxxxxxxxxx, MTU=1500 ]
Hidden = False
EAP =
Phase2 =
CACert =
CACertFile =
DomainSuffixMatch =
ClientCert =
ClientCertFile =
PrivateKey =
PrivateKeyFile =
PrivateKeyPassphrase =
AnonymousIdentity =
IPv4 = [ Method=dhcp, Address=192.168.1.10, Netmask=255.255.255.0, Gateway=192.168.1.1 ]
IPv4.Configuration = [ Method=dhcp ]
IPv6 = [ ]
IPv6.Configuration = [ Method=auto, Privacy=disabled ]
Nameservers = [ 192.168.1.1 ]
Nameservers.Configuration = [ ]
Timeservers = [ 0.sailfishos.pool.ntp.org, 1.sailfishos.pool.ntp.org, 2.sailfishos.pool.ntp.org, 3.sailfishos.pool.ntp.org ]
Timeservers.Configuration = [ ]
Domains = [ home ]
Domains.Configuration = [ ]
Proxy = [ Method=direct ]
Proxy.Configuration = [ ]
Provider = [ ]
Available = True
Saved = True
Access =
DefaultAccess = sailfish:1;ClearProperty(*)|Connect()|Disconnect()|Remove()|ResetCounters()=deny;group(privileged)=allow

You can change dns (as root) with:

connmanctl config wifi_XXXXXX_managed_psk --nameservers <dns>

2 Likes