Defender is back!

Starts from the grid nicely, but still kills hotspot after the updated hosts is written. But restarting it manually is not a big issue.

To me it looks like Defender is working as intended :slightly_smiling_face: Well done @peterleinchen

2 Likes

I want to say, thank you for bringing Defender back! :+1:

Of course I know how to hold my hosts updated manually. but Defender is mor convenient, and there is this cookie feature that I like.

So please keep up the good work, and I’ll try to help the best of my knowledge. :+1:

2 Likes

Thanks.

But I would like to get it going (for you only :wink:).

And I have an idea why it does not restart - user/root issue.

I have prepared a new build, which you might try.

If that also does not work, please try this command as user (and root)

dbus-send --system --print-reply --dest=net.connman /net/connman/technology/wifi net.connman.Technology.SetProperty string:"Tethering" variant:boolean:tr
ue

and let me know if Hotspot is started by this.

Forget it, just try new version v0.8.12…

The link goes down for less than a second, and then hotspot is restarted. ssh connections survive this hump.

Nice work :slightly_smiling_face:

EDIT: Initially I came here to help debugging since I had the time and hardware, but now I’m converted to a user of Defender. Like @eson I managed my /etc/hosts by hand, but this is more convenient and more approachable to new users :+1:

2 Likes

Thanks.

-

And yes, exactly. I would see the benefit as well to all new users that will join in the next months. And see that this app should also be in the “official” harbour.

But I assume that it will never be allowed according to what it does?

Even it is sailjailed now!

@keto @vige @rainemak

Or is there a chance to get it into harbour?

v0.8.12 is out in sailfishos:chum :slight_smile:

Waiting for more feedback…

Still works :wink:

(20 characters…)

1 Like

@peterleinchen I tested v0.8.12 from Chum on my Xperia 10 II. It appears to have the same issue that was previously encountered on Xperia 10 III.

Defender crashes when launched from the app grid / within sailjail:

Terminal output
[defaultuser@Xperia10II-DualSIM ~]$ sailjail -v -p harbour-defender /usr/bin/harbour-defender
../daemon/sailjailclient.c:890: client_launch_application(): N: Launching 'harbour-defender' via sailjailclient...
Warning: "shell none" command in the profile file is done by default; the command will be deprecated
constructing /run/firejail/mnt/privileged:  ...
mounting /run/firejail/mnt/privileged @ /home/defaultuser/.local/share/system/privileged
hiding /run/firejail/mnt/privileged
[D] unknown:0 - Using Wayland-EGL
library "libui_compat_layer.so" not found
library "libion.so" not found
failed to find/load gralloc module
harbour-defender: gralloc.c :162 : hybris_gralloc_initialize:  l'assertion « NULL » a échoué.

But it starts when called directly from the terminal:

Terminal output
[defaultuser@Xperia10II-DualSIM ~]$ harbour-defender
[D] unknown:0 - Using Wayland-EGL
library "libui_compat_layer.so" not found
library "libGLESv2_adreno.so" not found
library "eglSubDriverAndroid.so" not found
[D] unknown:0 - Got library name:  "/usr/lib64/qt5/qml/io/thp/pyotherside/libpyothersideplugin.so"
[W] unknown:24 - file:///usr/share/harbour-defender/qml/pages/components/CookiesMenuItem.qml:24: TypeError: Cannot read property 'cookies_count' of undefined
[W] unknown:29 - file:///usr/share/harbour-defender/qml/pages/components/CookiesMenuItem.qml:29: TypeError: Cannot read property 'domains_count' of undefined
[W] unknown:24 - file:///usr/share/harbour-defender/qml/pages/components/SourcesMenuItem.qml:24: TypeError: Cannot read property 'hosts_lines' of undefined
[W] unknown:29 - file:///usr/share/harbour-defender/qml/pages/components/SourcesMenuItem.qml:29: TypeError: Cannot read property 'sources_enabled_count' of undefined
[W] unknown:22 - file:///usr/share/harbour-defender/qml/cover/CoverPage.qml:22: TypeError: Cannot read property 'last_sources' of undefined
[D] unknown:0 - "PyOtherSide error: Traceback (most recent call last):\n\n  File \"/usr/share/harbour-defender/qml/python/defender.py\", line 312, in get_stats\n    data = json.load(data_file)\n\n  File \"/usr/lib64/python3.8/json/__init__.py\", line 293, in load\n    return loads(fp.read(),\n\n  File \"/usr/lib64/python3.8/json/__init__.py\", line 357, in loads\n    return _default_decoder.decode(s)\n\n  File \"/usr/lib64/python3.8/json/decoder.py\", line 337, in decode\n    obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n\n  File \"/usr/lib64/python3.8/json/decoder.py\", line 355, in raw_decode\n    raise JSONDecodeError(\"Expecting value\", s, err.value) from None\n\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n"
[W] unknown:0 - Unhandled PyOtherSide error: Return value of PyObject call is NULL: Traceback (most recent call last):

  File "/usr/share/harbour-defender/qml/python/defender.py", line 312, in get_stats
    data = json.load(data_file)

  File "/usr/lib64/python3.8/json/__init__.py", line 293, in load
    return loads(fp.read(),

  File "/usr/lib64/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)

  File "/usr/lib64/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())

  File "/usr/lib64/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

[W] unknown:29 - file:///usr/share/harbour-defender/qml/pages/components/SourcesMenuItem.qml:29: TypeError: Cannot read property 'sources_enabled_count' of undefined
[W] unknown:24 - file:///usr/share/harbour-defender/qml/pages/components/SourcesMenuItem.qml:24: TypeError: Cannot read property 'hosts_lines' of undefined
[W] unknown:29 - file:///usr/share/harbour-defender/qml/pages/components/CookiesMenuItem.qml:29: TypeError: Cannot read property 'domains_count' of undefined
[W] unknown:24 - file:///usr/share/harbour-defender/qml/pages/components/CookiesMenuItem.qml:24: TypeError: Cannot read property 'cookies_count' of undefined
[W] unknown:22 - file:///usr/share/harbour-defender/qml/cover/CoverPage.qml:22: TypeError: Cannot read property 'last_sources' of undefined
[D] :52 - Working directory: /home/defaultuser
[D] unknown:0 - "PyOtherSide error: Traceback (most recent call last):\n\n  File \"/usr/share/harbour-defender/qml/python/defender.py\", line 312, in get_stats\n    data = json.load(data_file)\n\n  File \"/usr/lib64/python3.8/json/__init__.py\", line 293, in load\n    return loads(fp.read(),\n\n  File \"/usr/lib64/python3.8/json/__init__.py\", line 357, in loads\n    return _default_decoder.decode(s)\n\n  File \"/usr/lib64/python3.8/json/decoder.py\", line 337, in decode\n    obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n\n  File \"/usr/lib64/python3.8/json/decoder.py\", line 355, in raw_decode\n    raise JSONDecodeError(\"Expecting value\", s, err.value) from None\n\njson.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\n"
[W] unknown:0 - Unhandled PyOtherSide error: Return value of PyObject call is NULL: Traceback (most recent call last):

  File "/usr/share/harbour-defender/qml/python/defender.py", line 312, in get_stats
    data = json.load(data_file)

  File "/usr/lib64/python3.8/json/__init__.py", line 293, in load
    return loads(fp.read(),

  File "/usr/lib64/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)

  File "/usr/lib64/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())

  File "/usr/lib64/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

[W] unknown:29 - file:///usr/share/harbour-defender/qml/pages/components/SourcesMenuItem.qml:29: TypeError: Cannot read property 'sources_enabled_count' of undefined
[W] unknown:24 - file:///usr/share/harbour-defender/qml/pages/components/SourcesMenuItem.qml:24: TypeError: Cannot read property 'hosts_lines' of undefined
[W] unknown:29 - file:///usr/share/harbour-defender/qml/pages/components/CookiesMenuItem.qml:29: TypeError: Cannot read property 'domains_count' of undefined
[W] unknown:24 - file:///usr/share/harbour-defender/qml/pages/components/CookiesMenuItem.qml:24: TypeError: Cannot read property 'cookies_count' of undefined
[W] unknown:22 - file:///usr/share/harbour-defender/qml/cover/CoverPage.qml:22: TypeError: Cannot read property 'last_sources' of undefined

Let me know if you need more data to debug this.

1 Like

Nice :smiley: was a hard way this time

@damus You are the first to report for any other 10 device.

But I may now assume all 10s are affected?!

It is a simple change and I have already done so in testing. Would you please test it.

chum:testing v0.8.13

Please note that the start time will be very looong….

After you confirm will push to release.

At the moment, the version I see in chum:testing seems to be 0.8.12-1.63.1.

Package info
[defaultuser@Xperia10II-DualSIM ~]$ LC_ALL=C zypper info harbour-defender
Loading repository data...
Reading installed packages...


Information for package harbour-defender:
-----------------------------------------
Repository     : sailfishos-chum-testing
Name           : harbour-defender
Version        : 0.8.12-1.63.1.bso
Arch           : aarch64
Vendor         : chum
Installed Size : 299.3 KiB
Installed      : Yes
Status         : up-to-date
Source package : harbour-defender-0.8.12-1.63.1.bso.src
Upstream URL   : https://github.com/peterleinchen/harbour-defender
Summary        : A privacy guard for SFOS
Description    :
    Configurable adblocker and privacy tuner


    PackageName: Defender
    Categories:
     - System
     - Network
    Icon: https://raw.githubusercontent.com/peterleinchen/harbour-defender/master/qml/pages/images/harbour-defender.svg

Unfortunately, this version appears to fail in the same way as the one in the stable repository: when launched from the app grid, it dies after about 20 seconds of loading.

Not unfortunately, just due to my dumbness. I worked on another project lately as well and there I use the same version no all the time, so just trigger the build.

Now I requested for v0.8.13 and build is ongoing… … and ready

Okay, I just tested v0.8.13. As expected, it takes about 30 seconds to launch, but it does start successfully. So I can confirm that it works on my 10 II. Well done.

1 Like

Great. Thank you.

I will request to get this to chum.

Works as expected, also on X10III… except from the very long launch time.

Sorry, but I didn’t have the time to try reducing the lib load. :neutral_face:

1 Like

0.8.13 seem to work just fine also on SFOS 5.1.* No serious error reports in any case. :wink: Of course, this is on my developer device C2.

1 Like