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

Xray returns Unknown command on trying run scan #427

Open
Satariall opened this issue Oct 5, 2023 · 1 comment
Open

Xray returns Unknown command on trying run scan #427

Satariall opened this issue Oct 5, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Satariall
Copy link

Describe the bug
While installing go on Windows the default installation path is C:\Program Files\Go which using path to bin folder C:\Program Files\Go\bin
JFrog plugin tries to run command with this path with a space and failed with this log:

2023-10-05 11:05:18,824 [  18277]   INFO - #com.jfrog.ide.idea.log.Logger - Executing command: cmd /c C:\Program^ Files\Go\bin\go run . -goModPath=C:\Users\M_MARK~1\AppData\Local\Temp\13588100630977607364\go.mod -wd=C:\Sources\go\my_project
2023-10-05 11:05:18,889 [  18342]   WARN - #com.jfrog.ide.idea.log.Logger - Xray scan failed: IOException: go Files\Go\bin\go: unknown command
Run 'go help' for usage.

java.io.IOException: go Files\Go\bin\go: unknown command
Run 'go help' for usage.

	at org.jfrog.build.extractor.go.GoDriver.runCmd(GoDriver.java:57)
	at org.jfrog.build.extractor.go.GoDriver.runCmd(GoDriver.java:41)
	at com.jfrog.ide.common.go.GoScanWorkspaceCreator.visitFile(GoScanWorkspaceCreator.java:70)
	at com.jfrog.ide.common.go.GoScanWorkspaceCreator.visitFile(GoScanWorkspaceCreator.java:24)
	at java.base/java.nio.file.Files.walkFileTree(Files.java:2811)
	at java.base/java.nio.file.Files.walkFileTree(Files.java:2882)
	at com.jfrog.ide.common.go.GoTreeBuilder.createGoWorkspace(GoTreeBuilder.java:130)
	at com.jfrog.ide.common.go.GoTreeBuilder.buildTree(GoTreeBuilder.java:177)
	at com.jfrog.ide.idea.scan.GoScanner.buildTree(GoScanner.java:56)
	at com.jfrog.ide.idea.scan.ScannerBase.scanAndUpdate(ScannerBase.java:146)
	at com.jfrog.ide.idea.scan.ScannerBase$1.run(ScannerBase.java:301)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:428)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:115)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:478)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:251)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:71)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:71)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:251)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:465)
	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)
2023-10-05 11:05:18,916 [  18369]   WARN - #com.jfrog.ide.idea.log.Logger - ClassNotFoundException: org.codehaus.plexus.util.ExceptionUtils PluginClassLoader(plugin=PluginDescriptor(name=JFrog, id=org.jfrog.idea, descriptorPath=plugin.xml, path=~\AppData\Roaming\JetBrains\GoLand2023.2\plugins\JFrog, version=2.5.3, package=null, isBundled=false), packagePrefix=null, state=active)

To Reproduce
Install Go on Windows with default installation path C:\Program Files\Go
Run JFrog Xray scan in Goland

Expected behavior
Xray should parse path with a space correctly. While I move Go folder into C:\Go the issue dissapears.

Versions

  • GoLand 2023.2.2
  • JFrog IDEA plugin version: 2.5.3
  • Operating system: Windows 10
  • Xray version: 3.82,11
@Satariall Satariall added the bug Something isn't working label Oct 5, 2023
@asafgabai asafgabai self-assigned this Oct 19, 2023
@asafgabai
Copy link
Contributor

Hi @Satariall,
Thank you for bringing this issue to our attention. We've addressed it in version 2.6.6.
Please feel free to reach out if you encounter this issue again or have any further feedback.

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

No branches or pull requests

2 participants