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

JFrog Plugin Fails If You Run on Windows using Windows Subsystem Linux and Gradle #142

Closed
jaybyrrd opened this issue Jul 23, 2021 · 6 comments · Fixed by #147
Closed

JFrog Plugin Fails If You Run on Windows using Windows Subsystem Linux and Gradle #142

jaybyrrd opened this issue Jul 23, 2021 · 6 comments · Fixed by #147
Assignees
Labels
bug Something isn't working

Comments

@jaybyrrd
Copy link

Describe the bug
If you are on any version of Windows and have installed Windows Subsystem for Linux (WSL) in order to install Gradle via SDKMAN, *which is the recommended way in the docs then the JFrog plugin completely fails to run since it doesn't use WSL. Worth noting calling gradle using WSL is also supported by IntelliJ, which means users are likely to want feature parity.

To Reproduce
Setup a Windows machine with Gradle on WSL. Get a gradle project loaded into IntelliJ, watch the plugin fail with null pointer exceptions.

Expected behavior
The plugin should use the same command line/tools to execute that IntelliJ uses for Gradle projects.

Screenshots
I can provide a stacktrace:

java.lang.Throwable: Could not scan Gradle project dependencies, because Gradle CLI is not in the PATH.
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:161)
	at com.jfrog.ide.idea.log.Logger.error(Logger.java:51)
	at com.jfrog.ide.common.gradle.GradleTreeBuilder.buildTree(GradleTreeBuilder.java:48)
	at com.jfrog.ide.idea.scan.GradleScanManager.buildTree(GradleScanManager.java:63)
	at com.jfrog.ide.idea.scan.ScanManager.scanAndUpdate(ScanManager.java:107)
	at com.jfrog.ide.idea.scan.ScanManager$1.run(ScanManager.java:145)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:998)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:497)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:228)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:228)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
	at java.base/java.lang.Thread.run(Thread.java:834)

Versions

  • JFrog IDEA plugin version: 1.9.1
  • Operating system: Windows 10
  • Xray version: 3.27.3
@jaybyrrd jaybyrrd added the bug Something isn't working label Jul 23, 2021
@jaybyrrd
Copy link
Author

I tried to find a root cause in this repository, but it appears to be in a private repository owned by JFrog. :(

@eyalbe4
Copy link
Contributor

eyalbe4 commented Jul 26, 2021

Thank you for reporting this issue @jaybyrrd.
This is definitely something we'd like to fix. We're currently working on multiple improvements to the plugin and we'd like to include this one as well. We'll update this issue once we implement this improvement.

@jaybyrrd
Copy link
Author

You're welcome! Thanks for letting me know. We were considering dual booting Debian in the meantime. Not to rush you, but so that we are aware, what kind of timeline is this on?

@eyalbe4
Copy link
Contributor

eyalbe4 commented Jul 27, 2021

We're aiming towards the second half of next week or the week after @jaybyrrd.

@jaybyrrd
Copy link
Author

Excellent, thank you!

@yahavi yahavi self-assigned this Oct 3, 2021
@yahavi yahavi linked a pull request Oct 3, 2021 that will close this issue
1 task
@yahavi
Copy link
Member

yahavi commented Oct 4, 2021

@jaybyrrd,
Thanks for reporting this issue.
We released JFrog IDEA plugin 1.10.1. In this version, we use the Gradle executable and Java home as configured in the Gradle settings. This may resolve your issue.

Feel free to upgrade.
We'd appreciate your feedback on that.

@yahavi yahavi closed this as completed May 16, 2024
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
None yet
Development

Successfully merging a pull request may close this issue.

3 participants