protractor icon indicating copy to clipboard operation
protractor copied to clipboard

webdriver-manager update fails with 302

Open marcopg opened this issue 12 years ago • 33 comments

+ webdriver-manager update
Updating selenium standalone
downloading http://selenium-release.storage.googleapis.com/2.41/selenium-server-standalone-2.41.0.jar...
Updating chromedriver
downloading https://chromedriver.storage.googleapis.com/2.9/chromedriver_mac32.zip...

/Users/marcopg/.nvm/v0.10.28/lib/node_modules/protractor/bin/webdriver-manager:123
      throw new Error('Got code ' + res.statusCode + ' from ' + fileUrl);
            ^
Error: Got code 302 from http://selenium-release.storage.googleapis.com/2.41/selenium-server-standalone-2.41.0.jar
    at ClientRequest.<anonymous> (/Users/marcopg/.nvm/v0.10.28/lib/node_modules/protractor/bin/webdriver-manager:123:13)
    at ClientRequest.g (events.js:180:16)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1688:21)
    at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23)
    at Socket.socketOnData [as ondata] (http.js:1583:20)
    at TCP.onread (net.js:527:27)

It looks like google storage is now redirecting

marcopg-macbook:~ marcopg$ curl -v http://selenium-release.storage.googleapis.com/2.41/selenium-server-standalone-2.41.0.jar
* Adding handle: conn: 0x7ff074003a00
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7ff074003a00) send_pipe: 1, recv_pipe: 0
* About to connect() to selenium-release.storage.googleapis.com port 80 (#0)
*   Trying 173.194.34.139...
* Connected to selenium-release.storage.googleapis.com (173.194.34.139) port 80 (#0)
> GET /2.41/selenium-server-standalone-2.41.0.jar HTTP/1.1
> User-Agent: curl/7.30.0
> Host: selenium-release.storage.googleapis.com
> Accept: */*
>
< HTTP/1.1 302 Found
< Expires: Tue, 20 May 2014 22:07:20 GMT
< Date: Tue, 20 May 2014 21:07:20 GMT
< Location: http://beyhd0j1ygs5h2sg7dps7wfs0z---r6---sn-cu-n1qs.c.bigcache.googleapis.com/2.41/selenium-server-standalone-2.41.0.jar?ms=au&mt=1400619960&mv=m&mws=yes
* Server HTTP Upload Server Built on May 19 2014 09:31:01 (1400517061) is not blacklisted
< Server: HTTP Upload Server Built on May 19 2014 09:31:01 (1400517061)
< Content-Length: 0
< Cache-Control: public, max-age=3600
< Age: 696
< Content-Type: text/html; charset=UTF-8
< Alternate-Protocol: 80:quic
<
* Connection #0 to host selenium-release.storage.googleapis.com left intact

marcopg avatar May 20 '14 21:05 marcopg

+1 We'd suggest to switch from http to request to handle any current and future redirects.

xaka avatar May 20 '14 21:05 xaka

+1 breaking CI isn't fun :(

cesarandreu avatar May 20 '14 21:05 cesarandreu

+1 Or even the drop-in http module replacement, follow-redirects: https://github.com/olalonde/follow-redirects

heyheyjp avatar May 20 '14 22:05 heyheyjp

:+1:

tonybaroneee avatar May 20 '14 22:05 tonybaroneee

+1 - this was a quick fix.

teddyhwang avatar May 21 '14 01:05 teddyhwang

Nice, you are the man @cesarandreu

Verifying fix in #830 on a Windows 7 machine

hsrobmln avatar May 21 '14 02:05 hsrobmln

PR #830 verified working in CircleCI.

cesarandreu avatar May 21 '14 03:05 cesarandreu

Hi, same issue here. Please help

clakech avatar May 21 '14 11:05 clakech

+1

In order to use @cesarandreu 's patch, I've replaced the protractor version dependency in the "package.json" file to :
"protractor": "git://github.com/cesarandreu/protractor.git#9d568edbee95b4eebda7ff8f03c47b01cc3a010c"

flegall avatar May 21 '14 11:05 flegall

:+1:

subicura avatar May 21 '14 11:05 subicura

:+1:

k0nG avatar May 21 '14 11:05 k0nG

:+1: and thanks flegall.

akinnunen avatar May 21 '14 11:05 akinnunen

ahah, funny how everybody ends here today :-D

ffesseler avatar May 21 '14 12:05 ffesseler

:+1:

bkopanczyk-avaus avatar May 21 '14 13:05 bkopanczyk-avaus

:+1:

stibos avatar May 21 '14 13:05 stibos

Hmm, seems that my tests are bombing out now after pulling in the redirected version of chromedriver. It can't find the "by" keyword in the global namespace (i.e. by.css). Might be a problem with a recent selenium webdriver/protractor update? Anyone else having this issue?

tonybaroneee avatar May 21 '14 14:05 tonybaroneee

Hey folks, I'm on it - fix should be out asap.

juliemr avatar May 21 '14 16:05 juliemr

Leaving open until release is out

juliemr avatar May 21 '14 17:05 juliemr

Is there a plan to do an immediate or pretty prompt release to handle this ? Or is it going to be a while before there's a tagged release that includes this fix?

awk avatar May 21 '14 17:05 awk

Release should be out within the day.

juliemr avatar May 21 '14 17:05 juliemr