You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use an Alpine Linux-based Java container
Include the Bitwarden Java SDK as a dependency
Initialize the BitwardenClient in your application
Start the application
Expected Result
No errors on startup.
Actual Result
When starting we get the error:
Caused by: java.lang.UnsatisfiedLinkError: Error loading shared library libgcc_s.so.1: No such file or directory (needed by /root/.cache/JNA/temp/jna14893307320661373708.tmp)
After adding libgcc to the image:
Caused by: java.lang.UnsatisfiedLinkError: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /root/.cache/JNA/temp/jna9475222242932529641.tmp)
Screenshots or Videos
No response
Additional Context
The BitwardenService fails to initialize in Alpine Linux containers due to JNA compatibility issues with musl libc. The application crashes on startup with native library loading errors.
Operating System
Linux
Operating System Version
docker.io/eclipse-temurin:21-jre-alpine
Build Version
1.0.1
Issue Tracking Info
I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
The text was updated successfully, but these errors were encountered:
I ran into this same issue, and found a solution for myself by building a custom native library.
What the issue is
Alpine uses musl instead of gnu. The rust build does not produce a *.so file for the musl version of the library, only *.a. Java native interfaces expects a *.so file for Linux based OSes. Java will only use a *.a library for AIX based systems. ref
There is currently an open issue on rust about generating the dylib on musl systems: rust-lang/rust#59302
This is what I used to get my build working.
Work Around
The work around is to do a custom build for musl based systems, this will overwrite the gnu version of the *.so file and allow your application to run in Alpine, but probably won't run in GNU based containers.
Steps To Reproduce
Use an Alpine Linux-based Java container
Include the Bitwarden Java SDK as a dependency
Initialize the BitwardenClient in your application
Start the application
Expected Result
No errors on startup.
Actual Result
When starting we get the error:
After adding libgcc to the image:
Screenshots or Videos
No response
Additional Context
The BitwardenService fails to initialize in Alpine Linux containers due to JNA compatibility issues with musl libc. The application crashes on startup with native library loading errors.
Operating System
Linux
Operating System Version
docker.io/eclipse-temurin:21-jre-alpine
Build Version
1.0.1
Issue Tracking Info
The text was updated successfully, but these errors were encountered: