Closed stephenson closed 5 years ago
Hi Heroku I also got that same error
Selenium::WebDriver::Error::UnknownError: unknown error: Chrome failed to start: exited abnormally (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /app/.apt/usr/bin/google-chrome-stable is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 4.4.0-1027-aws x86_64)
Same here, Rails application using Heroku CI. Was working fine until a few hours ago:
Failure/Error: page.set_rack_session(admin_id: admin.id)
Selenium::WebDriver::Error::UnknownError:
unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /app/.apt/usr/bin/google-chrome-stable is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.41.578700(2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 4.4.0-1027-aws x86_64)
Also experiencing the same issue on Heroku CI.
Selenium::WebDriver::Error::UnknownError:
unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /app/.apt/usr/bin/google-chrome-stable is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 4.4.0-1027-aws x86_64)
Is this still happening for you all? Can you try running a test with the no-cache option?
I saw this earlier but it resolved itself. I am wondering if there was a chrome release that caused this that was patched.
If you are still seeing it, can you post what heroku stack you are using?
@jabrown85 after re-run without cache, I'm not getting that error, however there are a few browser tests that are failing (they weren't failing before, and they are only failing at Heroku CI).
Stack is heroku-16 with buildpacks:
https://github.com/heroku/heroku-buildpack-google-chrome
https://github.com/heroku/heroku-buildpack-chromedriver
heroku/ruby
Any CI config was changed, so I'm not sure how to fix this. Is there something you suggest doing?
I have the same error. I reverted the commit in my fork and it works again (using heroku buildpacks:set https://github.com/nicolasmlv/heroku-buildpack-google-chrome#missinglibs)
What is the no-cache
option?
I just tried to remove my reverted buildpack, then adding this one again, then heroku repo:purge_cache
, then push empty commit, then heroku run bash
, $ google-chrome
-> and I still have /app/.apt/opt/google/chrome/chrome: error while loading shared libraries: libXcomposite.so.1: cannot open shared object file: No such file or directory
my buildpacks :
$ heroku buildpacks
=== myapp Buildpack URLs
1. heroku/ruby
2. https://github.com/heroku/heroku-buildpack-activestorage-preview
3. https://github.com/heroku/heroku-buildpack-google-chrome
@nicolasmlv by no cache I meant using the "Run again without cache" option from dashboard. You can also specify it via the cli: heroku ci:run --no-cache
If anyone is still having failures after now:
Is there anything consistent about the tests that are failing?
What options, if any, are you passing to chrome?
If it's consistent, can you replicate inside of heroku ci:debug
?
Looking at the 'Chrome failed to start: exited abnormally' error and it seems to be pretty common over the last year. I wonder if chrome changed something in the same version that updated the dependencies that made it happen more often. If anyone can help narrow down the type of test that fails the most often, we can investigate further.
@jabrown85 I am no longer experiencing this problem. Thanks for the help!
Rerunning the build with the "Run Again Without Cache" option in the Heroku CI UI fixed the issue! :+1:
I am still having this issue. I am using this buildpack within my actual application for web scraping and I'm getting the error every time I try to launch the browser. It just started happening today with no changes in my code.
Running the CI with --no-cache
is obviously not an option for me. Any advice please?
EDIT: Using @nicolasmlv new buildpack worked! Thanks for that fork. Would love for this issue to be addressed in master
@stephenarifin I believe master should be working for you. Switching back to the master will probably just work, since it was the switching of the buildpack that probably dropped the cache. If you get the error, you might also try the repo:purge_cache
on that app.
I am still having the same issue. I tried with @nicolasmlv buildpack and got the same error. I tried doing the repo:purge_cache
with no success... I'm also using the https://github.com/heroku/heroku-buildpack-chromedriver buildpack. Is this 100% necessary to use the buildpack?
Same issue here. According to https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#chrome-headless-doesnt-launch
libxcomposite1 is a required dependency, but it is only included in the build phase for a heroku-16 stack. I did also do the full repo:purge_cache
.
Having same issue. Here is output when trying to run chrome on heroku cli:
~ $ /app/.apt/usr/bin/google-chrome /app/.apt/opt/google/chrome-unstable/chrome: error while loading shared libraries: libXcomposite.so.1: cannot open shared object file: No such file or directory
having this problem on my heroku and can't fix this, can someone help? at now i rollback my apps and its work.. but what i must do next
I think this should be resolved now. Please let me know otherwise! Sorry for the trouble.
Thanks @jabrown85, it is working for me now!
anyone else having issues with this again? I started getting this error intermittently:
Selenium::WebDriver::Error::UnknownError:
unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /app/.apt/usr/bin/google-chrome-stable is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 4.4.0-1027-aws x86_64)
Not anymore! It was fixed for me, did you tried doing a clean install of the buildpack @rubendinho ?
@cmunozgar The error went away on its own yesterday - very strange.
I posted this in item #59, but it may be a better fit here:
Can someone please verify that headless Chrome actually works on Heroku's Stack 18? I have been working through a number of issues, with this being my most recent error message:
Selenium::WebDriver::Error::UnknownError (unknown error: Chrome failed to start: exited abnormally
(chrome not reachable)
(The process started from chrome location /app/.apt/usr/bin/google-chrome-stable is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
I am using these two buildpacks:
https://github.com/heroku/heroku-buildpack-chromedriver
https://github.com/heroku/heroku-buildpack-google-chrome
Hi Heroku I also got that same error
Selenium::WebDriver::Error::UnknownError: unknown error: Chrome failed to start: exited abnormally (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /app/.apt/usr/bin/google-chrome-stable is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 4.4.0-1027-aws x86_64)
this problem is lack the cheome headers before transfer your chromedriver for example you can try add this before transfer:
chrome_options = webdriver.ChromeOptions() chrome_options.add_argument('--headless') chrome_options.add_argument('--disable-gpu') chrome_options.add_argument("window-size=1024,768") chrome_options.add_argument("--no-sandbox")
You can also omit the headless, gpu, and no-sandbox if you use the $GOOGLE_CHROME_SHIM
provided by this buildpack.
This doesn't seem to have a reliable fix yet, I'm getting the same issue on Heroku 16: Selenium::WebDriver::Error::UnknownError (unknown error: Chrome failed to start: exited abnormally (chrome not reachable) (The process started from chrome location /app/.apt/usr/bin/google-chrome-stable is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
@jamintz did you tried with the repo:purge_cache
command on Heroku? Executing that command and removing the buildpacks and adding them back again fixed the issue for me.
I'm good, ref: Chrome not reachable #63.
Thanks that worked!
Just in case someone ran in the same issue: I was running checks as jobs inside sidekiq and this created problems with threads, which in turn created a lot of delays in my app (needed to restart sidekiq process). The repo purge solved it, but I moved my checks to another place than production not to run into this problem again as it's pretty scary.
What went wrong exactly? Any way to lock the versions or something to prevent this from happening ever again when there is no changes on our side?
@jchatel I'm also getting a lot of errors when using sidekiq Looks like it can't handle few chrome instances in parallel so every subsequent jobs will fails and will restart soon and so on, but finally sidekiq will freeze so I have to restart it manually. Everything is good in dev on the local computer, with no errors. I wonder what is going on with chrome on heroku.
I'm still getting the error and my tests do not run
[20:03:24] E/launcher - unknown error: Chrome failed to start: exited abnormally (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 4.4.0-116-generic x86_64) (WARNING: The server did not provide any stacktrace information)
my config is set as below
capabilities: { browserName: 'chrome', ignoreProtectedModeSettings: true//, chromeOptions: { args: [ "--headless","--disable-gpu","--window-size=800,600","--no-sandbox","--disable-dev-shm-usage" ] // to comment / uncomment for headless } driver = webdrive.Chrome('/usr/local/bin/chromedriver',chrome_options=chrome_options) }
Any idea to fix this would be very appreciated! Thanks
I fix this by use either --headless
or --window-size
.
Update capabilities in conf.js
exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', specs: ['todo-spec.js'], capabilities: { browserName: 'chrome', chromeOptions: { args: ['--disable-gpu', '--no-sandbox', '--disable-extensions', '--disable-dev-shm-usage'] } },
};
The issue still happens on my system: Ubuntu 16, Chrome version 74:
2019-03-14 11:54:34,867 ERROR [Log] Unexpected exception while setting browser driver: org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/chromedriver is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Linux 4.4.0-142-generic x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 57 milliseconds Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'ubuntudev', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-142-generic', java.version: '1.8.0_191' Driver info: driver.version: ChromeDriver
Please let me know if you find out the workaround.
I'm still getting the error and my tests do not run
[20:03:24] E/launcher - unknown error: Chrome failed to start: exited abnormally (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 4.4.0-116-generic x86_64) (WARNING: The server did not provide any stacktrace information)
my config is set as below
capabilities: { browserName: 'chrome', ignoreProtectedModeSettings: true//, chromeOptions: { args: [ "--headless","--disable-gpu","--window-size=800,600","--no-sandbox","--disable-dev-shm-usage" ] // to comment / uncomment for headless } driver = webdrive.Chrome('/usr/local/bin/chromedriver',chrome_options=chrome_options) }
Any idea to fix this would be very appreciated! Thanks
Have you found out the workaround to fix it?
@vanquy72dn the options the shim uses are --headless --no-sandbox --disable-gpu --remote-debugging-port=9222
. Can you try adding the port and disable-gpu? Or use the $GOOGLE_CHROME_SHIM
as the executable instead of the path to the chromedriver itself.
Thanks @jabrown85 . It works fine with your config. Thanks so much.
The original issue here appears to be solved, so closing this out. If anyone has any further problems please file a new issue with steps to reproduce :-)
Update capabilities in conf.js
exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', specs: ['todo-spec.js'], capabilities: { browserName: 'chrome', chromeOptions: { args: ['--disable-gpu', '--no-sandbox', '--disable-extensions', '--disable-dev-shm-usage'] } },
};
Thank you very much himanshigupta29 . It worked for me
i solved and chrome is opening with below conf.js, add 2nd line: directConnect: true :- to solve the problem.
exports.config = { directConnect: true, seleniumAddress: 'http://localhost:4444/wd/hub',
//framework: 'jasmine2',
specs: [ 'todo-spec.js' ],
// capabilities: { //'browserName': 'chrome' //}, };
@nicolasmlv by no cache I meant using the "Run again without cache" option from dashboard. You can also specify it via the cli:
heroku ci:run --no-cache
hello, console tell me : Error: Unexpected argument: --no-cache what should i do? thank you in advance forgive me for my bad english
Hi Heroku Over night my tests have started to fail (only on Heroku Pipeline) with the following error:
Selenium::WebDriver::Error::UnknownError: unknown error: Chrome failed to start: exited abnormally (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /app/.apt/usr/bin/google-chrome-stable is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 4.4.0-1027-aws x86_64)
Nothing has changed in our setup and it seems like the only buildpack that has changed is this.
You have updated the main file, but not updated the changelog, how do I roll back and use the old version?