ibnishak / Timimi

Webextension to save Tiddlywiki
https://ibnishak.github.io/Timimi/
GNU Affero General Public License v3.0
204 stars 20 forks source link

Timimi save FAILED on Linux/firefox (due to Snap package of Firefox being installed in Ubuntu 21.10) #78

Closed erwanm closed 2 years ago

erwanm commented 2 years ago

I've been happily using Timimi for years, but when I installed it on the latest Ubuntu version with Firefox 98.0 it doesn't save and gives the message "Timimi save failed".

The Firefox add-on is correctly installed and the back-end didn't give any error, I tried to reinstall it a few times:

> ./timimi-2-1-1-Linux 
Verifying archive integrity...  100%   MD5 checksums are OK. All good.
Uncompressing   100%  
Hello There
Starting Timimi Installation

✔ firefox
Created host directory
Created host manifest: /home/erwan/.mozilla/native-messaging-hosts/timimi.json
Created host executable: /home/erwan/.local/share/timimi/timimi

Installation finished without errors.
Have a great day!!

Any advice much appreciated!

erwanm commented 2 years ago

I found the cause: apparently Ubuntu 21.10 installs the Snap package for Firefox by default, not the regular official apt package. Note that according to this article this may become a standard in future versions of Ubuntu.

Apparently the Snap version doesn't work the same way as the regular version, in particular it doesn't store the profile data in the usual directory ~/.mozilla (not sure where actually). This is why the Timimi backend didn't work, since it installs in the regular directory.

The workaround is simple: remove the Snap package and install the regular apt package:

sudo snap remove --purge firefox
sudo apt install firefox

After reinstalling the add-on and the back-end, my beloved Timimi works again :)

ps: I'm leaving the issue open in case somebody knows how to make things work for the Snap version. Feel free to close it.

ibnishak commented 2 years ago

Thank you for raising this ticket. I am leaving it open as a reminder to figure out where is snap packages storing firefox data files and add a separate installer for that.

malgam commented 2 years ago

I think the snap uses ~/snap/firefox/common/.mozilla instead of ~/.mozilla

malgam commented 2 years ago

I seem to have been able to get this fixed with:

$ cp ~/.local/share/timimi/timimi ~/snap/firefox/common/.mozilla/timimi/ $ cp ~/.mozilla/native-messaging-hosts/timimi.json to ~/snap/firefox/common/.mozilla/native-messaging-hosts/

and editing the "path": line in the manifest to point to the new executable location (... snap/firefox/common/.mozilla/timimi/timimi/)

I assume the executable needed to be moved because the firefox snap sandbox stopped access to the original location.

Obviously, this is a work-around, but it might do the job until the installer is updated.

hitam4450 commented 2 years ago

Sorry, the solution did not work for me.... :-((

malgam commented 2 years ago

How did you implement the patch discussed above? If you installed the latest release of Timimi, I don't think it contains this fix. You will need to manually move the timimi executable and the timimi.json files as discussed and make the appropriate change to timimi.json.

hitam4450 commented 2 years ago

I implemented as described - still does not work. chmod 777 on the executable and owner is the user of home directory.

hitam4450 commented 2 years ago

I am considering to put the tiddlywiki onto my home server to get rid of the shit firefox snap issue...... it is a pain in the a......