Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fewer than 70 loaded plugins breaks loading of Gemini Code Assist #3245

Closed
stimut opened this issue Jan 13, 2025 · 3 comments
Closed

Fewer than 70 loaded plugins breaks loading of Gemini Code Assist #3245

stimut opened this issue Jan 13, 2025 · 3 comments

Comments

@stimut
Copy link

stimut commented Jan 13, 2025

If fewer than 70 plugins are enabled, I receive the below errors on startup and Gemini Code Assist is non-functional. I found this by essentially binary searching why the plugin works with a new config, but my streamlined one did not.

I have confirmed that it is the number of plugins enabled, and not the specific plugins, by:

  • trimming the enabled plugins to 70
  • try disabling, testing, and re-enabling completely unrelated plugins one-by-one and confirming that they each cause the error, e.g.:
    • .ignore
    • Eclipse Keymap
    • TestNG
  • disable the plugins that were causing errors in the above step, and enable the same number of different plugins (so the total is 70 again) and observe that IntelliJ starts without error.

In other words, this bug is so weird that I really tried to confirm that I was seeing what I am seeing.

This has exactly the same symptoms as #3244, but I created a new bug as it seems to be triggered under opposite conditions, i.e. disabling the Android plugin for me would make the error more likely to appear since it might take my total enabled plugin count below 70.

com.intellij.platform.instanceContainer.internal.InstanceAlreadyRegisteredException: com.android.tools.idea.studiobot.StudioBot is already registered: com.android.tools.idea.studiobot.StudioBot$StubStudioBot. Failed to register: com.android.studio.ml.api.StudioBotImpl.
	at com.intellij.platform.instanceContainer.internal.InstanceRegistrarImpl.registerInitializer(InstanceRegistrarImpl.kt:33)
	at com.intellij.serviceContainer.ComponentManagerImpl.registerServices2Inner(ComponentManagerImpl.kt:626)
	at com.intellij.serviceContainer.ComponentManagerImpl.registerServices(ComponentManagerImpl.kt:563)
	at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:331)
	at com.intellij.openapi.client.ClientAwareComponentManager.registerComponents(ClientAwareComponentManager.kt:65)
	at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents$default(ComponentManagerImpl.kt:313)
	at com.intellij.platform.ide.bootstrap.ApplicationLoader$loadApp$2$initServiceContainerJob$1$1.invokeSuspend(ApplicationLoader.kt:103)
	at com.intellij.platform.ide.bootstrap.ApplicationLoader$loadApp$2$initServiceContainerJob$1$1.invoke(ApplicationLoader.kt)
	at com.intellij.platform.ide.bootstrap.ApplicationLoader$loadApp$2$initServiceContainerJob$1$1.invoke(ApplicationLoader.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.platform.diagnostic.telemetry.impl.TracerKt.span(tracer.kt:56)
	at com.intellij.platform.diagnostic.telemetry.impl.TracerKt.span$default(tracer.kt:48)
	at com.intellij.platform.ide.bootstrap.ApplicationLoader$loadApp$2$initServiceContainerJob$1.invokeSuspend(ApplicationLoader.kt:102)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:277)
	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:99)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)
Unhandled exception in Dispatchers.Default

java.lang.ClassCastException: class com.android.tools.idea.studiobot.StudioBot$StubStudioBot cannot be cast to class com.android.tools.idea.studiobot.StudioBot (com.android.tools.idea.studiobot.StudioBot$StubStudioBot is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @62e3e472; com.android.tools.idea.studiobot.StudioBot is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @12b5520c)
	at com.android.studio.ml.completion.SmlInlineCompletionStatusBarWidgetFactory$Widget.determineCurrentStatus(SmlInlineCompletionStatusBarWidgetFactory.kt:410)
	at com.android.studio.ml.completion.SmlInlineCompletionStatusBarWidgetFactory$Widget.access$determineCurrentStatus(SmlInlineCompletionStatusBarWidgetFactory.kt:96)
	at com.android.studio.ml.completion.SmlInlineCompletionStatusBarWidgetFactory$Widget$2.invokeSuspend(SmlInlineCompletionStatusBarWidgetFactory.kt:114)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelled}@3d8f8a7d, Dispatchers.Default]
  • IDE type (e.g. IntelliJ, Pycharm): IntelliJ
  • IDE version: 2024.3.1.1 (Ultimate Edition)
  • Cloud Code version (Settings > Plugins > Cloud Code): 1.7.0-243
  • Operating System: Linux
@ivanporty
Copy link
Collaborator

Thanks for the report @stimut. We haven't seen this error lately, does it not happen when there are more plugins, but happens with less, to confirm? So if you install 70+ plugins, this somehow disappears?

@stimut
Copy link
Author

stimut commented Jan 16, 2025

Yes, that is correct @ivanporty. If I enable more than 70 plugins, from the marketplace or bundled doesn't matter, then the issue disappears. Disable some so there are fewer than 70 plugins enabled in total, the issue reappears.

@stimut
Copy link
Author

stimut commented Jan 17, 2025

I just updated IntellJ to 2024.3.2 and this (the 70 enabled plugin thing) is no longer true. I now have the same symptoms of #3244 where it's the Android plugin which seems to prevent GCA from working.

Closing as it's no longer relevant to me, but you can reopen of course if you want.

@stimut stimut closed this as completed Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants