Skip to content

Cannot open library #30

Open
Open

Description

@creperozelot

I installed the library jdave to maintain our audio bot in discord with thier newer standards.

I got this error message:

2026-03-07 15:54:59.699 ERROR [JDA MainWS-ReadThread] n.d.j.i.requests.WebSocketClient - There was an error in the WebSocket connection. Trace: [["gateway-prd-arm-us-east1-d-rz0h",{"micros":14452
5,"calls":["id_created",{"micros":293,"calls":[]},"session_lookup_time",{"micros":3105,"calls":[]},"session_lookup_finished",{"micros":10,"calls":[]},"discord-sessions-prd-2-159",{"micros":140785
,"calls":["start_session",{"micros":138152,"calls":["discord-api-rpc-56d9cf585d-fflg4",{"micros":60107,"calls":["get_user",{"micros":14005},"get_guilds",{"micros":4931},"send_scheduled_deletion_m
essage",{"micros":10},"guild_join_requests",{"micros":2},"authorized_ip_coro",{"micros":12},"pending_payments",{"micros":2095},"apex_experiments",{"micros":62585},"sessions_experiments",{"micros"
:7},"user_activities",{"micros":4},"played_application_ids",{"micros":4},"linked_users",{"micros":4},"ad_personalization_toggles_disabled",{"micros":3},"regional_feature_config",{"micros":4}]}]},
"starting_guild_connect",{"micros":53,"calls":[]},"presence_started",{"micros":308,"calls":[]},"guilds_started",{"micros":63,"calls":[]},"lobbies_started",{"micros":1,"calls":[]},"guilds_connect"
,{"micros":1,"calls":[]},"presence_connect",{"micros":2180,"calls":[]},"connect_finished",{"micros":2192,"calls":[]},"build_ready",{"micros":12,"calls":[]},"clean_ready",{"micros":2,"calls":[]},"
optimize_ready",{"micros":0,"calls":[]},"split_ready",{"micros":1,"calls":[]}]}]}]]
java.lang.ExceptionInInitializerError: null
        at club.minnced.discord.jdave.ffi.LibDaveSessionBinding.<clinit>(LibDaveSessionBinding.java:113)
        at club.minnced.discord.jdave.DaveSessionImpl.create(DaveSessionImpl.java:26)
        at club.minnced.discord.jdave.manager.DaveSessionManager.<init>(DaveSessionManager.java:36)
        at club.minnced.discord.jdave.manager.DaveSessionManager.create(DaveSessionManager.java:54)
        at club.minnced.discord.jdave.interop.JDaveSession.<init>(JDaveSession.java:16)
        at club.minnced.discord.jdave.interop.JDaveSessionFactory.createDaveSession(JDaveSessionFactory.java:12)
        at net.dv8tion.jda.internal.audio.AudioConnection.<init>(AudioConnection.java:115)
        at net.dv8tion.jda.internal.handle.VoiceServerUpdateHandler.lambda$handleInternally$0(VoiceServerUpdateHandler.java:89)
        at net.dv8tion.jda.api.utils.MiscUtil.locked(MiscUtil.java:139)
        at net.dv8tion.jda.internal.handle.VoiceServerUpdateHandler.handleInternally(VoiceServerUpdateHandler.java:81)
        at net.dv8tion.jda.internal.handle.SocketHandler.handle(SocketHandler.java:39)
        at net.dv8tion.jda.internal.requests.WebSocketClient.onDispatch(WebSocketClient.java:936)
        at net.dv8tion.jda.internal.requests.WebSocketClient.onEvent(WebSocketClient.java:826)
        at net.dv8tion.jda.internal.requests.WebSocketClient.handleEvent(WebSocketClient.java:809)
        at net.dv8tion.jda.internal.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:980)
        at com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385)
        at com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276)
        at com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996)
        at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:755)
        at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108)
        at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64)
        at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)
Caused by: java.lang.ExceptionInInitializerError: null
        at club.minnced.discord.jdave.ffi.LibDaveSessionBinding.<clinit>(LibDaveSessionBinding.java:37)
        ... 21 common frames omitted
Caused by: java.lang.IllegalArgumentException: Cannot open library: /tmp/jdave11547943059811674748/dave9096768902076792803.so
        at java.base/java.lang.foreign.SymbolLookup.libraryLookup(SymbolLookup.java:350)
        at java.base/java.lang.foreign.SymbolLookup.libraryLookup(SymbolLookup.java:335)
        at club.minnced.discord.jdave.utils.NativeLibraryLoader.getSymbolLookup(NativeLibraryLoader.java:50)
        at club.minnced.discord.jdave.ffi.LibDaveLookup.<clinit>(LibDaveLookup.java:16)
        ... 22 common frames omitted

this are the permission of the file:

root@manage:/home/discord/musicbot# ls -l /tmp/jdave11547943059811674748/dave9096768902076792803.so 
-rw------- 1 root root 9570512 Mar  7 15:54 /tmp/jdave11547943059811674748/dave9096768902076792803.so

i guess the error is that the file isn't executable.
However i also cannot edit the tmp directory via default methods

See here:

new File(System.getProperty("user.dir") + "/tmp").mkdir();
System.setProperty("java.io.tmpdir", System.getProperty("user.dir") + "/tmp");

Possible to edit the tmp directory?
Or any other solution to this case?

Ty

Activity

  1. creperozelot commented on Mar 7, 2026

    @creperozelot
    Author

    Edit: Locally on my windows machine everything just works fine.

  2. MinnDevelopment commented on Mar 7, 2026

    @MinnDevelopment
    Owner

    What linux distribution are you using? You likely have a GLIBC version that is too old for this library. You can use ldd -r /tmp/jdave11547943059811674748/dave9096768902076792803.so to check for linker errors.

  3. creperozelot commented on Mar 7, 2026

    @creperozelot
    Author

    I am using Debian 12

    thats the output I got from the command:

    root@manage:~# ldd -r /tmp/jdave11547943059811674748/dave9096768902076792803.so
    /tmp/jdave11547943059811674748/dave9096768902076792803.so: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /tmp/jdave11547943059811674748/dave9096768902076792803.so)
    /tmp/jdave11547943059811674748/dave9096768902076792803.so: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /tmp/jdave11547943059811674748/dave9096768902076792803.so)
            linux-vdso.so.1 (0x00007ffc12995000)
            libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f6ffdc00000)
            libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6ffdfe0000)
            libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6ffda1e000)
            libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6ffdf00000)
            /lib64/ld-linux-x86-64.so.2 (0x00007f6ffe2fa000)
    undefined symbol: __isoc23_strtoll, version GLIBC_2.38  (/tmp/jdave11547943059811674748/dave9096768902076792803.so)
    undefined symbol: __isoc23_strtoull, version GLIBC_2.38 (/tmp/jdave11547943059811674748/dave9096768902076792803.so)
    undefined symbol: __isoc23_strtol, version GLIBC_2.38   (/tmp/jdave11547943059811674748/dave9096768902076792803.so)
    root@manage:~# 
    
  4. MinnDevelopment commented on Mar 7, 2026

    @MinnDevelopment
    Owner

    Then I would recommend updating to a newer version or using docker images. This library expects GLIBC 2.38 at the moment as you can see in the output of that command.

  5. creperozelot commented on Mar 8, 2026

    @creperozelot
    Author

    hmm.. okay thank that helps a lot.
    As quick question, possible to specify a library path as System Property?
    e.g.

    System.setProperty("LD_LIBRARY_PATH", "/path/to/newer/version");
  6. creperozelot commented on Mar 8, 2026

    @creperozelot
    Author

    As small addition, I guess it would be helpfull for a small information that this library requires glib 2.38 or higher in order to run properly

    Ty in advance

  7. zfcmoe commented on Mar 9, 2026

    @zfcmoe

    @creperozelot I opened a PR that has a workaround for this, if you're willing to build libdave from source (which is surprisingly annoying).

  8. creperozelot commented on Mar 16, 2026

    @creperozelot
    Author

    Thanks, actually it is not necessarily required to compile this from source, since many distributions already provide a third-party version for download, even if it is not included directly in the system packages.

    EDIT: As Addition I (or any contributor) will/can close this issue on merge on #31

  9. MinnDevelopment commented on Mar 29, 2026

    @MinnDevelopment
    Owner

    As quick question, possible to specify a library path as System Property?

    I've released 0.1.8 with a new system property for this. You should be able to load it from a path using -Djdave.library.path=/path/to/libdave.so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions