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

AppImage requires LD_PRELOAD of libnss3.so #435

Open
michjans opened this issue Apr 24, 2020 · 2 comments
Open

AppImage requires LD_PRELOAD of libnss3.so #435

michjans opened this issue Apr 24, 2020 · 2 comments

Comments

@michjans
Copy link

Hello,
I have created an AppImage on Ubuntu 16.04 of an application based on Qt 5.12 that makes use of a QWebEngineView. When I ran the AppImage for the first time, the applications starts fine, but as soon as I open a URL in the QWebEngineView then the same problem occured as mentioned in issue #35

I added the missing library libsoftokn3.so to the libraries in my AppImage and generated it again. Then the following error occurs as soon as I open a URL in the QWebEngineView:

[4135:4369:0424/101254.058992:ERROR:nss_util.cc(674)] Error initializing NSS with a persistent database (sql:/home/mjansen/.pki/nssdb): NSS error code: -8023
[4135:4369:0424/101254.059057:ERROR:nss_util.cc(154)] Error initializing NSS without a persistent database: NSS error code: -8023
[4135:4369:0424/101254.059064:FATAL:nss_util.cc(156)] nss_error=-8023, os_error=0
Trace/breakpoint trap (core dumped)

The temporary solution is now to execute my AppImage as follows:

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnss3.so ./MyAppImage

The library libnss3.so is available in the AppImage

My question is: how can this be resolved without requiring the LD_PRELOAD to the AppImage execution?

Thanks,
Michiel

@michjans
Copy link
Author

I did some further reading in the issues related to #35 and one of them suggested to remove the nss related libraries from the AppImage.
So I passed the following option to the commandline of linuxdeployqt
-exclude-libs=libnss3.so,libnssutil3.so

Then after rebuilding the AppImage, the problem is gone.
I don't understand why this works, but for me it does.

@probonopd
Copy link
Owner

Thanks for reporting.

The reason why we are not excluding those was #35, #35 (comment) and AppImageCommunity/pkg2appimage#114. If we can prove that all distributions are shipping usable versions of libnss3.so and libnssutil3.so then we can consider adding them to the excludelist again.

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

No branches or pull requests

2 participants