[snap version 4.4.2] UnsatisfiedLinkError libawt_xawt.so (Xubuntu 24.04 LTS Noble Numbat)

Issue #81 closed
Gilles GAIDO created an issue

Hi Eloy

I’m sorry, I am facing an error when launching wallpaperdownloader (the latest version 4.4.2 ) as a SNAP on my platform :

gilles@xubuntu24:~$ wallpaperdownloader
log4j:WARN File option not set for appender [logfile].
log4j:WARN Are you using FileAppender instead of ConsoleAppender?
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /snap/wallpaperdownloader/34/usr/lib/jvm/java-17-openjdk-amd64/lib/libawt_xawt.so
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2398)
    at java.base/java.lang.Runtime.load0(Runtime.java:755)
    at java.base/java.lang.System.load(System.java:1957)
    at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
    at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
    at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
    at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
    at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:315)
    at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:285)
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2403)
    at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
    at java.base/java.lang.System.loadLibrary(System.java:1993)
    at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1388)
    at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1386)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
    at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1385)
    at java.desktop/java.awt.Toolkit.initStatic(Toolkit.java:1423)
    at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1397)
    at java.desktop/java.awt.Component.<clinit>(Component.java:624)
    at es.estoes.wallpaperDownloader.window.WallpaperDownloader.<clinit>(WallpaperDownloader.java:125)
    at es.estoes.wallpaperDownloader.Main.main(Main.java:25) 

Scenario :

  • i make a xubuntu 24 fresh install
  • i update the packages

    • sudo apt update
    • sudo apt upgrade
  • i install wallpaperdownloader

    • sudo snap install wallpaperdownloader
  • i launch wallpaperdownloader using my user account

    • wallpaperdownloader

NB : I just made a fresh install on a virtual machine to ensure the reproducibility.

Here is some additional info :

gilles@xubuntu24:~$ snap version
snap    2.62+24.04build1
snapd   2.62+24.04build1
series  16
ubuntu  24.04
kernel  6.8.0-31-generic

gilles@xubuntu24:~$ snap list
Name                       Version          Rev    Tracking         Publisher   Notes
bare                       1.0              5      latest/stable    canonical✓  base
core22                     20240408         1380   latest/stable    canonical✓  base
firefox                    125.0.2-1        4173   latest/stable/…  mozilla✓    -
firmware-updater           0+git.5007558    127    latest/stable/…  canonical✓  -
gnome-42-2204              0+git.510a601    176    latest/stable/…  canonical✓  -
gtk-common-themes          0.1-81-g442e511  1535   latest/stable/…  canonical✓  -
snap-store                 0+git.97116aa    1134   latest/stable/…  canonical✓  -
snapd                      2.62             21465  latest/stable    canonical✓  snapd
snapd-desktop-integration  0.9              157    latest/stable/…  canonical✓  -
thunderbird                115.10.1-1       470    latest/stable/…  canonical✓  -
wallpaperdownloader        4.4.2            34     latest/stable    egarcia     -
gilles@xubuntu24:~$

Comments (15)

  1. Gilles GAIDO reporter

    (I could not tag with the release 4.4.2 because not available in the dropdown)

    Thank you very much for your help

    Best regards

    Gilles

  2. Gilles GAIDO reporter

    Hi
    very same issue on my laptop with the previous Xubuntu version 22.04 after the snaps automatic refresh

    Regards

    Gilles

  3. Eloy García Almadén repo owner

    Hi again Gilles and thank you very much for reporting! Yep, I have tested it in a virtual machine and you are totally right.

    It is again a problem related to the snap package 😭 Something has changed in the way that the snap store validates the snap package and I had to use the headless version of the JRE in order to pass all the automated tests the snap store has. Something that in previously versions worked, now it isn’t, so I have to investigate this problem.

    I’ll keep you inform!

  4. Txomin Fidalgo

    I have the same problem, after update from 4.4.1 and launching, i have:

    Gtk-WARNING **: 23:00:23.172: Loading IM context type 'ibus' failed
    (base) txomin@Asimov:~$ sudo snap refresh wallpaperdownloader
    Se ha refrescado wallpaperdownloader 4.4.2 por Eloy Garcia (egarcia)
    (base) txomin@Asimov:~$ wallpaperdownloader
    log4j:WARN File option not set for appender [logfile].
    log4j:WARN Are you using FileAppender instead of ConsoleAppender?
    Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /snap/wallpaperdownloader/34/usr/lib/jvm/java-17-openjdk-amd64/lib/libawt_xawt.so
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2398)
    at java.base/java.lang.Runtime.load0(Runtime.java:755)
    at java.base/java.lang.System.load(System.java:1957)
    at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
    at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
    at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
    at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
    at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:315)
    at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:285)
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2403)
    at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
    at java.base/java.lang.System.loadLibrary(System.java:1993)
    at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1388)
    at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1386)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
    at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1385)
    at java.desktop/java.awt.Toolkit.initStatic(Toolkit.java:1423)
    at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1397)
    at java.desktop/java.awt.Component.<clinit>(Component.java:624)
    at es.estoes.wallpaperDownloader.window.WallpaperDownloader.<clinit>(WallpaperDownloader.java:125)
    at es.estoes.wallpaperDownloader.Main.main(Main.java:25)

  5. Eloy García Almadén repo owner

    Hi @Txomin Fidalgo and thank you for reporting.

    I think it is fixed. I have just released version 4.4.2-1 in the Snap Store that should work again. Could you @Txomin Fidalgo and @Gilles GAIDO both test it and tell me?

    Thank you very much for your help.

    Best,

    Eloy

  6. Gilles GAIDO reporter

    Hi Eloy

    thanks a lot, I confirm that it works now on both platforms (my laptop xubuntu 22 + my VM xubuntu 24)

    Problem is fixed !

    Best regards

    Gilles

    PS :

    another manual way seems to works fine on XFCE, no packaging needed, I use the jar available here ( https://bitbucket.org/eloy_garcia_pca/wallpaperdownloader/src/master/wallpaperdownloader.jar )

    I’ve downloaded a JDK 17 (from adoptium) and configured this command at startup :

    /home/gilles/Downloads/jdk-17.0.11+9/bin/java   -jar /home/gilles/Downloads/wallpaperdownloader.jar
    

    All wallpaperdownloader’s features are available, including the changer

  7. Gilles GAIDO reporter

    Please, is there any VM option dedicated to set the download folder thru the command line ?
    (I mean something like -Dmy.custom.folder=/home/gilles/Pictures/myWallpapers )

  8. Eloy García Almadén repo owner

    Hi again!

    Yep, you are right. Downloading the jar package and running it natively is a great way to obtain those features that are not available via the snap package. It is documented in the project’s Wiki here https://bitbucket.org/eloy_garcia_pca/wallpaperdownloader/wiki/Installation You can use some VM options to restrict the memory used by the application. Check all the information. The only inconvenient is that the application won’t be updated automatically. That’s why if you want all the features and receive all the updates, you can switch to the Flatpak version.

    On the other hand, there isn’t any VM option to set the download folder during running time. This is a configuration parameter that can be changed editing **.wallpaperdownloader/config.txt** called **es.estoes.wallpaperDownloader.window.application-downloads-folder**

    I hope this helps!

    I’m going to close this issue. If you want to discuss anything else, feel free to open another one 🙂

    Thank you again for your feedback.

    Best,

    Eloy

  9. Log in to comment