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

Firefox and Thunderbird - Not updating via snap store! #1891

Open
1 task done
ubuntupoweruser opened this issue Jan 28, 2025 · 12 comments
Open
1 task done

Firefox and Thunderbird - Not updating via snap store! #1891

ubuntupoweruser opened this issue Jan 28, 2025 · 12 comments
Assignees
Labels

Comments

@ubuntupoweruser
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and found none matching what I'm reporting.

Bug Description

If you click on the update button in the snap store, both Firefox and Thunderbird will not update. The wheel spins and then stops like all other apps, but when you close snap and re-open, the update shows up again. Does not update. - Please comment how to manually override this, without getting this error message:

sudo snap refresh:

error: cannot perform the following tasks:

  • Run post-refresh hook of "thunderbird" snap if present (run hook "post-refresh":

ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/et_EE.dic' -> '': No such file or directory
ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/et_EE.aff' -> '': No such file or directory
-----)

Steps to reproduce the behavior

  1. Open Snap Store
  2. Click "Update" on Thunderbird Mail and/or Firefox Browser
  3. After this update fails
  4. Open Terminal
  5. Type: "sudo snap refresh"
  6. Enter Password
  7. error: cannot perform the following tasks:
  • Run post-refresh hook of "thunderbird" snap if present (run hook "post-refresh":

ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/et_EE.dic' -> '': No such file or directory
ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/et_EE.aff' -> '': No such file or directory
-----)

Expected behavior

No response

Ubuntu release

24.04 LTS

What architecture are you using?

None

System info

Linux 6.8.0-51-generic / Dell Inc. Latitude 7200 2-in-1 / Wayland / 1.32.0

Additional context

No response

@ubuntupoweruser
Copy link
Author

When trying to fix this with $sudo snap refresh

This is the result:

error: cannot perform the following tasks:

  • Run post-refresh hook of "firefox" snap if present (run hook "post-refresh":

ln: failed to create symbolic link '/var/snap/firefox/common/snap-hunspell/et_EE.dic' -> '': No such file or directory
ln: failed to create symbolic link '/var/snap/firefox/common/snap-hunspell/et_EE.aff' -> '': No such file or directory
-----)

  • Run post-refresh hook of "thunderbird" snap if present (run hook "post-refresh":

ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/et_EE.dic' -> '': No such file or directory
ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/et_EE.aff' -> '': No such file or directory
-----)

Anyone else have this, trying to update Thunderbird Mail and Firefox Browser via Snap in latest version of Ubuntu?

@ubuntupoweruser
Copy link
Author

Also, my current version of firefox: 134.0.1 (64-bit) and Thunderbird: 128.6.0esr (64-bit) - Perhaps this is important to this bug as well...

@mathrock74
Copy link

I'm seeing the exact same thing (with de_DE dictionaries).
My kernel is 6.8.0-52-generic.

@mousetrappling
Copy link

I see the same with es dictionaries. My actual language is English (it's probably en_US for firefox) and I'm not sure why it would be installing what I assume is Spanish dictionaries.

Ubuntu 22.04.

@ubuntupoweruser
Copy link
Author

Did the latest Ubuntu updates, then repeated: $sudo snap refresh

This was the response:
rror: cannot perform the following tasks:

  • Run post-refresh hook of "firefox" snap if present (run hook "post-refresh":

update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/local/share/doc /usr/local/share/doc none bind,ro 0 0): cannot open directory "/usr/local/share": permission denied
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/gimp/2.0/help /usr/share/gimp/2.0/help none bind,ro 0 0): cannot write to "/var/lib/snapd/hostfs/usr/share/gimp/2.0/help" because it would affect the host in "/var/lib/snapd"
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/gtk-doc /usr/share/gtk-doc none bind,ro 0 0): cannot write to "/var/lib/snapd/hostfs/usr/share/gtk-doc" because it would affect the host in "/var/lib/snapd"
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/libreoffice/help /usr/share/libreoffice/help none bind,ro 0 0): cannot write to "/var/lib/snapd/hostfs/usr/share/libreoffice/help" because it would affect the host in "/var/lib/snapd"
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/sphinx_rtd_theme /usr/share/sphinx_rtd_theme none bind,ro 0 0): cannot write to "/var/lib/snapd/hostfs/usr/share/sphinx_rtd_theme" because it would affect the host in "/var/lib/snapd"
update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/xubuntu-docs /usr/share/xubuntu-docs none bind,ro 0 0): cannot write to "/var/lib/snapd/hostfs/usr/share/xubuntu-docs" because it would affect the host in "/var/lib/snapd"
ln: failed to create symbolic link '/var/snap/firefox/common/snap-hunspell/et_EE.dic' -> '': No such file or directory
ln: failed to create symbolic link '/var/snap/firefox/common/snap-hunspell/et_EE.aff' -> '': No such file or directory
-----)

  • Run post-refresh hook of "thunderbird" snap if present (run hook "post-refresh":

ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/et_EE.dic' -> '': No such file or directory
ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/et_EE.aff' -> '': No such file or directory
-----)

@seb128
Copy link
Contributor

seb128 commented Jan 30, 2025

Thanks for the report, so that's weird. The error is

ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/et_EE.dic' -> '': No such file or directory

the -> '' there is weird. The corresponding code is
https://github.com/ubuntu/thunderbird/blob/724429bcfb283cee8329e2e04fbcfdf103286e16/snap/hooks/post-refresh#L58

ln -s "$(readlink -e $SNAP/usr/share/hunspell/${dic_file})" $DICPATH/${dic_file}

unsure how we can have ${dic_file}) = et_EE.dic in the first argument and '' in the second?

Could someone having the issue provide the output of

ls -l /var/snap/thunderbird/common/snap-hunspell/

and

snap run --shell thunderbird
ls -l /var/lib/snapd/hostfs/usr/share/hunspell

(or thunderbird->firefox if you have the issue with firefox)?

Also that issue is with firefox/thunderbird and not app-center so I will move it to a new report once we understand the problem better but it's better to reach to users here since there is a few active contributors already on the ticket

@jtracey
Copy link

jtracey commented Jan 30, 2025

$ ls -l /var/snap/thunderbird/common/snap-hunspell/
total 0
lrwxrwxrwx 1 root root 50 Jan 30 12:20 en_US.aff -> /snap/thunderbird/634/usr/share/hunspell/en_US.aff
lrwxrwxrwx 1 root root 50 Jan 30 12:20 en_US.dic -> /snap/thunderbird/634/usr/share/hunspell/en_US.dic
$ snap run --shell thunderbird
$ ls -l /var/lib/snapd/hostfs/usr/share/hunspell
total 5512
-rw-r--r-- 1 root root    3131 Jan 20  2022 en_US.aff
-rw-r--r-- 1 root root  860381 Jan 20  2022 en_US.dic
-rw-r--r-- 1 root root   24558 Dec 13  2022 fo.aff
-rw-r--r-- 1 root root 4751146 Dec 13  2022 fo.dic
lrwxrwxrwx 1 root root       6 Dec 13  2022 fo_FO.aff -> fo.aff
lrwxrwxrwx 1 root root       6 Dec 13  2022 fo_FO.dic -> fo.dic

As with others, my language is en_US, not fo. No idea where it came from.

@jtracey
Copy link

jtracey commented Jan 30, 2025

Oh interesting, the fo* dictionary files really are in my /usr/share/hunspell directory for my system. No idea what package put them there, but taking them out fixed the problem.

@seb128
Copy link
Contributor

seb128 commented Jan 30, 2025

Hum, could someone having the issue try to

$ snap run --shell thunderbird
$ sh -x /snap/thunderbird/current/snap/hooks/post-refresh

and attach the log to the report?
it might help trying to understand how we end up with an empty name for the target...

@r41d
Copy link

r41d commented Jan 31, 2025

@seb128: My output to the second command is as follows:

Click to expand


+ host_hunspell=/var/lib/snapd/hostfs/usr/share/hunspell
+ [ ! -d /var/lib/snapd/hostfs/usr/share/hunspell ]
+ DICPATH=/var/snap/thunderbird/common/snap-hunspell
+ [ -d /var/snap/thunderbird/common/snap-hunspell ]
+ find /var/snap/thunderbird/common/snap-hunspell -type l -name *.dic -or -name *.aff -exec rm {} +
rm: cannot remove '/var/snap/thunderbird/common/snap-hunspell/en_US.aff': Permission denied
rm: cannot remove '/var/snap/thunderbird/common/snap-hunspell/de_DE.aff': Permission denied
rm: cannot remove '/var/snap/thunderbird/common/snap-hunspell/de_BE.aff': Permission denied
rm: cannot remove '/var/snap/thunderbird/common/snap-hunspell/de_LU.aff': Permission denied
+ true
+ find /var/lib/snapd/hostfs/usr/share/hunspell/ -name *.dic
+ basename /var/lib/snapd/hostfs/usr/share/hunspell/en_US.dic
+ dic_file=en_US.dic
+ aff_file=en_US.aff
+ ln -s /snap/thunderbird/609/usr/share/hunspell/en_US.dic /var/snap/thunderbird/common/snap-hunspell/en_US.dic
ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/en_US.dic': File exists
+ ln -s /snap/thunderbird/609/usr/share/hunspell/en_US.aff /var/snap/thunderbird/common/snap-hunspell/en_US.aff
ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/en_US.aff': File exists
+ basename /var/lib/snapd/hostfs/usr/share/hunspell/de_DE.dic
+ dic_file=de_DE.dic
+ aff_file=de_DE.aff
+ ln -s /snap/thunderbird/609/usr/share/hunspell/de_DE.dic /var/snap/thunderbird/common/snap-hunspell/de_DE.dic
ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/de_DE.dic': File exists
+ ln -s /snap/thunderbird/609/usr/share/hunspell/de_DE.aff /var/snap/thunderbird/common/snap-hunspell/de_DE.aff
ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/de_DE.aff': File exists
+ basename /var/lib/snapd/hostfs/usr/share/hunspell/de_BE.dic
+ dic_file=de_BE.dic
+ aff_file=de_BE.aff
+ ln -s /snap/thunderbird/609/usr/share/hunspell/de_BE.dic /var/snap/thunderbird/common/snap-hunspell/de_BE.dic
ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/de_BE.dic': File exists
+ ln -s /snap/thunderbird/609/usr/share/hunspell/de_BE.aff /var/snap/thunderbird/common/snap-hunspell/de_BE.aff
ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/de_BE.aff': File exists
+ basename /var/lib/snapd/hostfs/usr/share/hunspell/de_LU.dic
+ dic_file=de_LU.dic
+ aff_file=de_LU.aff
+ ln -s /snap/thunderbird/609/usr/share/hunspell/de_LU.dic /var/snap/thunderbird/common/snap-hunspell/de_LU.dic
ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/de_LU.dic': File exists
+ ln -s /snap/thunderbird/609/usr/share/hunspell/de_LU.aff /var/snap/thunderbird/common/snap-hunspell/de_LU.aff
ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/de_LU.aff': File exists
+ basename /var/lib/snapd/hostfs/usr/share/hunspell/de_med.dic
+ dic_file=de_med.dic
+ aff_file=de_med.aff
+ ln -s /snap/thunderbird/609/usr/share/hunspell/de_med.dic /var/snap/thunderbird/common/snap-hunspell/de_med.dic
ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/de_med.dic': File exists
+ ln -s /snap/thunderbird/609/usr/share/hunspell/de_med.aff /var/snap/thunderbird/common/snap-hunspell/de_med.aff
ln: failed to create symbolic link '/var/snap/thunderbird/common/snap-hunspell/de_med.aff': Permission denied

Thx to dear-github/dear-github#166 (comment) for teaching me how to use collapsible code blocks.

Also I noticed that all the files in /var/snap/thunderbird/common/snap-hunspell/ are pointing to /snap/thunderbird/634/usr/share/hunspell/... but I only have 601 and 609 for thunderbird snap 🤔

@seb128
Copy link
Contributor

seb128 commented Jan 31, 2025

@seb128: My output to the second command is as follows:

Thanks, and you are getting the same No such file or directory error from the ln command when trying to refresh? Could you perhaps also share you error log and the output of the ls commands asked previously?

The debug run of the script suggests that it's trying to do the right thing (the permission denied errors wouldn't not happen when snapd runs the script)

Also I noticed that all the files in /var/snap/thunderbird/common/snap-hunspell/ are pointing to /snap/thunderbird/634/usr/share/hunspell/... but I only have 601 and 609 for thunderbird snap 🤔

I guess that's probably because the post-refresh hook managed to create part of those on the new revision before hitting the error and rolling back

@fullflyt
Copy link

fullflyt commented Feb 2, 2025

I did sudo rm /usr/share/hunspell/et_EE.dic and sudo rm /usr/share/hunspell/et_EE.aff and sudo snap refresh --list and got All snap-packages are updated. It seems all works again. The update of firefox has been an issue for a long time.

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

No branches or pull requests

10 participants