Description
Describe the bug
When running Jenkins service as local system and trying to download some artifact with the downloadArtifact() method of plugin, pipeline gives the below exception -
Downloading 'pricing-tool-local/DEVELOP/ui/2.46.1/pricing/Build-14928_Artifacts_sourcemaps.zip'...
[Thread downloader_0] downloading C:\WINDOWS\TEMP\15639933076458494381\DEVELOP/ui/2.46.1/pricing/Build-1492_Artifacts_sourcemaps.zip0 as part of file pricing-tool-local/DEVELOP/ui/2.46.1/pricing/Build-14928_Artifacts_sourcemaps.zip threw an exception: java.io.IOException: Could not create nor write to file: C:\Windows\Temp\15639933076458494381\DEVELOP\ui\2.46.1\pricing\Build-14928_Artifacts_sourcemaps.zip0
at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.saveInputStreamToFile(DownloadToFile.java:34)
at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.setResponse(DownloadToFile.java:40)
at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.processResponse(JFrogService.java:143)
at org.jfrog.build.extractor.clientConfiguration.client.JFrogService.execute(JFrogService.java:123)
at org.jfrog.build.extractor.clientConfiguration.client.artifactory.ArtifactoryManager.downloadToFile(ArtifactoryManager.java:128)
at org.jfrog.build.extractor.clientConfiguration.util.DependenciesDownloaderHelper.lambda$doConcurrentDownload$0(DependenciesDownloaderHelper.java:277)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.io.FileNotFoundException: C:\WINDOWS\TEMP\15639933076458494381\DEVELOP\ui\2.46.1\pricing\Build-14928_Artifacts_sourcemaps.zip0 (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
at java.base/java.io.FileOutputStream.(FileOutputStream.java:237)
at java.base/java.io.FileOutputStream.(FileOutputStream.java:187)
at org.jfrog.build.extractor.clientConfiguration.client.artifactory.services.DownloadToFile.saveInputStreamToFile(DownloadToFile.java:30)
... 6 more
To Reproduce
Run Jenkins windows service as local system and try to download some artifact from local repository via Artifactory plugin's downloadArtifact() method. Use Jenkins LTS version 2.414.2.
Expected behavior
It should be able to download the artifact without any exception.
Versions
- Jenkins Artifactory plugin version: 3.18.12
- Jenkins operating system: Windows Server 2019
- Artifactory Version: 7.21.5
- Jenkins Version: 2.414.2
Additional context
Getting same exception even with downgraded version of Artifactory plugin.