Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Eclipse plugin error: Cannot run powershell.exe #17

Open
vpinna80 opened this issue Sep 2, 2021 · 2 comments
Open

Eclipse plugin error: Cannot run powershell.exe #17

vpinna80 opened this issue Sep 2, 2021 · 2 comments

Comments

@vpinna80
Copy link

vpinna80 commented Sep 2, 2021

When starting up Eclipse, I see the following in the log, and the plugin seems not to work.
It happened just after Eclipse reboot post-installation.
I think it may be related to scalameta/metals#2934 but I can't really say for sure.

I'm on a Windows 10 machine with 16GB ram and using Eclipse 2021-06 on OpenJDK 11.

java.lang.RuntimeException: java.io.IOException: Cannot run program "powershell.exe": CreateProcess error=5, Access denied
at io.github.soc.directories.Util.runCommands(Util.java:150)
at io.github.soc.directories.Util.getWinDirs(Util.java:119)
at io.github.soc.directories.ProjectDirectories.fromPath(ProjectDirectories.java:220)
at io.github.soc.directories.ProjectDirectories.from(ProjectDirectories.java:272)
at coursier.paths.CoursierPaths.init(CoursierPaths.java:61)
at coursier.paths.CoursierPaths.cacheDirectory(CoursierPaths.java:68)
at coursier.paths.CachePath.defaultCacheDirectory(CachePath.java:88)
at coursier.cache.CacheDefaults$.location$lzycompute(CacheDefaults.scala:16)
at coursier.cache.CacheDefaults$.location(CacheDefaults.scala:16)
at coursier.cache.FileCache$.apply(FileCache.scala:964)
at coursier.cache.PlatformCacheCompanion.default$lzycompute(PlatformCacheCompanion.scala:7)
at coursier.cache.PlatformCacheCompanion.default(PlatformCacheCompanion.scala:7)
at coursier.Fetch$.apply$default$1(Fetch.scala:244)
at com.idiomaticsoft.lsp.scala.metals.MetalsLaunchConfigurationDelegate.launch(MetalsLaunchConfigurationDelegate.scala:50)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:803)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:716)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:711)
at com.idiomaticsoft.lsp.scala.ScalaLSPPlugin.launchJob(ScalaLSPPlugin.scala:133)
at com.idiomaticsoft.lsp.scala.ScalaLSPPlugin.processForCommand(ScalaLSPPlugin.scala:147)
at com.idiomaticsoft.lsp.scala.edit.MetalConnectionProvider.start(MetalsConnectionProvider.scala:32)
at org.eclipse.lsp4e.LanguageServerWrapper.lambda$1(LanguageServerWrapper.java:224)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: java.io.IOException: Cannot run program "powershell.exe": CreateProcess error=5, Access denied
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at io.github.soc.directories.Util.runCommands(Util.java:148)
... 27 more
Caused by: java.io.IOException: CreateProcess error=5, Access denied
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:478)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:154)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
... 29 more

@dos65
Copy link
Member

dos65 commented Sep 2, 2021

Thanks for reporting!

I just found out that there is metals-eclipse plugin. I'll transfer this issue to this repo.

I don't think that it's related to scalameta/metals#2934. It seems that coursier version in metals-eclipse is too outdated so probably that the reason.

@dos65 dos65 transferred this issue from scalameta/metals Sep 2, 2021
@tgodzik
Copy link
Contributor

tgodzik commented Sep 2, 2021

The project is not actively maintained at the moment, though I think it would be awesome for someone to pick it up as I don't imagine it would require a lot of work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants