Defender app update (harbour-defender) - my very own ‘Sailfish Devember’

Which version? (From testing?)

Output error lines do not match my code number, but point to cookies_path

As this one is a fixed one and correct, it is about missing sailjail rights.

So what does

sailjail -v -p harbour-defender /usr/bin/harbour-defender

tell?

You may try the one from testing, as of just now v0.8.6.

What I do not get is, you said:

Starting from grid and cli went ok, and updates seem to work from both.

App started on your 10 III when tapping the icon in drawer?

You would be the one where it works!?

Something is really strange on the 10. The output clearly states that it cannot create the jail, confirmed later by missing rights to “wc”

10III 5.0.0.77, latest Chum version.

[nemo@Xperia10III ~]$ sailjail -v -p harbour-defender /usr/bin/harbour-defender
../daemon/sailjailclient.c:890: client_launch_application(): N: Launching 'harbour-defender' via sailjailclie
nt...
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/nemo/.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: Assertion `NULL' failed.
1 Like

Even more strange…

All three 10 devices do behave differently!?

-

@eson @ekari @pemek

Do you have Android/App Support installed?

@pemek did it start from drawer?

(Most porbably not, but…)

Aas installed, did not start from drawer :frowning:

And works without sailjail.

1 Like

Android support not installed, starts from grid nicely, breaks with sailjail.

1 Like

Version 0.7.4 from chum.

,---
| Sailfish OS 5.0.0.77 (Tampella)
'---
[defaultuser@Xperia10III ~]$ sailjail -v -p harbour-defender /usr/bin/harbour-defender
../daemon/sailjailclient.c:890: client_launch_application(): N: Launching 'harbour-defender' via sailjailclient...
Error: can't chdir to privileged
Warning: "shell none" command in the profile file is done by default; the command will be deprecated
constructing /run/firejail/mnt/privileged: Images ...
mounting /run/firejail/mnt/privileged @ /home/defaultuser/.local/share/system/privileged
hiding /run/firejail/mnt/privileged
Error: can't chdir to privileged
[D] unknown:0 - Using Wayland-EGL
library "libui_compat_layer.so" not found
library "libutils.so" not found
library "libcutils.so" not found
library "libhardware.so" not found
library "android.hardware.graphics.mapper@2.0.so" not found
library "android.hardware.graphics.mapper@2.1.so" not found
library "android.hardware.graphics.mapper@3.0.so" not found
library "android.hardware.graphics.mapper@4.0.so" not found
library "libc++.so" not found
library "libhidlbase.so" not found
library "libgralloctypes.so" not found
library "android.hardware.graphics.common@1.2.so" not found
library "libion.so" not found
library "libz.so" not found
library "libhidlmemory.so" not found
library "android.hidl.memory@1.0.so" not found
library "vendor.qti.qspmhal@1.0.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
[D] unknown:0 - "PyOtherSide error: Traceback (most recent call last):\n\n  File \"/usr/share/harbour-defender/qml/python/defender.py\", line 255, in cookie_is_locked\n    st = os.stat(cookies_path)\n\nFileNotFoundError: [Errno 2] Tiedostoa tai hakemistoa ei ole: '/home/defaultuser/.mozilla/mozembed/cookies.sqlite'\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 255, in cookie_is_locked
    st = os.stat(cookies_path)

FileNotFoundError: [Errno 2] Tiedostoa tai hakemistoa ei ole: '/home/defaultuser/.mozilla/mozembed/cookies.sqlite'

[D] unknown:0 - "PyOtherSide error: Traceback (most recent call last):\n\n  File \"/usr/share/harbour-defender/qml/python/defender.py\", line 259, in get_stats\n    hosts_lines = int(check_output([\"wc\", \"-l\", \"/etc/hosts\"]).decode(\"utf-8\").split(' ')[0])\n\n  File \"/usr/lib64/python3.8/subprocess.py\", line 415, in check_output\n    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,\n\n  File \"/usr/lib64/python3.8/subprocess.py\", line 493, in run\n    with Popen(*popenargs, **kwargs) as process:\n\n  File \"/usr/lib64/python3.8/subprocess.py\", line 858, in __init__\n    self._execute_child(args, executable, preexec_fn, close_fds,\n\n  File \"/usr/lib64/python3.8/subprocess.py\", line 1720, in _execute_child\n    raise child_exception_type(errno_num, err_msg, err_filename)\n\nPermissionError: [Errno 13] Lupa evätty: 'wc'\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 259, in get_stats
    hosts_lines = int(check_output(["wc", "-l", "/etc/hosts"]).decode("utf-8").split(' ')[0])

  File "/usr/lib64/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,

  File "/usr/lib64/python3.8/subprocess.py", line 493, in run
    with Popen(*popenargs, **kwargs) as process:

  File "/usr/lib64/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,

  File "/usr/lib64/python3.8/subprocess.py", line 1720, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)

PermissionError: [Errno 13] Lupa evätty: 'wc'

[D] unknown:0 - "PyOtherSide error: Traceback (most recent call last):\n\n  File \"/usr/share/harbour-defender/qml/python/defender.py\", line 259, in get_stats\n    hosts_lines = int(check_output([\"wc\", \"-l\", \"/etc/hosts\"]).decode(\"utf-8\").split(' ')[0])\n\n  File \"/usr/lib64/python3.8/subprocess.py\", line 415, in check_output\n    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,\n\n  File \"/usr/lib64/python3.8/subprocess.py\", line 493, in run\n    with Popen(*popenargs, **kwargs) as process:\n\n  File \"/usr/lib64/python3.8/subprocess.py\", line 858, in __init__\n    self._execute_child(args, executable, preexec_fn, close_fds,\n\n  File \"/usr/lib64/python3.8/subprocess.py\", line 1720, in _execute_child\n    raise child_exception_type(errno_num, err_msg, err_filename)\n\nPermissionError: [Errno 13] Lupa evätty: 'wc'\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 259, in get_stats
    hosts_lines = int(check_output(["wc", "-l", "/etc/hosts"]).decode("utf-8").split(' ')[0])

  File "/usr/lib64/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,

  File "/usr/lib64/python3.8/subprocess.py", line 493, in run
    with Popen(*popenargs, **kwargs) as process:

  File "/usr/lib64/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,

  File "/usr/lib64/python3.8/subprocess.py", line 1720, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)

PermissionError: [Errno 13] Lupa evätty: 'wc'

[W] unknown:0 - Unhandled PyOtherSide error: file:///usr/share/harbour-defender/qml/harbour-defender.qml:41: Error: Cannot assign [undefined] to bool
[D] :49 - Working directory: /home/defaultuser
[W] unknown:22 - file:///usr/share/harbour-defender/qml/cover/CoverPage.qml:22: TypeError: Cannot read property 'last_sources' 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: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

I meant that I can start Defender by tapping the icon just like you start any other app. So apparently I’m the chosen one :slight_smile: What do I win? :laughing:

I don’t have android support installed, could that be a point of interest?

1 Like

Apparently that version from chum (release)

Version 0.7.4 from chum.

does NOT have sailjail enabled :wink:

So no wonder it breaks…

Please use the one from chum:testing (as of now 0.8.6)

In GUI setting enable “testing” , update only Defender and disable “testing’“.

I meant that I can start Defender by tapping the icon just like you start any other app. So apparently I’m the chosen one :slight_smile: What do I win? :laughing:

Let’s see with new version :smiley:

I don’t have android support installed, could that be a point of interest?

I do not know, yet.

But others have and have the same thing. So I do not thinks so.

Ok, with 0.8.6 I get:

  • start from grid → ask for permissions, spins and dies
  • start from console → runs nicely with the exception that it shuts down Hotspot
  • from console both sailjail attempts fail
2 Likes

20 chars inside quote

  1. Chum GUI threw an error while updating, and this has never happened before. Based on how Defender now works, the update went through, but Chum GUI is now confused. It says .39 now available, but still it’s not.

  2. Starting from grid Defender now seems to work as intended. I could manipulate and update the hosts. Starting takes a while though…

  3. [defaultuser@Xperia10III ~]$ 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 "libGLESv2_adreno.so" not found library "eglSubDriverAndroid.so" not found library "vendor.qti.qspmhal@1.0.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 Warn, could not execute on DB, cookies/domains count set to zero [D] :49 - Working directory: /home/defaultuser Warn, could not execute on DB, cookies/domains count set to zero [D] unknown:0 - "PyOtherSide error: Traceback (most recent call last):\n\n  File \"/usr/share/harbour-defender/qml/python/defender.py\", line 191, in load_cookies\n    result_list = load_query(cur, searchStr)\n\n  File \"/usr/share/harbour-defender/qml/python/defender.py\", line 184, in load_query\n    query = cur.execute('SELECT * FROM moz_cookies ORDER BY host, creationTime')\n\nsqlite3.OperationalError: database is locked\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 191, in load_cookies     result_list = load_query(cur, searchStr)    File "/usr/share/harbour-defender/qml/python/defender.py", line 184, in load_query     query = cur.execute('SELECT * FROM moz_cookies ORDER BY host, creationTime')  sqlite3.OperationalError: database is locked  [W] unknown:0 - Unhandled PyOtherSide error: file:///usr/share/harbour-defender/qml/pages/CookiesPage.qml:193: TypeError: Cannot read property 'length' of undefined [D] unknown:0 - "PyOtherSide error: Traceback (most recent call last):\n\n  File \"/usr/share/harbour-defender/qml/python/defender.py\", line 191, in load_cookies\n    result_list = load_query(cur, searchStr)\n\n  File \"/usr/share/harbour-defender/qml/python/defender.py\", line 184, in load_query\n    query = cur.execute('SELECT * FROM moz_cookies ORDER BY host, creationTime')\n\nsqlite3.OperationalError: database is locked\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 191, in load_cookies     result_list = load_query(cur, searchStr)    File "/usr/share/harbour-defender/qml/python/defender.py", line 184, in load_query     query = cur.execute('SELECT * FROM moz_cookies ORDER BY host, creationTime')  sqlite3.OperationalError: database is locked  [W] unknown:0 - Unhandled PyOtherSide error: file:///usr/share/harbour-defender/qml/pages/CookiesPage.qml:193: TypeError: Cannot read property 'length' of undefined [D] :60 - true [D] :60 - true Warn, could not execute on DB, cookies/domains count set to zero [D] :60 - true [D] :60 - true Warn, could not execute on DB, cookies/domains count set to zero  
    

    Defender started and I could manipulate and update the hosts. (The browser was running, hence the cookie errors…)

  4. updating the hosts kills my Hotspot, which really makes life difficult (hampers even writing this post)

2 Likes

…also I can’t remove Defender via Chum GUI.

Error: RPM failed. Command exited with status 1.

(Also also I feel like this forum platform is fighting me at every post I write :melting_face: )

3 Likes

Wow, that would be very good news. :grinning_face:

Even sailjail is still bickering about some missing libs :frowning:

About chum I have no idea, normally it would just see the higher build number and that’s it.

Did you try to remove manually with

zypper rm harbour-defender

or

pkcon remove harbour-defender

?

If that does not work, try

rpm -e harbour-defender

And install again.

But please wait until I have uploaded a new version to chum, this evening…

Thanks for your help.

I ran into the same issue now and struggled a bit, as openrepos cert expired causes some inconvenience. I had a bad typo in the pregnancy script let, but it is fixed now.

You need to manually erase the bad package 0.8.6 like

rpm --noscripts -e harbour-defender-0.8.6
1 Like

New version v0.8.7 :wink:

Let’s see…

1 Like

This one works for me. Great work!

2 Likes

It feels like it’s working now. Asks permissions, sees cookies ok and updates lists.

Hotspot still gets taken down. It seems to happen when then new hosts file is written.

1 Like

WOHOO!

That would be the break-through after weeks…

:grinning_face:

-

Unfortunately the starting time of Defender has now increased to an amount that the spinner on drawer times out before Defender starts, so be a little patient…

1 Like

Sorry about your Hotspot issue.

I checked and have only found a check inserted by me like

iw dev wlan0 link

but have not done any further investigation.

As I cannot see how this would shutdown Hotspot???

But maybe one idea: did you go to settings and disable the “WLAN only” check button?

Oh, and would you be so kind to post once more the out put of console sailjail start?

I would like to know if all missing libs are covered now.

And if so, would you also be brave and kind enough to test if we could throw out some whitelistings from profile file?

/etc/sailjail/permissions/harbour-defender.profile

This could minimize the start time!!! (You will find this section easily)

But I am afraid there is nothing to omit :frowning:

So I am already thinking about about two different sailjail profiles for Jolla and 10 devices.