cloud-code-intellij icon indicating copy to clipboard operation
cloud-code-intellij copied to clipboard

Solution - 'Gemini Code Assist/Cloud Code' requires plugin 'com.google.tools.ij.aiplugin' to be installed

Open Jasonnor opened this issue 1 year ago • 8 comments

After updating the plugin to 24.8.1-233-api-version-223, the error mentioned in the title occurred.

I tried searching for 'com.google.tools.ij.aiplugin' in JetBrains Marketplace but couldn't find this plugin.

Expected Behavior

No plugin error.

Actual Behavior

image

Additional Information

  • IDE type (e.g. IntelliJ, Pycharm): PyCharm
  • IDE version: 2023.3.4 (Professional Edition)
  • Cloud Code version (Settings > Plugins > Cloud Code): 24.8.1-233-api-version-223
  • Cloud SDK (Settings > Cloud Code > Cloud SDK)
    • Are you allowing the plugin to manage the Cloud SDK:
    • Version of the Cloud SDK: Not found in Settings
  • Skaffold version (If you are using Kubernetes features; Settings > Cloud Code > Kubernetes): Not found in Settings
  • Operating System: macOS Sonoma 14.4.1

Feel free to deviate from this template as needed, especially if you are submitting a feature request.

Jasonnor avatar Aug 16 '24 03:08 Jasonnor

Hi @Jasonnor ,

(using Rider here but shall be same for PyCharm)

I run into the same issue yesterday and posted a solution on social media. You can install the missing plugin using the Rider shell script which is in the bin folder.

$ cd /snap/rider/current/bin
$ ./rider.sh installPlugins com.google.tools.ij.aiplugin

Rider needs to be closed and on next restart you have two plugins Code Assist and Cloud Code available.

Output below for reference for the repo maintainer. This happens when upgrading. New installation or removing the plugin and re-installation seems to work as expected though.

$ ./rider.sh installPlugins com.google.tools.ij.aiplugin
Debug | ByteBufferAsyncProcessor  | 40:DefaultDispatcher-worker-17 | PAUSE ('Socket not connected') :: {id = EarlyStartServerWire/Sender, state = 'Initialized'} 
Debug | Server                    | 56:EarlyStartServerWire | EarlyStartServerWire: listening /127.0.0.1:43265 
2024-08-16 08:33:48,075 [    203] SEVERE - #c.i.i.p.PluginManager - Problems found loading plugins:
  The Gemini Code Assist/Cloud Code (id=com.google.gct.core, path=~/.local/share/JetBrains/Rider2024.2/google_cloud_code, version=24.8.1-233-api-version-223) plugin Plugin 'Gemini Code Assist/Cloud Code' requires plugin 'com.google.tools.ij.aiplugin' to be installed
java.lang.Throwable: Problems found loading plugins:
  The Gemini Code Assist/Cloud Code (id=com.google.gct.core, path=~/.local/share/JetBrains/Rider2024.2/google_cloud_code, version=24.8.1-233-api-version-223) plugin Plugin 'Gemini Code Assist/Cloud Code' requires plugin 'com.google.tools.ij.aiplugin' to be installed
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
	at com.intellij.ide.plugins.PluginManagerCore.preparePluginErrors(PluginManagerCore.kt:360)
	at com.intellij.ide.plugins.PluginManagerCore.initializePlugins(PluginManagerCore.kt:671)
	at com.intellij.ide.plugins.PluginManagerCore$initializeAndSetPlugins$2.invokeSuspend(PluginManagerCore.kt:870)
	at com.intellij.ide.plugins.PluginManagerCore$initializeAndSetPlugins$2.invoke(PluginManagerCore.kt)
	at com.intellij.ide.plugins.PluginManagerCore$initializeAndSetPlugins$2.invoke(PluginManagerCore.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.idea.Main$startApp$2$1$1.span(Main.kt:88)
	at com.intellij.diagnostic.CoroutineTracerShim.span$default(CoroutineTracerShim.kt:31)
	at com.intellij.ide.plugins.PluginManagerCore.initializeAndSetPlugins$intellij_platform_core_impl(PluginManagerCore.kt:869)
	at com.intellij.ide.plugins.PluginDescriptorLoader$scheduleLoading$pluginSetDeferred$1.invokeSuspend(PluginDescriptorLoader.kt:385)
	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)
2024-08-16 08:33:48,081 [    209] SEVERE - #c.i.i.p.PluginManager - JetBrains Rider 2024.2  Build #RD-242.20224.401
2024-08-16 08:33:48,081 [    209] SEVERE - #c.i.i.p.PluginManager - JDK: 21.0.3; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2024-08-16 08:33:48,082 [    210] SEVERE - #c.i.i.p.PluginManager - OS: Linux
Installation home directory: file:////snap/rider/488
System directory: file:////home/jochen/.cache/JetBrains/Rider2024.2
Config directory: file:////home/jochen/.config/JetBrains/Rider2024.2
Log directory: file:////home/jochen/.cache/JetBrains/Rider2024.2/log
2024-08-16 08:33:49,096 [   1224]   WARN - #c.i.o.e.c.i.EditorColorsManagerImpl - Skipping '_@user_Rider Dark' because its parent scheme 'Rider Dark' is missing.
2024-08-16 08:33:49,107 [   1235]   WARN - #c.i.o.e.c.i.EditorColorsManagerImpl - Rider Dark color scheme is missing
2024-08-16 08:33:49,225 [   1353]   WARN - o.j.n.l.LinuxTrustedCertificatesUtil - Not reading certificates from /etc/ssl/certs/ce275665.0: access denied
2024-08-16 08:33:49,227 [   1355]   WARN - o.j.n.l.LinuxTrustedCertificatesUtil - Not reading certificates from /etc/ssl/certs/https.pem: access denied
plugin repositories: [https://plugins.jetbrains.com/plugins/insiders/8079, null]
looking up plugins: [com.google.tools.ij.aiplugin]
2024-08-16 08:34:29,475 [  41603]   WARN - o.j.n.l.LinuxTrustedCertificatesUtil - Not reading certificates from /etc/ssl/certs/ce275665.0: access denied
2024-08-16 08:34:29,475 [  41603]   WARN - o.j.n.l.LinuxTrustedCertificatesUtil - Not reading certificates from /etc/ssl/certs/https.pem: access denied
installed plugin: PluginNode{id=com.google.tools.ij.aiplugin, name='Gemini Code Assist'}

jochenkirstaetter avatar Aug 16 '24 06:08 jochenkirstaetter

For MacOS user:

~/Applications/GoLand.app/Contents/MacOS/goland installPlugins com.google.tools.ij.aiplugin

kettlecat6 avatar Aug 16 '24 08:08 kettlecat6

@jochenkirstaetter

Thanks, I solved the problem with this command: /Applications/PyCharm.app/Contents/Helpers/PyCharm.app/Contents/MacOS/pycharm.sh installPlugins com.google.tools.ij.aiplugin

Jasonnor avatar Aug 16 '24 08:08 Jasonnor

Similar for Windows (tested od Windows 10): c:\Program Files\JetBrains\PyCharm Community Edition 2024.2\bin\pycharm.bat installPlugins com.google.tools.ij.aiplugin

chybis avatar Aug 16 '24 10:08 chybis

On my Mac, I was able to install the plugin using the following command: /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea installPlugins com.google.tools.ij.aiplugin

It gave an error when I opened IntelliJ IDEA for the first time, but after restarting it a second time, everything worked fine.

Alberto-Monteiro avatar Aug 16 '24 15:08 Alberto-Monteiro

This is a bug in IntelliJ when you upgrade the IDE where the plugin is not the latest, it upgrades the plugins, but doesn't upgrade the dependent plugins (which is now a separate Gemini plugin bundled with Cloud Code).

Solution 1: Upgrade plugin before IDE (one time only)

Before upgrading the IDE to the new major version (2024.2), update the plugins to the newest version, not vice versa. This is one time only. Once the bundle of two plugins is there, upgrade won't be an issue anymore.

Solution 2: Remove the plugin and reinstall it if run into mentioned issue after the upgrade.

image (4)

(a) Right click on the plugin and uninstall. You will not see a restart button yet due to IDE bug. Close settings. Re-open settings, and you will see "Restart". Restart IDE as prompted now. You must do this to remove the plugin incorrectly installed by IntelliJ (re-open settings and restart)

Screenshot 2024-08-16 at 10 57 42 AM

(b) after IDE restart, re-install Cloud Code from the marketplace to the latest version (24.8.1 as of now). Then restart Screenshot 2024-08-16 at 10 58 20 AM

Plugin will install needed dependencies correctly and will work correctly.

ivanporty avatar Aug 16 '24 16:08 ivanporty

IDE fix tracking here: https://youtrack.jetbrains.com/issue/IJPL-160110/Implement-a-general-solution-to-install-plugins-dependencies-during-IDE-update

ivanporty avatar Aug 22 '24 17:08 ivanporty

for debian 12: cd ~/.local/share/JetBrains/Toolbox/apps/pycharm-professional/bin sudo ./pycharm.sh installPlugins com.google.tools.ij.aiplugin sudo ./idea.sh installPlugins com.google.tools.ij.aiplugin

SOLVED: Reinstall plugin from officlal page: https://plugins.jetbrains.com/plugin/8079-gemini-code-assist-cloud-code

Ocoyack avatar Aug 23 '24 03:08 Ocoyack

This has mostly been resolved since it happens on certain IDE versions after first IDE upgrade. Closing now, and you can also install Gemini Code Assist separately now from the marketplace.

ivanporty avatar Nov 12 '24 14:11 ivanporty