ddev-intellij-plugin icon indicating copy to clipboard operation
ddev-intellij-plugin copied to clipboard

Runtime Exception in IntelliJ when enabling the DDEV Integration plugin

Open mike-kelly opened this issue 2 years ago • 6 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Are you sure that this bug is related to this DDEV Integration Plugin?

  • [X] I am sure

Enter your error report ID (If available)

32a32fd501cf4f48ac46f1a361f253a1

Describe the bug

MacOS, v12.5.1 DDEV Integration v1.1.1 IntelliJ 2023.2.4 (Ultimate Edition). Colima v0.5.5

When enabling the plugin or restarting the IDE, an error occurs as follows:

java.lang.RuntimeException: Cannot invoke (class=AutoConfigureNodeInterpreterListener, method=onDescriptionChanged, topic=DDEV description changed)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:676)
	at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:422)
	at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:401)
	at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1)
	at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:460)
	at jdk.proxy11/jdk.proxy11.$Proxy195.onDescriptionChanged(Unknown Source)
	at de.php_perfect.intellij.ddev.state.DdevStateManagerImpl.checkChanged(DdevStateManagerImpl.java:100)
	at de.php_perfect.intellij.ddev.state.DdevStateManagerImpl.initialize(DdevStateManagerImpl.java:49)
	at de.php_perfect.intellij.ddev.state.DdevStateManagerImpl.initialize(DdevStateManagerImpl.java:33)
	at de.php_perfect.intellij.ddev.InitPluginActivity.lambda$execute$0(InitPluginActivity.java:19)
	at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:272)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.NullPointerException: Cannot invoke "de.php_perfect.intellij.ddev.dockerCompose.DdevComposeFileLoader.load()" because the return value of "de.php_perfect.intellij.ddev.dockerCompose.DdevComposeFileLoader.getInstance(com.intellij.openapi.project.Project)" is null
	at de.php_perfect.intellij.ddev.node.AutoConfigureNodeInterpreterListener.onDescriptionChanged(AutoConfigureNodeInterpreterListener.java:30)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:699)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:663)
	... 19 more
  • The DDEV terminal feature of the plugin works
  • The auto configuration of the datasource is not available.
  • The link on the DDEV status icon only shows the option to 'Open Website'.
  • The DDEV status message does not sync with the current state of ddev. I.e. if I run ddev stop the status message still reads 'Running'

Steps to reproduce

  1. Close Docker, Colima
  2. Stop all instances of ddev
  3. Restart IntelliJ
  4. Open IntelliJ and previously configured ddev project
  5. colima start
  6. ddev start
  7. Notifications in IntelliJ say 'Docker is not running. To use the DDEV Integration Plugin, please make sure that Docker is running.' Click 'Reload Plugin' link.
  8. Error appears in IDE.

Additional context

There is a warning in the Docker > Tools setting for Docker Compose Executable, don't know if this is relevant.

Screenshot 2023-10-26 at 15 46 47

mike-kelly avatar Oct 26 '23 14:10 mike-kelly

Seeing this as well on DDEV plugin 1.2.0 and Docker Desktop.

paul-m avatar Jan 29 '24 17:01 paul-m

Colima user here.

I came here because I was getting the following error with the node.js interpreter setup:

com.intellij.docker.agent.ApiTaskException: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (Details: [2] No such file or directory)

Looking into the Docker settings I don't actually have this executables. I found one in my homebrew bin using whereis docker, but I don't seem to have docker-compose.

So this is as far as I've managed to get... image

Unsure what to do now?

graham73may avatar Feb 21 '24 10:02 graham73may

@graham73may I imagine your experience is related to

  • https://github.com/php-perfect/ddev-intellij-plugin/issues/258

rfay avatar Feb 21 '24 14:02 rfay

And docker-compose is in ~/.ddev/bin/docker-compose - that's the one to use.

rfay avatar Feb 21 '24 14:02 rfay

I can't confirm this issue with the current versions. The DDEV status is detected correctly for me, and the PHP remote interpreter works as well.

colima 0.7.3 docker version

Client:
 Version:           26.1.3
 API version:       1.45
 Go version:        go1.21.10
 Git commit:        b72abbb
 Built:             Thu May 16 08:30:38 2024
 OS/Arch:           darwin/arm64
 Context:           colima

Server: Docker Engine - Community
 Engine:
  Version:          27.1.1
  API version:      1.46 (minimum version 1.24)
  Go version:       go1.21.12
  Git commit:       cc13f95
  Built:            Tue Jul 23 20:00:07 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.7.19
  GitCommit:        2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
 runc:
  Version:          1.7.19
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

ddev version

 ITEM             VALUE                                    
 DDEV version     v1.23.4                                  
 architecture     arm64                                    
 cgo_enabled      0                                        
 db               ddev/ddev-dbserver-mariadb-10.11:v1.23.4 
 ddev-ssh-agent   ddev/ddev-ssh-agent:v1.23.4              
 docker           27.1.1                                   
 docker-api       1.46                                     
 docker-compose   v2.29.1                                  
 docker-platform  colima                                   
 global-ddev-dir  /Users/xxx/.ddev                     
 mutagen          0.17.2                                   
 os               darwin                                   
 router           ddev/ddev-traefik-router:v1.23.4         
 web              ddev/ddev-webserver:v1.23.4   

docker compose v2.27.3 PhpStorm 2024.2.0.1 DDEV IntelliJ Plugin dev-main

AkibaAT avatar Aug 23 '24 16:08 AkibaAT