Skip to content
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

[regression] WCT requires internet access to run local tests #2976

Open
fearphage opened this issue Sep 15, 2015 · 11 comments
Open

[regression] WCT requires internet access to run local tests #2976

fearphage opened this issue Sep 15, 2015 · 11 comments

Comments

@fearphage
Copy link

WCT verifies it has data that already exists before it will run tests. This makes testing on a plane or at Polymer Summit completely impossible. I'm unable to run tests even though I have everything downloaded. The call to fetch/check drivers should be smarter.

Connected output

➜  polymer-inline-editor git:(polymer-v1.0) ✗ npm test

> inline-editor@ test [...snip...]/polymer-inline-editor
> wct

Installing and starting Selenium server for local browsers
Selenium server running on port 34324
Web server running on port 2000 and serving from ...

Offline output

➜  polymer-inline-editor git:(polymer-v1.0) ✗ npm test

> inline-editor@ test [...snip...]/polymer-inline-editor
> wct

Installing and starting Selenium server for local browsers
----------
selenium-standalone installation starting
----------

---
selenium install:
from: http://selenium-release.storage.googleapis.com/2.47/selenium-server-standalone-2.47.1.jar
to: [...snip...]/polymer-inline-editor/node_modules/web-component-tester/node_modules/wct-local/node_modules/selenium-standalone/.selenium/selenium-server/2.47.1-server.jar

---
chrome install:
from: http://chromedriver.storage.googleapis.com/2.18/chromedriver_linux64.zip
to: [...snip...]/polymer-inline-editor/node_modules/web-component-tester/node_modules/wct-local/node_modules/selenium-standalone/.selenium/chromedriver/2.18-x64-chromedriver



Error: Could not request headers from http://chromedriver.storage.googleapis.com/2.18/chromedriver_linux64.zip: Error: getaddrinfo EAI_AGAIN chromedriver.storage.googleapis.com:80

npm ERR! Test failed.  See above for more details.
@fearphage fearphage changed the title [regression] WCT requires internet access to run tests [regression] WCT requires internet access to run local tests Sep 15, 2015
@wibblymat
Copy link
Contributor

I made a PR (Polymer/wct-local#11) that gives you the option of not doing the selenium installation. This would give you a workaround, but I guess that ideally it wouldn't do the install at all if the current version was already installed.

@daKmoR
Copy link

daKmoR commented Jul 21, 2017

@arthurevans can be closed as it's already merged

you can use it like this polymer test --skip-selenium-install

@davidmaxwaterman
Copy link

I'm seeing this issue now. My network connectivity is intermittent, and I still want to develop tests, but sometimes polymer test fails to run with the above messages. Is this really the intended behaviour? It seems to me that installing these things should be a one-time event.

@teodorkostov
Copy link

Even with --skip-selenium-install the polymer-cli (v1.5.7) with wct (v6.5.0) behave differently on a machine with or without internet access.

When there is internet the installation is skipped and all tests are run successfully.

Without internet access (e.g. corporate proxy) the testing process hangs after Selenium started.

PS: Exact command used: polymer test --skip-selenium-install

@silenceisgolden
Copy link

silenceisgolden commented Jan 26, 2018

@terusus I've run into the hanging issue, and sometimes it works to set the environment variables for the terminal you are using. I have in my .bashrc something like:

proxy_on() {
  export HTTP_PROXY="<url>"
  export HTTPS_PROXY="<url>"

  npm config set proxy <url>
  npm config set https-proxy <url>
}

I do not know if that is your specific issue but maybe it might help.

@teodorkostov
Copy link

@silenceisgolden I know how to set the proxy settings for npm and the terminal in general. However, my goal is to make it work without a network connection. Setup once from a validated source. And forget about the internet.

@teodorkostov
Copy link

teodorkostov commented Jan 30, 2018

The fix is resolving localhost as an ipv4.

So --skip-selenium-install + 127.0.0.1 localhost in /etc/hosts works without internet access.

@frankbecker
Copy link

Yes I had to go offline for this to work. I am behind a strict firewall, and currently working within a VPN.

@redbugz
Copy link
Contributor

redbugz commented Mar 27, 2018

I just tried --skip-selenium-install and I still get an error:

$ npx wct --skip-plugin sauce --skip-selenium-install
Installing and starting Selenium server for local browsers
----------
selenium-standalone installation starting
----------

---
selenium install:
from: https://selenium-release.storage.googleapis.com/3.8/selenium-server-standalone-3.8.1.jar
to: /private/tmp/fs-new-element/node_modules/selenium-standalone/.selenium/selenium-server/3.8.1-server.jar
---
chrome install:
from: https://chromedriver.storage.googleapis.com/2.36/chromedriver_mac64.zip
to: /private/tmp/fs-new-element/node_modules/selenium-standalone/.selenium/chromedriver/2.36-x64-chromedriver
---
firefox install:
from: https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-macos.tar.gz
to: /private/tmp/fs-new-element/node_modules/selenium-standalone/.selenium/geckodriver/0.19.1-x64-geckodriver



Error: Could not request headers from https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-macos.tar.gz: Error: getaddrinfo ENOTFOUND github.com github.com:443

I already have all those files downloaded.

@teodorkostov
Copy link

Hi @redbugz - pay attention to the file names. When you download the archives you have to extract the content, move it to the correct folder and rename it accordingly.

Also make sure that in your hosts file localhost resolves to an IPv4.

usergenic referenced this issue Jun 6, 2018
(Towards polymer/web-component-tester#215)

This behavior for this option was already built-in to the plugin but
there was no way to enable it.
@aomarks aomarks transferred this issue from Polymer/web-component-tester Jan 3, 2019
@stale
Copy link

stale bot commented Mar 3, 2020

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.

@stale stale bot added the wontfix label Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants