0

Operating System: Windows7 x64

npm:3.10.10

webdriver-manager:12.0.5

protractor:5.1.1

nodejs:6.10.0

Error info:

C:\Users\Administrator\AppData\Roaming\npm>webdriver-manager update --ignore_ssl
[14:34:48] I/http_utils - ignoring SSL certificate
[14:34:48] I/http_utils - ignoring SSL certificate
[14:34:48] I/http_utils - ignoring SSL certificate
[14:34:52] I/http_utils - ignoring SSL certificate
[14:34:53] I/http_utils - ignoring SSL certificate
[14:35:06] I/http_utils - ignoring SSL certificate
[14:35:57] I/update - chromedriver: unzipping chromedriver_2.29.zip
C:\Users\Administrator\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\built\lib\files\downloader.js:53
                                    error.msg = 'Error: corrupt download for ' + fileName +
                                              ^

TypeError: Cannot set property 'msg' of null
    at fs.stat (C:\Users\Administrator\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\built\lib\files\downloader.js:53:47)
    at FSReqWrap.oncomplete (fs.js:123:15)

It's ok yesterday and I think this error is caused by the new webdriver-manager 12.0.5

Bob Bai
  • 283
  • 4
  • 20

1 Answers1

1

webdriver-manager@12.0.5 did not change the way the files were downloaded. The only new thing is that it does not download a new cache on webdriver-manager start. What could be the problem is that you might have cancelled the job when the file was writing the cached response.

You could do is navigate to your webdriver-manager/selenium/ folder and delete the contents or just delete the entire selenium/ directory then retry webdriver-manager update --ignore_ssl

cnishina
  • 5,016
  • 1
  • 23
  • 40
  • Also, not really part of the answer, but could you check to see the file size of the response json and xml files if the are size 0? – cnishina Apr 26 '17 at 23:26
  • It works fine today. It seems the problem is caused by geckodriver-v0.16.1.zip. This zip file is broken yesterday and cannot be unzipped. – Bob Bai Apr 27 '17 at 01:20
  • Actually, these days I asked so many questions, because I want to upload newest protractor which is installed with chromedriver and selenium-server-jar to our private npm registry, so other guys in my team can get protractor with npm install after set dependencies in package.json. But we have a problem, users need to changed the paths in update-config.json file manually after npm install. I have wrote a Windows batch script to modify update-config.json file and set system variable and put this file in protractor module. But how can this script run automatically when npm install? – Bob Bai Apr 27 '17 at 01:50
  • As I know, when `npm install -g protractor`, protractor will be download and the system variable is set. How do you make this happen? – Bob Bai Apr 27 '17 at 01:52
  • @ cnishina can you have a look at this? – Bob Bai Apr 27 '17 at 12:00
  • Oh, well did you know there are ways to not use update-config.json at all? See http://stackoverflow.com/questions/43581462/unable-to-use-protractor-with-chromedriver-and-selenium-server-directly/43583194#43583194. I would create a different stackoverflow question. Also, add more information about this set up and add why you are doing this. – cnishina Apr 27 '17 at 13:45