didalgolab / chatgpt-intellij-plugin

Yet another JetBrains extension that enables you to use ChatGPT within your favorite IDE.
Apache License 2.0
25 stars 13 forks source link

Does not run on Android Studio Hedgehog #15

Closed seinzer closed 3 months ago

seinzer commented 6 months ago

When I start the plugin I get the exception below.

Here is the version information. 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-b2043.56-10550314 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 11.0 GC: G1 Young Generation, G1 Old Generation Memory: 3072M Cores: 12 Registry: editor.focus.mode.color.light=9ba0a3 analyze.exceptions.on.the.fly=true ide.editor.tab.selection.animation=true external.system.auto.import.disabled=true debugger.new.tool.window.layout=true ide.text.editor.with.preview.show.floating.toolbar=false ide.new.editor.tabs.vertical.borders=true ide.experimental.ui=true ide.balloon.shadow.size=0 editor.focus.mode.color.dark=9ba0a3

Non-Bundled Plugins: PlantUML integration (6.5.0-IJ2022.2) com.intellij.marketplace (231.9392.3) com.intellij.aop (1.01) com.intellij.aspectj (1.2) com.didalgo.chatgpt (0.2.12-231) ee.carlrobert.chatgpt (2.4.0) dev.polek.adbwifi (1.2.5) Docker (231.9392.1) IdeaVIM (2.7.5) plantuml-parser (0.0.9) com.chrisrm.idea.MaterialThemeUI (8.6.4) com.developerphil.adbidea (1.6.11) com.mallowigi (90.0.0)

:

com.intellij.diagnostic.PluginException: Cannot init toolwindow com.didalgo.intellij.chatgpt.ChatGptToolWindowFactory@62591c7a [Plugin: com.didalgo.chatgpt] at com.intellij.toolWindow.ToolWindowSetInitializerKt.registerToolWindows(ToolWindowSetInitializer.kt:188) at com.intellij.toolWindow.ToolWindowSetInitializerKt.access$registerToolWindows(ToolWindowSetInitializer.kt:1) at com.intellij.toolWindow.ToolWindowSetInitializer$createAndLayoutToolWindows$entries$1.invokeSuspend(ToolWindowSetInitializer.kt:125) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:194) 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) Caused by: 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:159) at com.didalgo.intellij.chatgpt.ui.BrowserContent.<init>(BrowserContent.java:43) at com.didalgo.intellij.chatgpt.ui.BrowserContent.<init>(BrowserContent.java:38) at com.didalgo.intellij.chatgpt.ChatGptToolWindowFactory.createToolWindowContent(ChatGptToolWindowFactory.java:49) at com.intellij.openapi.wm.impl.ToolWindowImpl.createContentIfNeeded(ToolWindowImpl.kt:548) at com.intellij.openapi.wm.impl.ToolWindowImpl.scheduleContentInitializationIfNeeded$intellij_platform_ide_impl(ToolWindowImpl.kt:527) at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.doShowWindow(ToolWindowManagerImpl.kt:983) at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.showToolWindowImpl(ToolWindowManagerImpl.kt:920) at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.showToolWindowImpl$default(ToolWindowManagerImpl.kt:906) at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow$intellij_platform_ide_impl(ToolWindowManagerImpl.kt:1094) at com.intellij.toolWindow.ToolWindowSetInitializerKt.registerToolWindows(ToolWindowSetInitializer.kt:176) ... 39 more

didalgolab commented 6 months ago

Thanks. I'll look into that (and likely need to catch the exception and disable the 'ChatGPT Online' tab if JCEF is not available). For now you can try the following workaround to change the Boot Runtime for the IDE to one with JCEF: