peterleinchen / harbour-defender Goto Github PK
View Code? Open in Web Editor NEWThis project forked from nodevel/harbour-defender
Defender is a privacy guard for SailfishOS
License: GNU General Public License v3.0
This project forked from nodevel/harbour-defender
Defender is a privacy guard for SailfishOS
License: GNU General Public License v3.0
To get more readability and ease of rewriting the whole engine, all Sailfish OS 3 code should be separated.
Continuation of nodevel#10
@peterleinchen, Please suggest which license do you want to have and either set it yourself or, with your approval, I can add license as a part of PR for Chum
Database /home/defaultuser/.local/share/org.sailfishos/browser/.mozilla/cookies.sqlite
is locked when browser is open.
I don't know if it's a good idea, but defender could close the browser when the app is started.
I'm not sure what it has been replaced with. In Sailfish 4.4.0.58, current columns are :
Hi, currently migrating to an Xperia 10 iii.
After flashing SFOX 4.4.0.64, and attempting to install harbour-defender, I notice that Adblock Lists pane is empty.
(nothing shows up under "Sources"), and the counters are missing on the buttons in the main pane.
Quick glance at the journal:
Jun 13 12:41:12 Xperia10III harbour-defender[5646]: [D] unknown:0 - "PyOtherSide error: Traceback (most recent call last):\n\n File \"/usr/share/harbour-defender/qml/python/defender.py\", line 247, in cookie_is_locked\n st = os.stat(cookies_path)\n\nFileNotFoundError: [Errno 2] No such file or directory: '/home/nemo/.mozilla/mozembed/cookies.sqlite'\n"
Jun 13 12:41:12 Xperia10III harbour-defender[5646]: [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 247, in cookie_is_locked
st = os.stat(cookies_path)
FileNotFoundError: [Errno 2] No such file or directory: '/home/nemo/.mozilla/mozembed/cookies.sqlite'
Jun 13 12:41:12 Xperia10III harbour-defender[5646]: [D] unknown:0 - "PyOtherSide error: Traceback (most recent call last):\n\n File \"/usr/share/harbour-defender/qml/python/defender.py\", line 251, 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
Jun 13 12:41:12 Xperia10III harbour-defender[5646]: [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 251, 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 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'wc'
Jun 13 12:41:12 Xperia10III harbour-defender[5646]: [D] unknown:0 - "PyOtherSide error: Traceback (most recent call last):\n\n File \"/usr/share/harbour-defender/qml/python/defender.py\", line 251, 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
Jun 13 12:41:12 Xperia10III harbour-defender[5646]: [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 251, 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 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'wc'
Jun 13 12:41:12 Xperia10III harbour-defender[5646]: [W] unknown:0 - Unhandled PyOtherSide error: file:///usr/share/harbour-defender/qml/harbour-defender.qml:41: Error: Cannot assign [undefined] to bool
Jun 13 12:41:12 Xperia10III harbour-defender[5646]: [D] :49 - Working directory: /home/nemo
Jun 13 12:41:12 Xperia10III harbour-defender[5646]: [W] unknown:22 - file:///usr/share/harbour-defender/qml/cover/CoverPage.qml:22: TypeError: Cannot read property 'last_sources' of undefined
Jun 13 12:41:12 Xperia10III harbour-defender[5646]: [W] unknown:24 - file:///usr/share/harbour-defender/qml/pages/components/CookiesMenuItem.qml:24: TypeError: Cannot read property 'cookies_count' of undefined
Jun 13 12:41:12 Xperia10III harbour-defender[5646]: [W] unknown:29 - file:///usr/share/harbour-defender/qml/pages/components/CookiesMenuItem.qml:29: TypeError: Cannot read property 'domains_count' of undefined
Jun 13 12:41:12 Xperia10III harbour-defender[5646]: [W] unknown:24 - file:///usr/share/harbour-defender/qml/pages/components/SourcesMenuItem.qml:24: TypeError: Cannot read property 'hosts_lines' of undefined
Jun 13 12:41:12 Xperia10III harbour-defender[5646]: [W] unknown:29 - file:///usr/share/harbour-defender/qml/pages/components/SourcesMenuItem.qml:29: TypeError: Cannot read property 'sources_enabled_count' of undefined
The failure to wc -l /etc/hosts
seems weird, I might be due to the permissions systems that got introduced in the recent 4.x series of SFOX and defender not requesting the correct one.
Currently running Defender on SFOS Community edition on a PinePhone Pro and this dependency loop happens:
The recent systemd version in that SFOS version is actually able to detect the circular dependency, and solves it...
...by removing paths.target.
My suggestion would be to add DefaultDependencies=no
in harbour's paths' units.
This way harbour's paths are started as part of paths.target, but there is no implicit "After=" in the target, thus it breaks the circular dependency, while the path is still scheduled for restart.
I'll make a PR.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.