-
Notifications
You must be signed in to change notification settings - Fork 28
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
extension does not work in firefox snap package #86
Comments
Thanks for reporting @carns. There’s a lot of things to unpack here I’m afraid:
|
Unfortunately I am not that familiar with snap either, but Canonical has been transitioning a few packages to that system. From a user perspective two notable things are that packages auto update (rather than prompting you to update) and the packages operate in a file system sandbox so they cannot access all files and directories. There are possibly some other restrictions associated with the sandbox. As for "does not work", from an end-user perspective, it behaves as if the extension is not present. Firefox prompts to save .md files with an external program. I'm not sure about error messages in the firefox console; I will have to re-enable the snap version of firefox later and report back. |
I see. That’s kind of problematic indeed. The usual solutions are to update the list of mime-types in Linux, but that’s something a sandboxed Firefox might not have access to. Though it seems markdown appears in a default system file for me now, in
|
I can reproduce so far, with:
So out of the box, online markdown files like the ones I linked to still work. The proposed action for a local md file is indeed to save as attachment. The workaround currently in the doc of using
Therefore, the workaround is to place the helpers file in a directory accessible by firefox, e.g. where profiles are stored, and to pass the full path. So
|
Thank you for tracking that down @Cimbali ! |
No worries @carns. This would all be much easier if webextensions could simply define the mime types they handle, but there’s still no ETA on that. |
Firefox under snap no longer recognises types from the mime database. We add the mime type to ~/snap/firefox/common/mime.types instead, see Cimbali/markdown-viewer#86 (comment) $ ln -s ~/workspace/dotfiles/firefox/mime.types ~/snap/firefox/common/mime.types
Worked for me, except I had to make the filename Related: I noticed that https://github.com/asciidoctor/asciidoctor-browser-extension somehow works on plain text Asciidoc files without this or other hacks. 🤷 |
Thanks, I’ll look into how they do it |
I don't know if this is something that could be fixed in the extension or if it is a fundamental limitation of the snap package system. It's mainly relevant for Ubuntu 21.10 users since Ubuntu elected to change the default Firefox package from apt to snap.
For anyone else who looks at this issue, one workaround is to simply disable the snap package and install the apt one:
There are some side effects (in particular: losing bookmarks etc. that you may have created while using the snap package, and of course the issue of whether you want to go against the grain with Ubuntu policy), but this, access to /tmp, and some other extensions will work again.
The text was updated successfully, but these errors were encountered: