polymer test does not currently work out of the box and yields a Error: No browsers configured to run error. As far as I understand polymer-cli should generally work out of the box, additional steps (requirements) in order for built in functionality to work (and associated problems) should be well documented. While this may be an issue that should be filed with web-component-tester generally it is _extremely_ painful for a user to try to find out which package in related-related packages is broken (I've read the README for web-component-tester, which is terribly documented and I still have no idea what's missing) or preventing functionality that according to documentation should just work.
Running polymer test yields the following:
Error: No browsers configured to run
error: Promise rejection: Error: No browsers configured to run
error: Error: No browsers configured to run
at Object.<anonymous> (/usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:446:19)
at next (native)
at /usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:20:65
at __awaiter (/usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:16:12)
at Object.validate (/usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:434:12)
at Object.<anonymous> (/usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/steps.js:64:22)
at next (native)
at fulfilled (/usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/steps.js:4:58)
at process._tickCallback (internal/process/next_tick.js:103:7)
Running polymer test -l firefox yields the following:
Error: The following browsers were not found: firefox. (All installed browsers found: )
error: Promise rejection: Error: The following browsers were not found: firefox. (All installed browsers found: )
error: Error: The following browsers were not found: firefox. (All installed browsers found: )
at Object.<anonymous> (/usr/lib/node_modules/polymer-cli/node_modules/wct-local/lib/browsers.js:62:19)
at next (native)
at fulfilled (/usr/lib/node_modules/polymer-cli/node_modules/wct-local/lib/browsers.js:4:58)
at process._tickCallback (internal/process/next_tick.js:103:7)
@pik thanks for taking the time to write this up. It looks like ultimately launchpad is having trouble finding browsers installed on your machine. Can you run the following command and share the output?
DEBUG=launchpad:* polymer test
> env 'DEBUG=launchpad:*' polymer test
launchpad:local:platform Local platform init. Enabled browsers: +0ms chrome, chromium, firefox, opera, phantom
launchpad:local Initializing local launchers +322ms undefined
launchpad:local:browser Caching discovery for local browser +2ms chrome
launchpad:local:browser Caching discovery for local browser +1ms chromium
launchpad:local:browser Caching discovery for local browser +0ms firefox
launchpad:local:browser Caching discovery for local browser +1ms opera
launchpad:local:browser Caching discovery for local browser +0ms phantom
launchpad:local:browser Ran pathQuery for firefox +37ms which firefox /usr/bin/firefox
launchpad:local:version Ran /usr/bin/firefox --version +30ms [ 'Mozilla Firefox 49.0.1\n', '' ]
launchpad:local Listed all browsers (before normalization) +3ms [ null,
null,
{ name: 'firefox',
pathQuery: 'which firefox',
process: 'firefox',
multi: true,
args: [ '--private-window' ],
path: '/usr/bin/firefox',
binPath: '/usr/bin/firefox',
command: '/usr/bin/firefox',
version: 'Mozilla Firefox 49.0.1' },
null,
null ]
Error: No browsers configured to run
error: Promise rejection: Error: No browsers configured to run
error: Error: No browsers configured to run
at Object.<anonymous> (/usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:446:19)
at next (native)
at /usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:20:65
at __awaiter (/usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:16:12)
at Object.validate (/usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:434:12)
at Object.<anonymous> (/usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/steps.js:64:22)
at next (native)
at fulfilled (/usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/steps.js:4:58)
at process._tickCallback (internal/process/next_tick.js:103:7)
I'm having this same issue, here's my output.
[tpanetti@arch webcomponentsjs]$ DEBUG=launchpad:* polymer test
^C launchpad:local:platform Local platform init. Enabled browsers: +0ms chrome, chromium, firefox, opera, phantom
launchpad:local Initializing local launchers +2s undefined
launchpad:local:browser Caching discovery for local browser +2ms chrome
launchpad:local:browser Caching discovery for local browser +2ms chromium
launchpad:local:browser Caching discovery for local browser +0ms firefox
launchpad:local:browser Caching discovery for local browser +1ms opera
launchpad:local:browser Caching discovery for local browser +0ms phantom
[tpanetti@arch webcomponentsjs]$ DEBUG=launchpad:* polymer test > ~/Downloads/output.txt
launchpad:local:platform Local platform init. Enabled browsers: +0ms chrome, chromium, firefox, opera, phantom
launchpad:local Initializing local launchers +321ms undefined
launchpad:local:browser Caching discovery for local browser +3ms chrome
launchpad:local:browser Caching discovery for local browser +1ms chromium
launchpad:local:browser Caching discovery for local browser +0ms firefox
launchpad:local:browser Caching discovery for local browser +0ms opera
launchpad:local:browser Caching discovery for local browser +0ms phantom
launchpad:local:browser Ran pathQuery for firefox +31ms which firefox /usr/bin/firefox
launchpad:local:version Ran /usr/bin/firefox --version +617ms [ 'Mozilla Firefox 49.0.1\n', '' ]
launchpad:local Listed all browsers (before normalization) +3ms [ null,
null,
{ name: 'firefox',
pathQuery: 'which firefox',
process: 'firefox',
multi: true,
args: [ '--private-window' ],
path: '/usr/bin/firefox',
binPath: '/usr/bin/firefox',
command: '/usr/bin/firefox',
version: 'Mozilla Firefox 49.0.1' },
null,
null ]
error: Promise rejection: Error: No browsers configured to run
error: Error: No browsers configured to run
at Object.<anonymous> (/usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:446:19)
at next (native)
at /usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:20:65
at __awaiter (/usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:16:12)
at Object.validate (/usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:434:12)
at Object.<anonymous> (/usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/steps.js:64:22)
at next (native)
at fulfilled (/usr/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/steps.js:4:58)
at process._tickCallback (internal/process/next_tick.js:103:7)
Hmm, does this work for either of you?
DEBUG=launchpad:* polymer test --local firefox
Hi Fred,
Thanks for the suggestion. It did notwork for me.
joebash@joethinks:~/polymer_pjs/joescliapp1$ DEBUG=launchpad:* polymer test --local firefox
launchpad:local:platform Local platform init. Enabled browsers: chrome, chromium, firefox, opera, phantom +0ms
launchpad:local Initializing local launchers undefined +565ms
launchpad:local:browser Caching discovery for local browser chrome +3ms
launchpad:local:browser Caching discovery for local browser chromium +2ms
launchpad:local:browser Caching discovery for local browser firefox +1ms
launchpad:local:browser Caching discovery for local browser opera +1ms
launchpad:local:browser Caching discovery for local browser phantom +1ms
launchpad:local Listed all browsers (before normalization) [ null, null, null, null, null ] +690ms
Error: The following browsers were not found: firefox. (All installed browsers found: )
error: cli runtime exception: Error: The following browsers were not found: firefox. (All installed browsers found: )
error: Error: The following browsers were not found: firefox. (All installed browsers found: )
at Object.<anonymous> (/usr/lib/node_modules/polymer-cli/node_modules/wct-local/lib/browsers.js:63:19)
at Generator.next (<anonymous>)
at fulfilled (/usr/lib/node_modules/polymer-cli/node_modules/wct-local/lib/browsers.js:4:58)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)`
On all my Linux machines I have to use the launch pad environment variables to point to the browsers
Any solution for this issue , none of the mentioned solutions is working for me too , same error
@hyyan did you set your environment variables? These are mine:
LAUNCHPAD_FIREFOX=/usr/local/bin/firefox
LAUNCHPAD_CHROME=/usr/bin/chromium-browser
@stramel Thanks for the response, that is indeed worked and the error above is resolved, but I got another error now
Here is the output
cli runtime exception: Error: {"state":"session not created","sessionId":null,"hCode":1820236884,"value":{"additionalInformation":"\nDriver info: driver.version: FirefoxDriver","localizedMessage":"Unable to create new remote session. desired capabilities = Capabilities [{firefox_binary=/usr/bin/firefox, marionette=true, variant=, firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@6596f0bf, browserName=firefox, javascriptEnabled=true, moz:firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@6596f0bf, version=52, platform=ANY}], required capabilities = Capabilities [{}]\nBuild info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'\nSystem info: host: 'localhost', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-514.16.1.el7.x86_64', java.version: '1.8.0_66'\nDriver info: driver.version: FirefoxDriver","systemInformation":"System info: host: 'localhost', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-514.16.1.el7.x86_64', java.version: '1.8.0_66'","supportUrl":null,"cause":null,"stackTrace":[{"fileName":"ProtocolHandshake.java","nativeMethod":false,"methodName":"createSession","className":"org.openqa.selenium.remote.ProtocolHandshake","hCode":-960127865,"lineNumber":91,"class":"java.lang.StackTraceElement"},{"fileName":"HttpCommandExecutor.java","nativeMethod":false,"methodName":"execute","className":"org.openqa.selenium.remote.HttpCommandExecutor","hCode":-1852790188,"lineNumber":141,"class":"java.lang.StackTraceElement"},{"fileName":"DriverCommandExecutor.java","nativeMethod":false,"methodName":"execute","className":"org.openqa.selenium.remote.service.DriverCommandExecutor","hCode":-633333582,"lineNumber":82,"class":"java.lang.StackTraceElement"},{"fileName":"RemoteWebDriver.java","nativeMethod":false,"methodName":"execute","className":"org.openqa.selenium.remote.RemoteWebDriver","hCode":1767885088,"lineNumber":601,"class":"java.lang.StackTraceElement"},{"fileName":"RemoteWebDriver.java","nativeMethod":false,"methodName":"startSession","className":"org.openqa.selenium.remote.RemoteWebDriver","hCode":-1182648233,"lineNumber":241,"class":"java.lang.StackTraceElement"},{"fileName":"RemoteWebDriver.java","nativeMethod":false,"methodName":"<init>","className":"org.openqa.selenium.remote.RemoteWebDriver","hCode":2001602308,"lineNumber":128,"class":"java.lang.StackTraceElement"},{"fileName":"FirefoxDriver.java","nativeMethod":false,"methodName":"<init>","className":"org.openqa.selenium.firefox.FirefoxDriver","hCode":2005391616,"lineNumber":259,"class":"java.lang.StackTraceElement"},{"fileName":"FirefoxDriver.java","nativeMethod":false,"methodName":"<init>","className":"org.openqa.selenium.firefox.FirefoxDriver","hCode":2005391604,"lineNumber":247,"class":"java.lang.StackTraceElement"},{"fileName":"FirefoxDriver.java","nativeMethod":false,"methodName":"<init>","className":"org.openqa.selenium.firefox.FirefoxDriver","hCode":2005391599,"lineNumber":242,"class":"java.lang.StackTraceElement"},{"fileName":"FirefoxDriver.java","nativeMethod":false,"methodName":"<init>","className":"org.openqa.selenium.firefox.FirefoxDriver","hCode":2005391492,"lineNumber":135,"class":"java.lang.StackTraceElement"},{"fileName":"NativeConstructorAccessorImpl.java","nativeMethod":true,"methodName":"newInstance0","className":"sun.reflect.NativeConstructorAccessorImpl","hCode":-917798116,"lineNumber":-2,"class":"java.lang.StackTraceElement"},{"fileName":"NativeConstructorAccessorImpl.java","nativeMethod":false,"methodName":"newInstance","className":"sun.reflect.NativeConstructorAccessorImpl","hCode":-1864225098,"lineNumber":62,"class":"java.lang.StackTraceElement"},{"fileName":"DelegatingConstructorAccessorImpl.java","nativeMethod":false,"methodName":"newInstance","className":"sun.reflect.DelegatingConstructorAccessorImpl","hCode":-2122307259,"lineNumber":45,"class":"java.lang.StackTraceElement"},{"fileName":"Constructor.java","nativeMethod":false,"methodName":"newInstance","className":"java.lang.reflect.Constructor","hCode":-1319859920,"lineNumber":422,"class":"java.lang.StackTraceElement"},{"fileName":"FirefoxDriverProvider.java","nativeMethod":false,"methodName":"callConstructor","className":"org.openqa.selenium.remote.server.FirefoxDriverProvider","hCode":380089707,"lineNumber":86,"class":"java.lang.StackTraceElement"},{"fileName":"FirefoxDriverProvider.java","nativeMethod":false,"methodName":"newInstance","className":"org.openqa.selenium.remote.server.FirefoxDriverProvider","hCode":-616843602,"lineNumber":64,"class":"java.lang.StackTraceElement"},{"fileName":"DefaultDriverFactory.java","nativeMethod":false,"methodName":"newInstance","className":"org.openqa.selenium.remote.server.DefaultDriverFactory","hCode":-1365021416,"lineNumber":60,"class":"java.lang.StackTraceElement"},{"fileName":"DefaultSession.java","nativeMethod":false,"methodName":"call","className":"org.openqa.selenium.remote.server.DefaultSession$BrowserCreator","hCode":2056168471,"lineNumber":222,"class":"java.lang.StackTraceElement"},{"fileName":"DefaultSession.java","nativeMethod":false,"methodName":"call","className":"org.openqa.selenium.remote.server.DefaultSession$BrowserCreator","hCode":2056168458,"lineNumber":209,"class":"java.lang.StackTraceElement"},{"fileName":"FutureTask.java","nativeMethod":false,"methodName":"run","className":"java.util.concurrent.FutureTask","hCode":-820313554,"lineNumber":266,"class":"java.lang.StackTraceElement"},{"fileName":"DefaultSession.java","nativeMethod":false,"methodName":"run","className":"org.openqa.selenium.remote.server.DefaultSession$1","hCode":-255143467,"lineNumber":176,"class":"java.lang.StackTraceElement"},{"fileName":"ThreadPoolExecutor.java","nativeMethod":false,"methodName":"runWorker","className":"java.util.concurrent.ThreadPoolExecutor","hCode":-1285150184,"lineNumber":1142,"class":"java.lang.StackTraceElement"},{"fileName":"ThreadPoolExecutor.java","nativeMethod":false,"methodName":"run","className":"java.util.concurrent.ThreadPoolExecutor$Worker","hCode":-242190645,"lineNumber":617,"class":"java.lang.StackTraceElement"},{"fileName":"Thread.java","nativeMethod":false,"methodName":"run","className":"java.lang.Thread","hCode":-82946320,"lineNumber":745,"class":"java.lang.StackTraceElement"}],"suppressed":[],"message":"Unable to create new remote session. desired capabilities = Capabilities [{firefox_binary=/usr/bin/firefox, marionette=true, variant=, firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@6596f0bf, browserName=firefox, javascriptEnabled=true, moz:firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@6596f0bf, version=52, platform=ANY}], required capabilities = Capabilities [{}]\nBuild info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'\nSystem info: host: 'localhost', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-514.16.1.el7.x86_64', java.version: '1.8.0_66'\nDriver info: driver.version: FirefoxDriver","hCode":993698868,"class":"org.openqa.selenium.SessionNotCreatedException","buildInformation":{"buildRevision":"1969d75","buildTime":"2016-10-18 09:48:19 -0700","releaseLabel":"3.0.1","hCode":1679814132,"class":"org.openqa.selenium.internal.BuildInfo"},"screen":null},"class":"org.openqa.selenium.remote.Response","status":33}
error: Error: {"state":"session not created","sessionId":null,"hCode":1820236884,"value":{"additionalInformation":"\nDriver info: driver.version: FirefoxDriver","localizedMessage":"Unable to create new remote session. desired capabilities = Capabilities [{firefox_binary=/usr/bin/firefox, marionette=true, variant=, firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@6596f0bf, browserName=firefox, javascriptEnabled=true, moz:firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@6596f0bf, version=52, platform=ANY}], required capabilities = Capabilities [{}]\nBuild info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'\nSystem info: host: 'localhost', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-514.16.1.el7.x86_64', java.version: '1.8.0_66'\nDriver info: driver.version: FirefoxDriver","systemInformation":"System info: host: 'localhost', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-514.16.1.el7.x86_64', java.version: '1.8.0_66'","supportUrl":null,"cause":null,"stackTrace":[{"fileName":"ProtocolHandshake.java","nativeMethod":false,"methodName":"createSession","className":"org.openqa.selenium.remote.ProtocolHandshake","hCode":-960127865,"lineNumber":91,"class":"java.lang.StackTraceElement"},{"fileName":"HttpCommandExecutor.java","nativeMethod":false,"methodName":"execute","className":"org.openqa.selenium.remote.HttpCommandExecutor","hCode":-1852790188,"lineNumber":141,"class":"java.lang.StackTraceElement"},{"fileName":"DriverCommandExecutor.java","nativeMethod":false,"methodName":"execute","className":"org.openqa.selenium.remote.service.DriverCommandExecutor","hCode":-633333582,"lineNumber":82,"class":"java.lang.StackTraceElement"},{"fileName":"RemoteWebDriver.java","nativeMethod":false,"methodName":"execute","className":"org.openqa.selenium.remote.RemoteWebDriver","hCode":1767885088,"lineNumber":601,"class":"java.lang.StackTraceElement"},{"fileName":"RemoteWebDriver.java","nativeMethod":false,"methodName":"startSession","className":"org.openqa.selenium.remote.RemoteWebDriver","hCode":-1182648233,"lineNumber":241,"class":"java.lang.StackTraceElement"},{"fileName":"RemoteWebDriver.java","nativeMethod":false,"methodName":"<init>","className":"org.openqa.selenium.remote.RemoteWebDriver","hCode":2001602308,"lineNumber":128,"class":"java.lang.StackTraceElement"},{"fileName":"FirefoxDriver.java","nativeMethod":false,"methodName":"<init>","className":"org.openqa.selenium.firefox.FirefoxDriver","hCode":2005391616,"lineNumber":259,"class":"java.lang.StackTraceElement"},{"fileName":"FirefoxDriver.java","nativeMethod":false,"methodName":"<init>","className":"org.openqa.selenium.firefox.FirefoxDriver","hCode":2005391604,"lineNumber":247,"class":"java.lang.StackTraceElement"},{"fileName":"FirefoxDriver.java","nativeMethod":false,"methodName":"<init>","className":"org.openqa.selenium.firefox.FirefoxDriver","hCode":2005391599,"lineNumber":242,"class":"java.lang.StackTraceElement"},{"fileName":"FirefoxDriver.java","nativeMethod":false,"methodName":"<init>","className":"org.openqa.selenium.firefox.FirefoxDriver","hCode":2005391492,"lineNumber":135,"class":"java.lang.StackTraceElement"},{"fileName":"NativeConstructorAccessorImpl.java","nativeMethod":true,"methodName":"newInstance0","className":"sun.reflect.NativeConstructorAccessorImpl","hCode":-917798116,"lineNumber":-2,"class":"java.lang.StackTraceElement"},{"fileName":"NativeConstructorAccessorImpl.java","nativeMethod":false,"methodName":"newInstance","className":"sun.reflect.NativeConstructorAccessorImpl","hCode":-1864225098,"lineNumber":62,"class":"java.lang.StackTraceElement"},{"fileName":"DelegatingConstructorAccessorImpl.java","nativeMethod":false,"methodName":"newInstance","className":"sun.reflect.DelegatingConstructorAccessorImpl","hCode":-2122307259,"lineNumber":45,"class":"java.lang.StackTraceElement"},{"fileName":"Constructor.java","nativeMethod":false,"methodName":"newInstance","className":"java.lang.reflect.Constructor","hCode":-1319859920,"lineNumber":422,"class":"java.lang.StackTraceElement"},{"fileName":"FirefoxDriverProvider.java","nativeMethod":false,"methodName":"callConstructor","className":"org.openqa.selenium.remote.server.FirefoxDriverProvider","hCode":380089707,"lineNumber":86,"class":"java.lang.StackTraceElement"},{"fileName":"FirefoxDriverProvider.java","nativeMethod":false,"methodName":"newInstance","className":"org.openqa.selenium.remote.serve
@stramel I was trying to run polymer test direclty without xvfb-run
even though it is not related to the current issue but it might help someone in the future.
The following solved my problem
yum install xorg-x11-server-Xvfb
xvfb-run polymer test
Thanks for your help
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.