Failed to download all of the standalone executables: Stream is not in the BZip2 format
sgrillon14 opened this issue · 6 comments
I use version 1.0.10 of plugin
sometimes, I have this bug:
[ERROR] Failed to execute goal com.lazerycode.selenium:driver-binary-downloader-maven-plugin:1.0.10:selenium (default) on project rapid: Failed to download all of the standalone executables: Stream is not in the BZip2 format -> [Help 1]
[INFO] Preparing to download Selenium Standalone Executable Binaries...
[INFO] Using http proxy: renn.proxy.corp.xxxxx:8080
[INFO] Downloading 'phantomjs-2.1.1-linux-i686.tar.bz2'...
[INFO] Archive file 'phantomjs-2.1.1-linux-i686.tar.bz2' is valid : true
[INFO] Binary 'phantomjs' Exists: true
[INFO] Using existing 'phantomjs'binary.
[INFO] Using http proxy: renn.proxy.corp.xxxxx:8080
[INFO] Downloading 'chromedriver_linux64.zip'...
[INFO] Archive file 'chromedriver_linux64.zip' is valid : true
[INFO] Binary 'chromedriver' Exists: true
[INFO] Using existing 'chromedriver'binary.
[INFO] Using http proxy: renn.proxy.corp.xxxxx:8080
[INFO] Downloading 'chromedriver_linux32.zip'...
[INFO] Archive file 'chromedriver_linux32.zip' is valid : true
[INFO] Binary 'chromedriver' Exists: true
[INFO] Using existing 'chromedriver'binary.
[INFO] Using http proxy: renn.proxy.corp.xxxxx:8080
[INFO] Downloading 'phantomjs-2.1.1-linux-x86_64.tar.bz2'...
[INFO] Archive file 'phantomjs-2.1.1-linux-x86_64.tar.bz2' is valid : true
[BFA] Scanning build for known causes...
[BFA] No failure causes found
[BFA] Done. 0s
Notifying upstream projects of job completion
Join notifier requires a CauseAction
My target is phantomjs-2.1.1 on linux 64 bits. this file is downloaded in downloadedZipFileDirectory directory but after I have the problem when unzip in rootStandaloneServerDirectory/linux/phantomjs/64bit directory
The plugin code is in selenium-standalone-server-plugin/src/main/java/com/lazerycode/selenium/SeleniumServerMojo.java
try {
DownloadHandler standaloneExecutableDownloader = new DownloadHandler(
this.rootStandaloneServerDirectory,
this.downloadedZipFileDirectory,
this.fileDownloadRetryAttempts,
this.fileDownloadConnectTimeout,
this.fileDownloadReadTimeout,
buildDownloadableFileRepository(parser.getAllNodesInScope(), thirtyTwoBitBinaries, sixtyFourBitBinaries),
this.overwriteFilesThatExist,
this.checkFileHashes,
this.useSystemProxy,
this.onlyGetLatestVersions);
driverRepository = standaloneExecutableDownloader.ensureStandaloneExecutableFilesExist();
} catch (IOException e) {
throw new MojoExecutionException("Failed to download all of the standalone executables: " + e.getLocalizedMessage());
}
hmm looks like the phantomjs zip format is not being recognised by the code. I winder if the zip library I'm using is out of data...
sometimes it works and sometimes it is wrong. Can we add a small delay between downloading and unzipping?
After the file is downloaded a hash check is performed against it to check to see if the downloaded artefact is valid, so I don't think it's a problem of it trying to extract it before the download is complete.
I'll have to hunt around in the code and see what I can find.
OK thanks,
I see
Archive file xxxxxx is valid : true
in my logs:
[INFO] Using http proxy: renn.proxy.corp.xxxxx:8080
[INFO] Downloading 'phantomjs-2.1.1-linux-x86_64.tar.bz2'...
[INFO] Archive file 'phantomjs-2.1.1-linux-x86_64.tar.bz2' is valid : true
[BFA] Scanning build for known causes...
[BFA] No failure causes found
[BFA] Done. 0s
I have the same problem. It works once I use <checkFileHashes>false</checkFileHashes>
.
I'm unable to reproduce this, my best guess is a network connection error when trying to download the file which is resulting in a corrupt download.
In this situation we would expect the file to fail the hash check.