Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied reading zotero.sqlite (Snap) #15

Open
niveK77pur opened this issue Mar 10, 2023 · 1 comment
Open

Permission denied reading zotero.sqlite (Snap) #15

niveK77pur opened this issue Mar 10, 2023 · 1 comment

Comments

@niveK77pur
Copy link

Hello, I have been setting up Zotero and stumbled upon this neat companion app. I installed both Zotero and qnotero via Snap. However, I get the following error (exert from the end of the output). It appears after I specify the Zotero folder and makes the app crash right away.

To be noted:

  • Auto-detect did not work. I want to suspect the snap sandboxing between both apps being the reason.
  • When doing Browse I had to manually type in the path because the folders in question would not show up (~/snap/zotero-snap shows up fine but anything after that is hidden). I attached a screenshot in case I messed something up in the input.
    image
Using Python 3.6.9 (default, Nov 25 2022, 14:10:45)
[GCC 8.4.0]
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: invalid attribute 'selector'
# ... more "Fontconfig" lines ...
Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/90-synthetic.conf", line 6: invalid attribute 'version'
libqnotero._themes.light.__init__(): using '/usr/share/qnotero/resources/light'
libzotero._noteProvider.gnoteProvider: failed to import Levenshtein
qnotero.reInit(): using GnoteProvider
libgnote.__init__(): failed to locate Gnote
libzotero.__init__(): zotero_path = b'/home/kuni/snap/zotero-snap/common/Zotero'
[Errno 13] Permission denied: '/home/kuni/snap/zotero-snap/common/Zotero/zotero.sqlite'
pci id for fd 11: 1002:164c, driver (null)
libGL error: failed to create dri screen
libGL error: failed to load driver: radeonsi
pci id for fd 11: 1002:164c, driver (null)
libGL error: failed to create dri screen
libGL error: failed to load driver: radeonsi
sysTray.activate(): Activating qnotero reason: 1
sysTray.activate(): Exiting wthout activate Qnotero
saving!
libqnotero._themes.light.__init__(): using '/usr/share/qnotero/resources/light'
qnotero.reInit(): using GnoteProvider
libgnote.__init__(): failed to locate Gnote
libzotero.__init__(): zotero_path = b'/home/kuni/snap/zotero-snap/common/Zotero'
[Errno 13] Permission denied: '/home/kuni/snap/zotero-snap/common/Zotero/zotero.sqlite'
Traceback (most recent call last):
  File "/snap/qnotero/196/lib/python3.6/site-packages/libqnotero/preferences.py", line 114, in accept
    self.qnotero.zotero.update(True)
  File "/snap/qnotero/196/lib/python3.6/site-packages/libzotero/libzotero.py", line 261, in update
    shutil.copyfile(self.zotero_database, self.gnotero_database)
  File "/snap/qnotero/196/usr/lib/python3.6/shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:
PermissionError: [Errno 13] Permission denied: '/home/kuni/snap/zotero-snap/common/Zotero/zotero.sqlite'
Aborted

The file in question is definitely there:

$ ll /home/kuni/snap/zotero-snap/common/Zotero/zotero.sqlite
-rw-r--r-- 1 kuni kuni 2383872 Mar 10 15:19 /home/kuni/snap/zotero-snap/common/Zotero/zotero.sqlite

I imagine this must be some Snap related issue because from what I see the zotero.sqlite file is readable by everyone (unless I am overlooking something very silly here).

When I launch qnotero again after the error, the sys tray icon actually appears and it seems that I can interact with it just fine. However, no results are being shown (which is probably because it cannot read the sqlite file).

@ealbiter
Copy link
Owner

ealbiter commented Mar 10, 2023

Hi. Indeed, this is a known issue related to snap confinement. The only workaround I found at the moment was to install Qnotero in development mode using this command:

sudo snap install qnotero --devmode

Have you tried this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants