protractor
protractor copied to clipboard
Bug: DevToolsActivePort File doesn't exist
Bug report
Not able to run chrome directconnect. WebDriverError: unknown error: DevToolsActivePort file doesn't exist. About the same issue as the log here https://github.com/SeleniumHQ/selenium/issues/5964
- Node Version:
6
- Protractor Version:
5.3.1
- Angular Version:
N/A
- Browser(s):
chrome
- Operating System and Version
windows 10
- Your protractor configuration file
let config = {
allScriptsTimeout: 11000,
specs: [
'./specs/**.spec.ts'
],
capabilities: {
'browserName': 'chrome',
'useAutomationExtension': false,
'args': ['--disable-gpu','-disable-dev-shm-usage','--no-sandbox','-disable-popup-blocking','--start-maximized','--disable-web-security','--allow-running-insecure-content','--disable-infobars']
},
params: {
basePath
},
directConnect: true,
baseUrl: basePath,
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function () { }
},
useAllAngular2AppRoots: true,
beforeLaunch: function () {
require('ts-node').register({
lazy: true
});
}
};
Hi, @lastlink ! Try this example and provide feedback about results.
Same here
We are getting the same thing on a Linux server
We are also getting this same error on a Linux Server
- Node Version: 8.5.0
- NPM Versio: 5.3.0
- Protractor Version: 5.3.2
- Browser: Chrome
- Operating System: Amozon Linux AMI
- Chromedriver Version: 2.40
- Selenium-Server-Standalone: 3.12.0
- Geckodriver: 0.20.1
Conf file
exports.config = {
seleniumServerJar: 'selenium-server.jar',
specs: ['tests/**/*.js'],
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: ["--headless", "--disable-gpu", "--window-size=800,600"]
}
},
params: {
},
onPrepare: function () {
let jasmineReporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
consolidateAll: false,
savePath: 'results',
filePrefix: ''
}));
},
jasmineNodeOpts: {
print: function () {}
}
};
Error Output
[15:28:37] I/launcher - Running 1 instances of WebDriver
[15:28:37] I/local - Starting selenium standalone server...
[15:28:37] I/local - Selenium standalone server started at http://10.0.0.192:41963/wd/hub
[15:29:38] E/launcher - unknown error: DevToolsActivePort file doesn't exist
(Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.9.81-35.56.amzn1.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.05 seconds
Build info: version: '3.5.0', revision: '8def36e068', time: '2017-08-10T23:00:22.093Z'
System info: host: 'URL of the server', ip: 'ip address', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.81-35.56.amzn1.x86_64', java.version: '1.8.0_161'
Driver info: driver.version: unknown
[15:29:38] E/launcher - WebDriverError: unknown error: DevToolsActivePort file doesn't exist
(Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.9.81-35.56.amzn1.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.05 seconds
Build info: version: '3.5.0', revision: '8def36e068', time: '2017-08-10T23:00:22.093Z'
System info: host: 'url of server', ip: 'ip address', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.81-35.56.amzn1.x86_64', java.version: '1.8.0_161'
Driver info: driver.version: unknown
at WebDriverError (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:27:5)
at Object.checkLegacyResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: WebDriver.createSession()
at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:761:15)
at createDriver (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:170:33)
at Builder.build (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:626:16)
at Local.getNewDriver (/usr/lib/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
at Runner.createBrowser (/usr/lib/node_modules/protractor/built/runner.js:195:43)
at q.then.then (/usr/lib/node_modules/protractor/built/runner.js:339:29)
at _fulfilled (/usr/lib/node_modules/protractor/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/usr/lib/node_modules/protractor/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/usr/lib/node_modules/protractor/node_modules/q/q.js:796:13)
[15:29:38] E/launcher - Process exited with error code 199
This seemed to fix it as an argument in protractor.config.js: --disable-dev-shm-usage
, @lastlink doesn't have --
@logan-jobzmall can you give a little bit more context on how you fixed this issue.
We still have this issue even with --disable-dev-shm-usage
. Downgrading to < 2.40 works fine. Also on linux.
I wrote that error message. See https://bugs.chromium.org/p/chromedriver/issues/detail?id=2470
What version of Chrome are you using?
@CalebRouleau I've tried with [email protected] (Chrome 66) and [email protected] (Chrome 69)
And the following flags:
['--headless', '--disable-gpu', '--no-sandbox', '--disable-extensions', '--disable-dev-shm-usage']
Interesting. I am updating ChromeDriver to improve the error message. I suspect that Chrome is just crashing for some reason. It would help if you could get logs from Chrome or get the commandline that was used to start Chrome (which is in the chromedriver log file.)
@CalebRouleau I might add that we're using is a server version of linux (RHEL). Hence, no GUI.
That should not impact your ability to get logs. See http://chromedriver.chromium.org/logging
this solved my problem. https://intoli.com/blog/installing-google-chrome-on-centos/
I was having the very same problem, the solution i found was to downgrade your ChromeDriver. I downgraded mine to version 2.37
You can use this command webdriver-manager update --versions.chrome 2.37
@tony2tones I can confirm your solution is the only thing that worked for me on Windows 10 Chrome 67.0.3396.99 protractor 5.3.2.
Thanks @lepadellec it was not easy, took about two days to figure this out. Spread the word.
Any success on the same issue, i am also stuck
Same apparring
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: DevToolsActivePort file doesn't exist (Driver info: chromedriver=2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 60.87 seconds Build info: version: '2.52.0', revision: '4c2593cfc3689a7fcd7be52549167e5ccc93ad28', time: '2016-02-11 11:22:43' System info: host: 'iris-csg-651', ip: '169.254.106.149', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_112' Driver info: org.openqa.selenium.chrome.ChromeDriver
I have the same issue and I created a workaround:
maxcounter=5
for counter in range(maxcounter):
try:
driver = webdriver.Chrome(chrome_options=options,
service_log_path=logfile,
service_args=["--verbose", "--log-path=%s" % logfile])
break
except WebDriverException as e:
print("RETRYING INITIALIZATION OF WEBDRIVER! Error: %s" % str(e))
time.sleep(10)
if counter==maxcounter-1:
raise WebDriverException("Maximum number of selenium-firefox-webdriver-retries exceeded.")
@tony2tones Downgrading to 2.38 worked for me on Windows 10 Chrome 66.0.3359.181 . Thanks!
I solved the issue by using:
webdriver-manager start
instead of:
sudo webdriver-manager start
hi,
We are geting below error while running automaiton on service .
unknown error: DevToolsActivePort file doesn't exist
Thanks
@CalebRouleau @tony2tones @GonzaloCY I am facing the same error in the Linux server. Do we have any workaround as the chromedriver version 2.40 or less is not available for download. Also, the 'webdriver-manager start' command is not supported by Linux-Ubuntu. Please advise