PocketStudios / Pocket-Browser

An open-source browser made for privacy and going towards security.
MIT License
9 stars 2 forks source link

[BUG] Unable to open snap on Ubuntu 20.04 #4

Open CalebWhiting opened 3 years ago

CalebWhiting commented 3 years ago

General Information: Nothing happens when attempting to open pocket-browser.

Operating System: Ubuntu 20.04.2
Browser Version: latest/stable snap 1.6.2 2021-06-24
Error Code: (if found)

Describe the bug: When attempting to open pocket-browser either by opening from the desktop, or command line, nothing happens, absolutely nothing, no errors, no messages.

Expected behavior: Opening the pocket browser application, or failing that I would expect some kind of error to be displayed.

Screenshots: image

Steps: Install the snap, attempt to open

Additional context: /mnt/pool/documents is a ZFS pool, which is symlinked to from ~/Documents I might be reading this wrong, but it appears that it's trying to remove my documents? If this is the case, then that's rather astonishing.

Log:

pocket://log: N/A

syslog:

Aug  2 16:07:51 caleb-whiting systemd[5138]: Started snap.pocket-browser.pocket-browser.6064917c-abdd-485a-8494-3b0fb30bca63.scope.
Aug  2 16:07:51 caleb-whiting kernel: [104904.998067] audit: type=1400 audit(1627916871.157:18273): apparmor="DENIED" operation="open" profile="snap.pocket-browser.pocket-browser" name="/mnt/pool/documents/" pid=2523475 comm="head" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Aug  2 16:07:51 caleb-whiting systemd[5138]: snap.pocket-browser.pocket-browser.6064917c-abdd-485a-8494-3b0fb30bca63.scope: Succeeded.
Aug  2 16:07:51 caleb-whiting kernel: [104905.001323] audit: type=1400 audit(1627916871.161:18274): apparmor="DENIED" operation="rmdir" profile="snap.pocket-browser.pocket-browser" name="/mnt/pool/documents/" pid=2523478 comm="rmdir" requested_mask="d" denied_mask="d" fsuid=1000 ouid=0

dmesg:

[104904.998067] audit: type=1400 audit(1627916871.157:18273): apparmor="DENIED" operation="open" profile="snap.pocket-browser.pocket-browser" name="/mnt/pool/documents/" pid=2523475 comm="head" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[104905.001323] audit: type=1400 audit(1627916871.161:18274): apparmor="DENIED" operation="rmdir" profile="snap.pocket-browser.pocket-browser" name="/mnt/pool/documents/" pid=2523478 comm="rmdir" requested_mask="d" denied_mask="d" fsuid=1000 ouid=0
AhmadHrb commented 3 years ago

Greetings @CalebWhiting!

Thank you for reporting your issue. The Browser won't delete your documents. As for the browser not running, can you try running /snap/pocket-browser/current/pocket-browser in your terminal and send the result?

Kind Regards, AhmadHrb Pocket Team.

CalebWhiting commented 3 years ago

Interesting, that does work.

# As you can see this command ommits nothing
caleb@caleb-whiting:~$ pocket-browser 
# However this one does
caleb@caleb-whiting:~$ /snap/pocket-browser/current/pocket-browser
Error occurred in handler for 'GUEST_VIEW_MANAGER_CALL': Error: ERR_ABORTED (-3) loading 'https://duckduckgo.com/'
    at rejectAndCleanup (electron/js2c/browser_init.js:213:985)
    at Object.navigationListener (electron/js2c/browser_init.js:213:1291)
    at Object.emit (events.js:327:22) {
  errno: -3,
  code: 'ERR_ABORTED',
  url: 'https://duckduckgo.com/'
}

It appears that /snap/bin/pocket-browser is a bad symlink?

caleb@caleb-whiting:~$ which pocket-browser 
/snap/bin/pocket-browser
caleb@caleb-whiting:~$ readlink -f $(which pocket-browser)
/usr/bin/snap
AhmadHrb commented 3 years ago

That's usually handled by snap and not the browser itself, I don't think I can do anything to prevent that from happening. Can't you open the browser from the start menu? I believe the latest build broke the category making the browser not appear in the start menu on some systems due to unrecognized category. It will be fixed in the next update.

CalebWhiting commented 3 years ago

The desktop file doesn't open for me either.

caleb@caleb-whiting:~$ cat /var/lib/snapd/desktop/applications/pocket-browser_pocket-browser.desktop
[Desktop Entry]
X-SnapInstanceName=pocket-browser
Name=Pocket Browser
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/pocket-browser_pocket-browser.desktop /snap/bin/pocket-browser %U
Terminal=false
Type=Application
Icon=/snap/pocket-browser/10/meta/gui/icon.png
StartupWMClass=Pocket Browser
Comment=An open-sourced browser
Categories=Internet;
caleb@caleb-whiting:~$ readlink -f /snap/bin/pocket-browser
/usr/bin/snap
caleb@caleb-whiting:~$

as you can see it points to /snap/bin/pocket-browser, which is the bad symlink