flutter / flutter-intellij

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

Flutter Inspector Not working #5911

Closed kevindmoore closed 1 month ago

kevindmoore commented 2 years ago

Thanks for the feedback! If your issue is related to the Flutter framework itself, please open an issue at github.com/flutter/flutter.

Steps to Reproduce

Run Flutter App in MacOs desktop. Open Flutter Inspector Mac M1 Pro computer.

Please tell us what you were doing and what went wrong

Version info

Please paste the output of running flutter doctor -v here (available from the command line or from Tools > Flutter > Flutter Doctor). It will provide the version of the Flutter framework as well as of the IntelliJ plugin. Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.8.1, on macOS 12.0.1 21A559 darwin-arm, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) [✓] Chrome - develop for the web [!] Android Studio ✗ Unable to find bundled Java version. [✓] Android Studio (version 2021.1) [✓] IntelliJ IDEA Ultimate Edition (version 2021.3) [✓] IntelliJ IDEA Community Edition (version 2021.2.3) [✓] Connected device (3 available)

! Doctor found issues in 1 category. ➜

What happened

(please describe what you were doing when this exception occurred)

Version information

Android Studio Bumblebee | 2021.1.1 RC 1 • Flutter plugin io.flutter 63.2.2 • Dart plugin 211.7798

Flutter 2.8.1 • channel stable • https://github.com/flutter/flutter.git Framework • revision 77d935af4d (5 weeks ago) • 2021-12-16 08:37:33 -0800 Engine • revision 890a5fca2e Tools • Dart 2.15.1

Exception

null

java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/w3/y5h_hty53t72s599n237kyh40000gn/T/JxBrowser/7.19/libawt_toolkit.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.IoSurfaceRenderWidget.<init>(IoSurfaceRenderWidget.java:40)
    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.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:787)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:325)
    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:787)
    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)
helin24 commented 2 years ago

@kevindmoore it looks like you have two Android Studio versions based on the flutter doctor output, and I'm not sure which is having the issue finding a Java version. Do you know the two versions of AS on your machine?

kevindmoore commented 2 years ago

This is with a Mac M1 Pro. I use both Bumblebee and Chipmunk

helin24 commented 2 years ago

Okay thanks! Chipmunk is 2021.2 so that seems to be the version with a Java issue, not Bumblebee which is where the error occurred (so it's not explained by Java version). Still investigating.

helin24 commented 2 years ago

@kevindmoore could you send me some logs?

Instructions:

  1. Go to Preferences > Languages & Frameworks > Flutter > check Enable verbose logging (under General)
  2. Reproduce the problem
  3. Go to Help > Show log in finder and send me idea.log
kevindmoore commented 2 years ago

So, this is definitely Bumblebee, Patch 2. I just tried showing the inspector but forgot to turn on verbose. I quit AS, restarted, then launched the app. Now the inspector works (of course). For the most part, this hasn't worked for me with Bumblebee. Sending log

Thanks, Kevin Moore

On Tue, Mar 22, 2022 at 11:17 AM Helin Shiah @.***> wrote:

@kevindmoore https://github.com/kevindmoore could you send me some logs?

Instructions:

  1. Go to Preferences > Languages & Frameworks > Flutter > check Enable verbose logging (under General)
  2. Reproduce the problem
  3. Go to Help > Show log in finder and send me idea.log

— Reply to this email directly, view it on GitHub https://github.com/flutter/flutter-intellij/issues/5911#issuecomment-1075470204, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALTM4WCPBY2LRBJXPXZYZLVBIFCZANCNFSM5MLV74UA . You are receiving this because you were mentioned.Message ID: @.***>

helin24 commented 2 years ago

@kevindmoore I don't see logs attached; could you try again? Although sadly they won't help if you had verbose on when the inspector did work.

kevindmoore commented 2 years ago

I see it attached to the email.

On Wed, Mar 23, 2022, 2:00 PM Helin Shiah @.***> wrote:

@kevindmoore https://github.com/kevindmoore I don't see logs attached; could you try again? Although sadly they won't help if you had verbose on when the inspector did work.

— Reply to this email directly, view it on GitHub https://github.com/flutter/flutter-intellij/issues/5911#issuecomment-1076815138, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALTM4U33ROZLE23HRMKDN3VBOA5RANCNFSM5MLV74UA . You are receiving this because you were mentioned.Message ID: @.***>

helin24 commented 2 years ago

Ah I see, I suspect attachments sent by email to github don't make it to the issue. Don't worry about it; the log won't include what we need without a reproduction with verbose logging enabled. If you're able to reproduce again though, you can try attaching the log directly here in issue comments.

helin24 commented 1 month ago

Closing as duplicate of https://github.com/flutter/flutter-intellij/issues/5594 which has more info