protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Installing/updating webdriver doesn't work in Node 0.11.13

Open mgol opened this issue 12 years ago • 41 comments

$ node --version
v0.11.13
$ ./node_modules/.bin/webdriver-manager update
Updating selenium standalone
downloading http://selenium-release.storage.googleapis.com/2.42/selenium-server-standalone-2.42.2.jar...
Updating chromedriver
downloading https://chromedriver.storage.googleapis.com/2.10/chromedriver_mac32.zip...
chromedriver_2.10.zip downloaded to /Users/mgol/Documents/projects/bn/cbn/repo/polona-gui/node_modules/protractor/selenium/chromedriver_2.10.zip

/Users/mgol/Documents/projects/bn/cbn/repo/polona-gui/node_modules/protractor/node_modules/adm-zip/zipFile.js:66
            throw Utils.Errors.INVALID_FORMAT;
                              ^
Invalid or unsupported zip format. No END header found

EDIT: This is with the newest Protractor 1.0.0-rc1

mgol avatar Jul 01 '14 10:07 mgol

The problem still exists in Protractor 1.0.0-rc4.

mgol avatar Jul 09 '14 07:07 mgol

I fixed by downloading selenium from here http://docs.seleniumhq.org/download/, chromedriver from here http://chromedriver.storage.googleapis.com/index.html

cp selenium-server-standalone-2.42.2.jar /usr/local/lib/node_modules/protractor/selenium cp chromedriver /usr/local/lib/node_modules/protractor/selenium/

webdriver-manager start

timbielawski avatar Jul 14 '14 12:07 timbielawski

The workaround works for me too. Thanks.

mlegenhausen avatar Aug 06 '14 08:08 mlegenhausen

Unfortunately, the error is in the adm-zip package and there hasn't been any new commits in the repo for the last 6 months so it might not be fixed at all.

If nothing changes, Protractor will need to dump (or fork) the package.

mgol avatar Aug 20 '14 13:08 mgol

I've patched a workaround in chromedriver and submitted a PR here https://github.com/giggio/node-chromedriver/pull/14. not a pure js fix but it solved the problem at $work

mattp- avatar Aug 21 '14 15:08 mattp-

Experiencing the same issue after doing a fresh npm install. The downloaded chromedriver_2.10.zip appears to be not in a valid ZIP format:

unzip /Users/dmoore/projects/slideviewer/node_modules/protractor/selenium/chromedriver_2.10.zip
Archive:  /Users/dmoore/projects/slideviewer/node_modules/protractor/selenium/chromedriver_2.10.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /Users/dmoore/projects/slideviewer/node_modules/protractor/selenium/chromedriver_2.10.zip or
        /Users/dmoore/projects/slideviewer/node_modules/protractor/selenium/chromedriver_2.10.zip.zip, and cannot find /Users/dmoore/projects/slideviewer/node_modules/protractor/selenium/chromedriver_2.10.zip.ZIP, period.

demisx avatar Aug 26 '14 04:08 demisx

@demisx I've been getting that issue intermittently today as well. I think the chromedriver hosting site is flaking out somehow - can you try it again and see if it happens every time?

juliemr avatar Aug 26 '14 05:08 juliemr

@juliemr I get the same error; it usually works again after a retry (sometimes it requires multiple ones) Invalid or unsupported zip format. No END header found webdriver-manager update returned exit code 8action webdriver-manager update failed

gitu avatar Aug 26 '14 14:08 gitu

@juliemr Yes, I am still getting this Invalid or unsupported zip format. No END header found error with 1.1.x versions of protractor. My temporary solution was downgrading protractor to v1.0.0.

demisx avatar Aug 26 '14 17:08 demisx

Our build server is also receiving the same error intermittently (but frequently).

tcrosen avatar Aug 26 '14 18:08 tcrosen

Are you all using Node.js 0.11.13? Does it work for you in 0.10.31?

mgol avatar Aug 26 '14 18:08 mgol

I'm on 0.10.31

tcrosen avatar Aug 26 '14 19:08 tcrosen

on 0.10.31 as well.

demisx avatar Aug 26 '14 19:08 demisx

Then it's not your issue, you have a different one. My issue concerns Node 0.11.x specifically, everything works fine for me on 0.10.x and it always fails on Node 0.11.13.

mgol avatar Aug 26 '14 19:08 mgol

@juliemr Would you recommend creating a new GitHub issue for node 0.10.x? The solution is most likely going to be the same for both.

demisx avatar Aug 26 '14 19:08 demisx

@demisx What solution do you have in mind? Since it works on 0.10 for me and my colleagues and fails on 0.11 on the very same files, the fault must lay in a different place than the files themselves. Unless the solution is to dump adm-zip. ;)

mgol avatar Aug 26 '14 20:08 mgol

@mzgol Sorry, no solution yet. Upon initial review, It looked to me not node related, since the chromedriver and selenium server zips downloaded by protractor 1.1.x were corrupted on my end. I've figured must've been a protractor dependency issue, since rolling back protractor to 1.0.0 made this problem go away for me. Maybe I am missing something. I'd let @juliemr chime in on this.

demisx avatar Aug 26 '14 20:08 demisx

@mzgol I'm using 0.10.29 I don't think my problem is connected with the node version

gitu avatar Aug 26 '14 23:08 gitu

I (sometimes) have the same problem as you all on Node 0.10 & Protractor 1.1.x. I didn't have this problem before, though.

mgol avatar Aug 27 '14 18:08 mgol

Maybe Protractor should be bundled with Chromedriver & Selenium that work? The update command could still be available but at least we'd have a working starting point.

mgol avatar Aug 27 '14 18:08 mgol