Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
429 stars 200 forks source link

polymer test crashing when driver download unavailable #2348

Open Lithl opened 7 years ago

Lithl commented 7 years ago

Description

Attempting to run my tests failed when polymer-cli attempted to request a file from GitHub that was not available.

Versions & Environment

Steps to Reproduce

On a 64-bit Linux system:

  1. Run polymer test -l firefox
  2. Block access to https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz
    • Note: as of writing this issue, the file is unavailable at this address, which prompted the discovery of this bug. This, despite the file being linked to from https://github.com/mozilla/geckodriver/releases. These repo steps are assuming that the file will become available again.
  3. Run polymer test -l firefox

Expected Results

Test environment set up, with necessary applications installed. On the second run, tests run without needing to install anything.

Actual Results

Running the test with geckodriver download unavailable resulted in the following output (absolute path to my home dir replaced with ~):

(node:25637) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
Installing and starting Selenium server for local browsers
----------
selenium-standalone installation starting
----------

---
selenium install:
from: https://selenium-release.storage.googleapis.com/3.0/selenium-server-standalone-3.0.1.jar
to: ~/.nvm/versions/node/v7.5.0/lib/node_modules/polymer-cli/node_modules/selenium-standalone/.selenium/selenium-server/3.0.1-server.jar
---
chrome install:
from: https://chromedriver.storage.googleapis.com/2.27/chromedriver_linux64.zip
to: ~/.nvm/versions/node/v7.5.0/lib/node_modules/polymer-cli/node_modules/selenium-standalone/.selenium/chromedriver/2.27-x63-chromedriver
---
firefox install:
from: https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz
to: ~/.nvm/versions/node/v7.5.0/lib/node_modules/polymer-cli/node_modules/selenium-standalone/.selenium/geckodriver/0.11.1-x64-geckodriver
---
File from https://chromedriver.storage.googleapis.com/2.27/chromedriver_linux64.zip has already been downloaded
---
File from https://selenium-release.storage.googleapis.com/3.0/selenium-server-standalone-3.0.1.jar has already been downloaded

Error: Could not request headers from https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz: Error: connect ETIMEDOUT 52.216.0.0:443

error:   cli runetime exception: Error: Could not request headers from https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz: Error: connect ETIMEDOUT 52.216.0.0:443
error: Error: Could not request headers from https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-linux64.tar.gz: Error: connect ETIMEDOUT 52.216.0.0:443
    at Request.<anonymous> (~/.nvm/versions/node/v7.5.0/lib/node_modules/polymer-cli/node_modules/selenium-standalone/lib/install.js:443:8)
    at Object.onceWrapper (events.js:291:19)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:189:7)
    at Request.onRequestError (~/.nvm/versions/node/v7.5.0/lib/node_modules/polymer-cli/node_modules/request/request.js:845:8)
    at emitOne (events.js:96:13)
    at ClientRequest.emi (events.js:189:7)
    at TLSSocket.socketErrorListener (_http_client.js:358:9)
    at emitOne (events.js:96:13)
    at TLSSocket.emit (events.js:189:7)
Lithl commented 7 years ago

The same error occurs with polymer test -l chrome or polymer test, since apparently WCT wants to grab the drivers for every installed browser despite the -l flag's presence and value.

kwge commented 7 years ago

Any fix for this error yet?

sudhamohanpanda commented 5 years ago

I got same error. is it fix? is there any workaround?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.