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

Runtime Exception in IntelliJ when enabling the DDEV Integration plugin #249

Open
2 tasks done
mike-kelly opened this issue Oct 26, 2023 · 6 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@mike-kelly
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

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

  • 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 mike-kelly added the bug Something isn't working label Oct 26, 2023
@paul-m
Copy link

paul-m commented Jan 29, 2024

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

@graham73may
Copy link

graham73may commented Feb 21, 2024

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?

@rfay
Copy link
Collaborator

rfay commented Feb 21, 2024

@graham73may I imagine your experience is related to

@rfay
Copy link
Collaborator

rfay commented Feb 21, 2024

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

@AkibaAT
Copy link
Contributor

AkibaAT commented Aug 23, 2024

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

@stasadev
Copy link

stasadev commented Feb 7, 2025

I had the same error with IntelliJ IDEA Ultimate Edition (this is not a PhpStorm issue).

To make it work, install the following extensions:

And configure Docker (yellow is what I changed):

(I'm using Linux, other environments may have a different configuration for the Docker daemon.)

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: New
Development

No branches or pull requests

6 participants