Git Product home page Git Product logo

harbour-defender's People

Contributors

nodevel avatar peterleinchen avatar rinigus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

harbour-defender's Issues

License missing

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

Cookie database is locked

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.

Column baseDomain doesn't exist anymore in cookies.sql

I'm not sure what it has been replaced with. In Sailfish 4.4.0.58, current columns are :

  • id
  • originAttributes
  • name
  • value
  • host
  • path
  • expiry
  • lastAccessed
  • creationTime
  • isSecure
  • isHttpOnly
  • inBrowserElement
  • sameSite
  • rawSameSite

Block Lists pane absent on Xperia 10 iii with SFOX 4.4.0.64

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.

Dependency loop on community SailfishOS

Currently running Defender on SFOS Community edition on a PinePhone Pro and this dependency loop happens:

  • basic.targets depends on ...
  • paths.target which depends on ...
  • harbour-defender.path which depends on ..
  • home and unlocking home and all these things
  • which in turn depend on basic targets.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.