flutter / flutter-intellij

Flutter Plugin for IntelliJ
https://flutter.dev/using-ide
BSD 3-Clause "New" or "Revised" License
1.98k stars 319 forks source link

UnsatisfiedLinkError: Can't load library: /var/folders/rm/kxzmfzgd5pg30cj6s83j5rbc003j4x/T/JxBrowser/7.15/libawt_helper.dylib #5594

Open devoncarew opened 3 years ago

devoncarew commented 3 years ago

What happened

I opened a Flutter project.

Version information

IntelliJ IDEA 2021.1.2 • Flutter plugin io.flutter 57.0.6-dev.5 • Dart plugin 211.7233

No Flutter sdk configured.

Exception

null

java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/rm/kxzmfzgd5pg30cj6s83j5rbc003j4x/T/JxBrowser/7.15/libawt_helper.dylib
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630)
    at java.base/java.lang.Runtime.load0(Runtime.java:768)
    at java.base/java.lang.System.load(System.java:1837)
    at com.teamdev.jxbrowser.internal.JniLibrary.loadLibrary(JniLibrary.java:53)
    at com.teamdev.jxbrowser.internal.JniLibrary.lambda$new$0(JniLibrary.java:47)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at com.teamdev.jxbrowser.internal.JniLibrary.<init>(JniLibrary.java:45)
    at com.teamdev.jxbrowser.internal.AwtHelperLibrary.<init>(AwtHelperLibrary.java:46)
    at com.teamdev.jxbrowser.internal.AwtHelperLibrary.instance(AwtHelperLibrary.java:36)
    at com.teamdev.jxbrowser.view.swing.internal.OffScreenRenderWidget.<init>(OffScreenRenderWidget.java:121)
    at com.teamdev.jxbrowser.view.swing.internal.IoSurfaceRenderWidget.<init>(IoSurfaceRenderWidget.java:36)
    at com.teamdev.jxbrowser.view.swing.BrowserView.createBrowserWidget(BrowserView.java:170)
    at com.teamdev.jxbrowser.view.swing.BrowserView.<init>(BrowserView.java:103)
    at com.teamdev.jxbrowser.view.swing.BrowserView.newInstance(BrowserView.java:76)
    at io.flutter.jxbrowser.EmbeddedBrowser.lambda$openPanel$1(EmbeddedBrowser.java:135)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:218)
    at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:21)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:200)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:319)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:133)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:46)
    at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:189)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:969)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:839)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:496)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
devoncarew commented 3 years ago

cc @helin24

devoncarew commented 3 years ago

This was from a 2.3 GHz 8-Core Intel Core i9 2019 macbook pro.

devoncarew commented 3 years ago

For more info on the failure, I do see a /var/folders/rm/kxzmfzgd5pg30cj6s83j5rbc003j4x/T/JxBrowser/7.15/ directory on my machine (which I assume might be a temp dir?), but it does not contain a libawt_helper.dylib file.

drwxr-xr-x  3 devoncarew  primarygroup      96 Apr 30 01:44 Chromium.app/
-rwxr-xr-x  1 devoncarew  primarygroup  424064 Apr 30 01:49 libbrowsercore_ipc.dylib*
-rwxr-xr-x  1 devoncarew  primarygroup  445968 Apr 30 01:49 libbrowsercore_toolkit.dylib*
devoncarew commented 3 years ago

A bit more info about my IntelliJ version:

IntelliJ IDEA 2021.1.2 (Community Edition)
Build #IC-211.7442.40, built on May 31, 2021
Runtime version: 11.0.11+9-b1341.57 x86_64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
macOS 11.4
GC: ParNew, ConcurrentMarkSweep
Memory: 3987M
Cores: 16
Non-Bundled Plugins: Dart (211.7665), io.flutter (57.0.6-dev.5), swingexplorer-plugin-v2 (2020.1-1.6.1), org.jetbrains.kotlin (211-1.5.20-release-284-IJ7442.40)
Kotlin: 211-1.5.20-release-284-IJ7442.40
vlad-lubenskyi commented 3 years ago

@devoncarew @helin24 would it be possible to enable JxBrowser logging and reproduce the issue one more time? This looks like the extraction has failed. In this I would expect to see 7z-related errors in the log output

matpag commented 3 years ago

Same crash for me

Spec:

MacBook Pro (13-inch, 2018)
MacOS BigSur 11.4
2,7 GHz Intel Core i7 quad-core
16 GB 2133 MHz LPDDR3

Android Studio 4.2.2
Flutter plugin io.flutter 58.0.1
Dart plugin 202.8531

Stacktrace:

java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/gc/l4bj1qg51yzgkhcmxrz7xnmh0000gn/T/JxBrowser/7.16/libawt_helper.dylib
  at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630)
  at java.base/java.lang.Runtime.load0(Runtime.java:768)
  at java.base/java.lang.System.load(System.java:1837)
  at com.teamdev.jxbrowser.internal.JniLibrary.loadLibrary(JniLibrary.java:53)
  at com.teamdev.jxbrowser.internal.JniLibrary.lambda$new$0(JniLibrary.java:47)
  at java.base/java.security.AccessController.doPrivileged(Native Method)
  at com.teamdev.jxbrowser.internal.JniLibrary.<init>(JniLibrary.java:45)
  at com.teamdev.jxbrowser.internal.AwtHelperLibrary.<init>(AwtHelperLibrary.java:46)
  at com.teamdev.jxbrowser.internal.AwtHelperLibrary.instance(AwtHelperLibrary.java:36)
  at com.teamdev.jxbrowser.view.swing.internal.OffScreenRenderWidget.<init>(OffScreenRenderWidget.java:122)
  at com.teamdev.jxbrowser.view.swing.internal.IoSurfaceRenderWidget.<init>(IoSurfaceRenderWidget.java:36)
  at com.teamdev.jxbrowser.view.swing.BrowserView.createBrowserWidget(BrowserView.java:170)
  at com.teamdev.jxbrowser.view.swing.BrowserView.<init>(BrowserView.java:103)
  at com.teamdev.jxbrowser.view.swing.BrowserView.newInstance(BrowserView.java:76)
  at io.flutter.jxbrowser.EmbeddedBrowser.lambda$openPanel$1(EmbeddedBrowser.java:134)
  at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:201)
  at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:808)
  at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:328)
  at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
  at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:132)
  at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
  at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:188)
  at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
  at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
  at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
  at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
  at java.base/java.security.AccessController.doPrivileged(Native Method)
  at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
  at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
  at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:971)
  at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:841)
  at com.intellij.ide.IdeEventQueue.lambda$null$8(IdeEventQueue.java:452)
  at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:744)
  at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:451)
  at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:808)
  at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:499)
  at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
  at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
  at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
  at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
  at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
  at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
helin24 commented 3 years ago

@matpag thanks for this report. Do you have verbose logging turned on? (Preferences > Languages and Frameworks > Flutter > enable verbose logging (under General). We're looking for jxbrowser logs to try to debug this problem.

matpag commented 3 years ago

Unfortunately no, I've enabled it now. If it happens again will add more info here