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

Error when opening a project without DDEV #250

Open
2 tasks done
armin-gardenanet opened this issue Nov 2, 2023 · 5 comments
Open
2 tasks done

Error when opening a project without DDEV #250

armin-gardenanet opened this issue Nov 2, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@armin-gardenanet
Copy link

armin-gardenanet commented Nov 2, 2023

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)

No response

Describe the bug

When opening a project without DDEV, most of the time i get this error:

de.php_perfect.intellij.ddev.cmd.CommandFailedException: Failed to execute "C:\Program Files\DDEV\ddev.exe" --version --json-output
at de.php_perfect.intellij.ddev.cmd.DdevImpl.executePlain(DdevImpl.java:57)
at de.php_perfect.intellij.ddev.cmd.DdevImpl.version(DdevImpl.java:22)
at de.php_perfect.intellij.ddev.state.DdevStateManagerImpl.checkVersion(DdevStateManagerImpl.java:137)
at de.php_perfect.intellij.ddev.state.DdevStateManagerImpl.lambda$initialize$0(DdevStateManagerImpl.java:52)
at de.php_perfect.intellij.ddev.state.DdevStateManagerImpl.checkChanged(DdevStateManagerImpl.java:90)
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: com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "C:\Program Files\DDEV\ddev.exe" (in directory "M:\DWwebsites\Digiem\skiarmin.com"): CreateProcess error=2, Das System kann die angegebene Datei nicht finden
at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:356)
at com.intellij.execution.process.OSProcessHandler.startProcess(OSProcessHandler.java:84)
at com.intellij.execution.process.OSProcessHandler.(OSProcessHandler.java:44)
at com.intellij.execution.process.CapturingProcessHandler.(CapturingProcessHandler.java:20)
at de.php_perfect.intellij.ddev.cmd.ProcessExecutorImpl.executeCommandLine(ProcessExecutorImpl.java:16)
at de.php_perfect.intellij.ddev.cmd.DdevImpl.executePlain(DdevImpl.java:45)
... 17 more
Caused by: java.io.IOException: Cannot run program "C:\Program Files\DDEV\ddev.exe" (in directory "M:\DWwebsites\Digiem\skiarmin.com"): CreateProcess error=2, Das System kann die angegebene Datei nicht finden
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
at com.intellij.execution.configurations.GeneralCommandLine.startProcess(GeneralCommandLine.java:432)
at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:346)
... 22 more
Caused by: java.io.IOException: CreateProcess error=2, Das System kann die angegebene Datei nicht finden
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:499)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:158)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
... 25 more

In my opinion the plugin should check if DDEV exists before running ddev --version --json-output

Steps to reproduce

No response

Additional context

No response

@armin-gardenanet armin-gardenanet added the bug Something isn't working label Nov 2, 2023
@armin-gardenanet
Copy link
Author

My report ID: 263feb8a59424feba37e85fb725077b7

@nico-loeber
Copy link
Contributor

Thanks for reporting this @armin-gardenanet, it looks like this is a regression bug caused by the switch from ddev version to ddev --version which I added in the last update.
I will try to fix this for the next release, as the command that is causing the error is exactly meant to determine if ddev is installed correctly.
In the meantime you can try to use an older version of the plugin and give feedback if this error does still occur.

@nico-loeber nico-loeber self-assigned this Nov 14, 2023
@armin-gardenanet
Copy link
Author

@nico-loeber thank you for the reply. For now i will just ignore the error messages, dont worry :)
Thank you for your great work!

@nico-loeber
Copy link
Contributor

@armin-gardenanet, could you please tell me if C:\Program Files\DDEV\ddev.exe is the right location of your ddev installation?
It looks like this location was autodetected and saved in your settings, but then the binary was removed.

Sadly your issue is not caused by the reason I was initially thinking of.

The ddev version is checked for non ddev projects as well, because you can use the plugin to run ddev config from the ui. It will automatically set your php version of ddev to the language level of your project (composer.json / guessing).

@armin-gardenanet
Copy link
Author

@nico-loeber no im actually using DDEV in WSL2 (Ubuntu 22.04.2 LTS).

which ddev
/usr/bin/ddev

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: In progress
Development

No branches or pull requests

2 participants