flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

Flutter Inspector at the ide is not working

Open bzdbss opened this issue 1 year ago • 22 comments

What happened

Flutter Inspector at the ide is not working

Version information

Android Studio Hedgehog | 2023.1.1 • Flutter plugin io.flutter 76.3.3 • Dart plugin 231.9409

Error getting Flutter sdk information.

Exception

null

java.lang.IllegalStateException: JCEF is not supported in this env or failed to initialize
	at com.intellij.ui.jcef.JBCefApp.getInstance(JBCefApp.java:355)
	at com.intellij.ui.jcef.JBCefBrowserBase.lambda$new$3(JBCefBrowserBase.java:157)
	at com.intellij.util.ObjectUtils.notNull(ObjectUtils.java:123)
	at com.intellij.ui.jcef.JBCefBrowserBase.<init>(JBCefBrowserBase.java:157)
	at com.intellij.ui.jcef.JBCefBrowser.<init>(JBCefBrowser.java:189)
	at com.intellij.ui.jcef.JBCefBrowser.<init>(JBCefBrowser.java:149)
	at io.flutter.view.EmbeddedJcefBrowserTab.<init>(EmbeddedJcefBrowser.java:23)
	at io.flutter.view.EmbeddedJcefBrowser.openEmbeddedTab(EmbeddedJcefBrowser.java:61)
	at io.flutter.view.EmbeddedBrowser.openBrowserTabFor(EmbeddedBrowser.java:115)
	at io.flutter.view.EmbeddedBrowser.openPanel(EmbeddedBrowser.java:62)
	at io.flutter.view.FlutterView.lambda$addBrowserInspectorViewContent$3(FlutterView.java:294)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at io.flutter.view.FlutterView.lambda$addBrowserInspectorViewContent$4(FlutterView.java:294)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:829)
	at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:454)
	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:122)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:789)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:740)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:734)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:759)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:667)
	at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$7(IdeEventQueue.kt:571)
	at com.intellij.openapi.application.impl.ApplicationImpl.withoutImplicitRead(ApplicationImpl.java:1444)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:571)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:68)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:349)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:348)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:348)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:343)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:995)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:995)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$4(IdeEventQueue.kt:343)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:829)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:385)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

bzdbss avatar Dec 07 '23 08:12 bzdbss

Can confirm it, it is not working

PawnBreak2 avatar Dec 07 '23 18:12 PawnBreak2

What operating system are you two using? This occurs when JCEF is not supported and I've mostly heard of this happening on Linux. However, I think we should be catching this error and offering an option to open DevTools in the browser.

helin24 avatar Dec 07 '23 19:12 helin24

WIndows 11 wirh latest updates

On Thu, Dec 7, 2023, 21:03 Helin Shiah @.***> wrote:

What operating system are you two using? This occurs when JCEF is not supported and I've mostly heard of this happening on Linux. However, I think we should be catching this error and offering an option to open DevTools in the browser.

— Reply to this email directly, view it on GitHub https://github.com/flutter/flutter-intellij/issues/7119#issuecomment-1845942006, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYDT6ZEFGAHXLGCRSUHSX2LYIIHIJAVCNFSM6AAAAABAKU7KOGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBVHE2DEMBQGY . You are receiving this because you authored the thread.Message ID: @.***>

bzdbss avatar Dec 08 '23 11:12 bzdbss

macOS 13.6

PawnBreak2 avatar Dec 11 '23 03:12 PawnBreak2

It doesn’t work

  • macOS 14.2.1 (intel)
  • plugin 77.1.2
  • Android Studio 2023.1.1 image

elton11220 avatar Dec 21 '23 11:12 elton11220

There is a workaround if you change the Boot Runtime for the IDE to one with JCEF:

  • Open the Navigate -> "Search everywhere" (or search icon top right)
  • Search for "Choose Boot Java Runtime for the IDE..."
  • Select a runtime that has "with JCEF" in its name
  • Restart IDE The flutter inspector now should show up.

There is a workaround if you change the Boot Runtime for the IDE to one with JCEF:

  • Open the Navigate -> "Search everywhere" (or search icon top right)
  • Search for "Choose Boot Java Runtime for the IDE..."
  • Select a runtime that has "with JCEF" in its name
  • Restart IDE The flutter inspector now should show up.

The problem is fixed. Thanks a lot

ocakliemre avatar Dec 25 '23 07:12 ocakliemre

same issue on Flutter plugin 77.1.2 and Android Studio Hedgehog | 2023.1.1

sadjadtalakoob74 avatar Dec 31 '23 12:12 sadjadtalakoob74

There is a workaround if you change the Boot Runtime for the IDE to one with JCEF:

  • Open the Navigate -> "Search everywhere" (or search icon top right)
  • Search for "Choose Boot Java Runtime for the IDE..."
  • Select a runtime that has "with JCEF" in its name
  • Restart IDE The flutter inspector now should show up.

it stops my virtual VM devices from working

sadjadtalakoob74 avatar Dec 31 '23 12:12 sadjadtalakoob74

Inspector says no error but it is getting not loaded, also older version's with JCEF under "more" are slowing down extremely Android Studio. Mac m1. Flutter plugin 77.1.2, AS Hedgehog | 2023.1.1

GemsAlex avatar Jan 02 '24 10:01 GemsAlex

There is a workaround if you change the Boot Runtime for the IDE to one with JCEF:

  • Open the Navigate -> "Search everywhere" (or search icon top right)
  • Search for "Choose Boot Java Runtime for the IDE..."
  • Select a runtime that has "with JCEF" in its name
  • Restart IDE The flutter inspector now should show up.

Thanks @patrickseiter-hkcsoftware ! This is what we're recommending as well. This stackoverflow link provides a bit more context: https://stackoverflow.com/questions/69171807/markdown-editor-and-preview-not-working-in-android-studio

it stops my virtual VM devices from working

@sadjadtalakoob74 can you describe what VM devices you're using and what (if any) error messages you see as a result? I wonder if there are other JREs that would allow both the embedded inspector and your devices to work.

Inspector says no error but it is getting not loaded, also older version's with JCEF under "more" are slowing down extremely Android Studio. Mac m1. Flutter plugin 77.1.2, AS Hedgehog | 2023.1.1

@GemsAlex this sounds like a separate issue. Are you able to reproduce this and send me a log ([email protected])? Go to Help > Show log in finder and find idea.log.

helin24 avatar Jan 04 '24 20:01 helin24

@helin24 Can't reproduce the slow down. Anyway now I am getting an idea error after few sec open flutter inspector : GPU process restarts too many times and seems to be unstable. Try to restart IDE or disable GPU acceleration completely

GemsAlex avatar Jan 16 '24 12:01 GemsAlex

Same issue on MacOS

"The embedded browser failed to load. Error JCEF is not supported in this env or failed to initialize"

Flutter plugin: 77.1.2 Android Studio Hedgehog | 2023.1.1 Patch 2 Build #AI-231.9392.1.2311.11330709, built on January 19, 2024 Runtime version: 17.0.7+0-17.0.7b1000.6-10550314 aarch64

nickolight avatar Jan 24 '24 16:01 nickolight

@helin24 Can't reproduce the slow down. Anyway now I am getting an idea error after few sec open flutter inspector : GPU process restarts too many times and seems to be unstable. Try to restart IDE or disable GPU acceleration completely

same

PawnBreak2 avatar Jan 24 '24 22:01 PawnBreak2

There is a workaround if you change the Boot Runtime for the IDE to one with JCEF:

  • Open the Navigate -> "Search everywhere" (or search icon top right)
  • Search for "Choose Boot Java Runtime for the IDE..."
  • Select a runtime that has "with JCEF" in its name
  • Restart IDE The flutter inspector now should show up.

Thank you! Fixed my issue on Ubuntu and Android Studio Hedgehog 2023.1.1 Patch 2 and Flutter 3.16.3 and Flutter plugin 77.1.2

CryptoSoo avatar Jan 29 '24 13:01 CryptoSoo

There is a workaround if you change the Boot Runtime for the IDE to one with JCEF:

  • Open the Navigate -> "Search everywhere" (or search icon top right)
  • Search for "Choose Boot Java Runtime for the IDE..."
  • Select a runtime that has "with JCEF" in its name
  • Restart IDE The flutter inspector now should show up.

Thank you! You save my time.

wangkunlin avatar Feb 01 '24 07:02 wangkunlin

@helin24 Can't reproduce the slow down. Anyway now I am getting an idea error after few sec open flutter inspector : GPU process restarts too many times and seems to be unstable. Try to restart IDE or disable GPU acceleration completely

Select Help | Find Action from the main menu, type Registry..., select it and in the opened list, find and disable the ide.browser.jcef.sandbox.enable options here, restart the IDEA.

git-boya avatar Feb 02 '24 01:02 git-boya

Screenshot 2024-02-02 at 13 18 31 Disabling the GPU doesn't help

fgatti675 avatar Feb 02 '24 12:02 fgatti675

same issue GPU too many restarts and no way to go back!

shadyshrif avatar Feb 07 '24 10:02 shadyshrif

I found a way just to go back to the initial state, sadly! Screenshot 2024-02-07 at 10 08 06 Now I have to work with the browser, I'm using MacBook Pro M3 Pro

shadyshrif avatar Feb 07 '24 10:02 shadyshrif

still same issue

Android Studio Hedgehog | 2023.1.1 Patch 2 Build #AI-231.9392.1.2311.11330709, built on January 18, 2024 Runtime version: 17.0.7+0-17.0.7b1000.6-10550314 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

[✓] Flutter (Channel stable, 3.16.9, on macOS 14.1.1 23B81 darwin-arm64, locale en-GB)

martipello avatar Feb 28 '24 09:02 martipello

There is a workaround if you change the Boot Runtime for the IDE to one with JCEF:

  • Open the Navigate -> "Search everywhere" (or search icon top right)
  • Search for "Choose Boot Java Runtime for the IDE..."
  • Select a runtime that has "with JCEF" in its name
  • Restart IDE The flutter inspector now should show up.

Thanks a lot. This works on me in macOS with Android Studio Giraffe 2022.3.1 Patch 4

RandallXia avatar Mar 19 '24 05:03 RandallXia