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

JCEF preview fails on Linux: UnsatisfiedLinkError: /opt/clion/jbr/lib/libjcef.so: libnss3.so: cannot open shared object file #659

Closed
sentry-io bot opened this issue Feb 5, 2021 · 3 comments
Assignees

Comments

@sentry-io
Copy link

sentry-io bot commented Feb 5, 2021

Reported for CLion Version 2020.2 running on Linux (unknown distro).
Plugin version 0.32.15

Sentry Issue: ASCIIDOC-INTELLIJ-PLUGIN-Q

UnsatisfiedLinkError: /opt/clion/jbr/lib/libjcef.so: libnss3.so: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load0(ClassLoader.java)
    at java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
    at java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2648)
    at java.lang.Runtime in loadLibrary0 at line 830
    at java.lang.System in loadLibrary at line 1870
    at org.cef.SystemBootstrap$1 in loadLibrary at line 24
    at org.cef.SystemBootstrap in loadLibrary at line 36
    at org.cef.CefApp in startup at line 544
    at com.intellij.ui.jcef.JBCefApp in <init> at line 64
    at com.intellij.ui.jcef.JBCefApp in <init> at line 38
    at com.intellij.ui.jcef.JBCefApp$Holder in <clinit> at line 133
    at com.intellij.ui.jcef.JBCefApp in getInstance at line 113
    at com.intellij.ui.jcef.JCEFHtmlPanel in <clinit> at line 18
    at org.asciidoc.intellij.editor.jcef.AsciiDocJCEFHtmlPanelProvider in createHtmlPanel at line 17
    at org.asciidoc.intellij.editor.AsciiDocPreviewEditor in detachOldPanelAndCreateAndAttachNewOne at line 361
    at org.asciidoc.intellij.editor.AsciiDocPreviewEditor in <init> at line 283
    at org.asciidoc.intellij.editor.AsciiDocPreviewEditorProvider in createEditor at line 61
    at org.asciidoc.intellij.ui.SplitTextEditorProvider$2 in build at line 135
...
(88 additional frame(s) were not displayed)
@ahus1
Copy link
Contributor

ahus1 commented Feb 5, 2021

It seems that a dependency libnss3.so is missing for the JCEF preview to initialize.

Possible directions to take here:

  • reproduce the issue in a custom Linux VM
  • when checking which kind of preview is available (JCEF or JavaFX), evaluate the condition that failed in the stack trace above earlier to allow a fallback to JavaFX is JCEF doesn't work
  • offer an editor notification for users directing them to a page in the manual with a remedy (for example installing a missing package)
  • for sentry reported errors, include the distro and version used, so reproducing the issue is simpler Report additional context information via Sentry #660
  • raise this issue as a JetBrains issue as there is already an API JBCefApp.isSupported() that obviously failed here

@ahus1 ahus1 changed the title UnsatisfiedLinkError: /opt/clion/jbr/lib/libjcef.so: libnss3.so: cannot open shared object file: No such file or directory JCEF preview fails on Linux: UnsatisfiedLinkError: /opt/clion/jbr/lib/libjcef.so: libnss3.so: cannot open shared object file Feb 5, 2021
@ahus1 ahus1 self-assigned this Feb 23, 2021
@ahus1
Copy link
Contributor

ahus1 commented Mar 26, 2021

Similar exception: IC 2020.3.2

java.lang.Throwable: /var/lib/snapd/snap/intellij-idea-community/273/jbr/lib/libjcef.so: libXss.so.1: cannot open shared object file: No such file or directory
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:159)
    at com.intellij.ui.jcef.JBCefApp.<init>(JBCefApp.java:86)
    at com.intellij.ui.jcef.JBCefApp$Holder.<clinit>(JBCefApp.java:217)
    at com.intellij.ui.jcef.JBCefApp.getInstance(JBCefApp.java:194)
    at com.intellij.ui.jcef.JCEFHtmlPanel.<clinit>(JCEFHtmlPanel.java:18)
    at org.asciidoc.intellij.editor.jcef.AsciiDocJCEFHtmlPanelProvider.createHtmlPanel(AsciiDocJCEFHtmlPanelProvider.java:17)
    at org.asciidoc.intellij.editor.AsciiDocPreviewEditor.detachOldPanelAndCreateAndAttachNewOne(AsciiDocPreviewEditor.java:361)
    at org.asciidoc.intellij.editor.AsciiDocPreviewEditor.<init>(AsciiDocPreviewEditor.java:283)
    at org.asciidoc.intellij.editor.AsciiDocPreviewEditorProvider.createEditor(AsciiDocPreviewEditorProvider.java:61)
    at org.asciidoc.intellij.ui.SplitTextEditorProvider$2.build(SplitTextEditorProvider.java:135)
    at org.asciidoc.intellij.ui.SplitTextEditorProvider$1.build(SplitTextEditorProvider.java:62)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4Edt(FileEditorManagerImpl.java:891)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.lambda$openFileImpl4$17(FileEditorManagerImpl.java:860)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.runBulkTabChange(FileEditorManagerImpl.java:1680)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.lambda$openFileImpl4$18(FileEditorManagerImpl.java:859)
    at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:463)
    at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:481)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4(FileEditorManagerImpl.java:858)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl3(FileEditorManagerImpl.java:804)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.lambda$openFileImpl2$14(FileEditorManagerImpl.java:785)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:220)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:177)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:167)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:153)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl2(FileEditorManagerImpl.java:785)
    at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileWithProviders(FileEditorManagerImpl.java:678)
    at com.intellij.openapi.fileEditor.ex.FileEditorManagerEx.openFile(FileEditorManagerEx.java:126)
    at org.asciidoc.intellij.editor.AsciiDocSplitEditorProvider.lambda$new$0(AsciiDocSplitEditorProvider.java:40)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1000)
    at org.asciidoc.intellij.editor.AsciiDocSplitEditorProvider.lambda$new$1(AsciiDocSplitEditorProvider.java:37)

@ahus1
Copy link
Contributor

ahus1 commented Apr 24, 2021

Reported upstream. https://youtrack.jetbrains.com/issue/IDEA-267885

Closing this issue for now as there is nothing the plugin can do to prevent this error to be logged.
Will revisit it again once the upstream issue receives attention.

@ahus1 ahus1 closed this as completed Apr 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant