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
Invalid or corrupt jarfile selenium-server-standalone-4.0.0-alpha-1.zip.jar #5224
Comments
I'm having this same issue! :( |
@sborland I solved this in my own way by changing the standalone-response.xml and update-config.json files. But this link can help you in a better way: |
@davidzaque thanks! This work around worked for me. |
@davidzaque I have the same issue. But I don't want to install selenium globally. My angularjs application has protractor in its node module and protractor has it's own dependencies where web driver gets updated to latest. How to install it specifically to protractor and not globally? |
Yup this is a bug. This appears to affect every version of the selenium server. Here is the bug listed in webdriver-manager angular/webdriver-manager#370 And here is the fix / discussion for the fix: angular/webdriver-manager#371 |
I will get a new release out tomorrow. |
as a temporary solution to this issue you can explicitly set the standalone version when running webdriver. |
While running test-cases over protractor , this solution couldn't helping me out. How to use this workaround with protractor ? |
i have only tested the solution with our current setup. I would run
I hope this helps you in any way. |
@tomreinartz90 i had tried. Webdriver starts successfully over port 4444 but getting the error when running
|
@ZehraHN I found that when I used version 3.141.0, i'm no longer running into that issue. Anything in the 3.8 or 3.9 range was causing me to get the reflection error. |
Yes works now. Thankss @clymerrm |
@tejasbhosale i don't use protractor globally. I changed the file:
After that, I kept these files out of the path node_modules, so they would not be updated, and added the following scripts to package.json: "scripts": {
"preinstall": "node_modules/protractor/node_modules/webdriver-manager/bin/webdriver-manager clean",
"postinstall": "cp standalone-response.xml ./node_modules/protractor/node_modules/webdriver-manager/selenium/ & cp update-config.json ./node_modules/protractor/node_modules/webdriver-manager/selenium/ & node_modules/protractor/node_modules/webdriver-manager/bin/webdriver-manager update --versions.standalone=3.141.59",
"start": "webdriver-manager start"
}, I know, it was too much maneuvering to solve the problem, but it was how I managed to solve it before any other solution they had posted. |
Faced the same issue as npm install is downloading a corrupt jar "selenium-server-standalone-4.0.0-alpha-1.zip.jar" . Tried installing npm again. It doesn't have selenium directory itself under webdriver-manager ! Files under webdriver-manager: |
Done with cnishina/webdriver-manager@7dc17ef Also we are not downloading alpha versions since we were previously not downloading beta versions. Please update to webdriver-manager 12.1.2. If you are using Protractor to download webdriver-manager, simply remove the node_modules directory and reinstall or do a |
@cnishina |
@tejasbhosale Are you caching your node modules directory or workspace? You could clean up your Jenkins workspace and try again. I did a clean install and verified that you should get webdriver-manager@12.1.2 with Protractor 5.4.2 because of https://github.com/angular/protractor/blob/5.4.2/package.json#L29. Could you have a lock file that is set to 12.1.1? |
@cnishina Thanks for responding. I suspect similar but clearing workspace didn't work for me. I am going to research more in jenkins config. But good news is it worked on my local env so it must be jenkins. And I checked my project's pakcage.json it is using this version |
The below mentioned solution worked for me:
Navigate to :
Step 2: Step 3: Step 4: |
I had same issue. |
Hello @cnishina , i made "remove the node_modules directory and reinstall or do a npm install -f" but not solved my problem: See bellow: ├─┬ protractor@5.4.2 But, i put in my package.json the dependencies: |
Thanks!!!! |
For StackOverflow, I tried to find a post to answer. I ended up creating a question and answering it: I have a quick explanation about what webdriver-manager update is doing and why it happened. Could we upvote for visibility? |
Maybe I don't understand how to define versions? I updated my package.json to include |
Do you have protractor installed globally as well? |
No, I use |
when you run I mean the package.json wasn't changed for protractor 5.4.2, just the webdriver-manager is an updated version |
I do not have it installed globally. I remember when I started this project it took me some time to discover it's the webdriver inside protractor that needs to be updated, with
So, that seems better right? However,
i.e., alpha zip!, leading to the corrupt jar error on startup. |
So you should be on the latest. The latest version is 12.1.4. Previous versions of 12 won't work because the file it is downloading changed. Please review the above for instructions to upgrade. |
I did upgrade. Let me try explaining again, because it's very confusing: there are two different definitions of webdriver-manager in play. The package.json in my project has Putting
to prove that an updated protractor/bin/webdriver-manager will get the right version. But, I'm not looking forward to working "Now edit the post-install protractor package.json" into our CI pipeline. Is there a different way to force protractor to use the latest webdriver-manager? |
Can you update your package.json and add webdriver-manager to your devDependencies? That fixed the issue for me. |
In the experiment above, both protractor and webdriver-manager (when added) were in devDependencies. |
Have you verified that your version is 12.1.4 when you run
Protractor (by default) should download the ^12.0.4 version which means it should get 12.1.4. If you are still getting a .zip.jar file that means you have an old version and you need to upgrade this. I do not recommend adding it to your devDependencies. This is why: Let's say if Protractor upgrades to version webdriver-manager@13 and you still have devDependencies set to webdriver-manager@^12. When you call |
Makes sense. And yet:
Bewildering. |
@mathpunk, is there a |
We have an interesting scenario in our organization as we have our own automation-related npm package (on an internal registry) that abstracts automation from our SPAs and applications. That package uses protractor 5.4.2 and does not use a package-lock.json file as we have seen some issues with how npm has deduped dependencies of dependencies, which messed with some of our paths. Anyhow, installing a version of our automation package that has protractor as its dependencies in SPAs and applications that use package-lock.json files still results in webdriver-manager 12.1.1 being used. @cnishina, thanks for all the work you do on Protractor. Would you support a PR of a branch that is branched off 5.4.2, which would only update webdriver-manager to 12.1.4? |
@simonua You cracked it! Removed package-lock.json, removed node_modules, installed, got webdriver-manager 12.1.4. I don't understand why versions are defined in two different places in this ecosystem, but hey, problem solved~ |
Glad that did it. Out of curiosity, if you were to revert your changes and run |
Same issue here |
Just download right file from selenium site https://selenium-release.storage.googleapis.com/index.html?path=4.0/ |
When i start the webdriver-manager i take this error, i did not change anything in my project that justified such an error, and I have been using it for more than a year, every day.
Error: Invalid or corrupt jarfile ./node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-4.0.0-alpha-1.zip.jar
8.12
5.4.2
Chrome
Ubuntu 16.04
The text was updated successfully, but these errors were encountered: