flutter-intellij: Flutter Inspector at the ide is not working

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)

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 11
  • Comments: 22 (2 by maintainers)

Most upvoted comments

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.

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

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

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

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

@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.

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

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

It doesn’t work

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

@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

@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

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 (helinx@google.com)? Go to Help > Show log in finder and find idea.log.