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

DevToolsActivePort file doesn't exist - Mac OS #160

Open
cassiourugit opened this issue Jun 14, 2021 · 9 comments
Open

DevToolsActivePort file doesn't exist - Mac OS #160

cassiourugit opened this issue Jun 14, 2021 · 9 comments

Comments

@cassiourugit
Copy link

Hi, i have a storybook project, installed creevey
started storybook
and, when I run creevey, (yarn creevey --ui)

It shows this:
[CreeveyMaster]: Pull docker images
✔ aerokube/selenoid:latest-release: Pull complete
[CreeveyMaster]: Pull docker images
✔ selenoid/chrome:latest: Pull complete
[CreeveyMaster]: Starting with pid 1029
[CreeveyWorker]: Starting chrome:1030
[FAIL:1030] WebDriverError: unknown error: Chrome failed to start: crashed.
(unknown error: DevToolsActivePort file doesn't exist)

Anyone knows how to solve this? I've looked all over the place, but found no working answer.

I'm running this over a Mac mini with Big Sur 11.4 and M1 Chip

@wKich
Copy link
Collaborator

wKich commented Jun 15, 2021

Hi, thank you for the report. It seems you faced this issue aerokube/selenoid#1109. Creevey uses selenoid under the hood.

You can try to install Rosetta with softwareupdate --install-rosetta and then set the environment variable before starting Creevey export DOCKER_DEFAULT_PLATFORM=linux/amd64. It should enable x86 emulation in docker.

Unfortunately, I don't have M1 Mac to reproduce or make sure if it works.

@cassiourugit
Copy link
Author

Hi, thanks for the quick reply!

I did those steps, but still facing the issue.

I found this 3 options inside creevey

1-
useDocker: boolean;

2-
Custom selenoid docker image -- @default 'aerokube/selenoid:latest-release' -- dockerImage: string;

3-
Should Creevey pull docker images or use local ones -- @default true -- pullImages: boolean;

Is it possible to use any of those options so that I can use containers that I have already installed instead of the default ones?
Or maybe don't use docker at all, using a local cromedriver?

Ps, sorry about my English, is not my native language.

@wKich
Copy link
Collaborator

wKich commented Jun 15, 2021

  1. It could be used as a solution, to run selenoid without docker or without selenoid at all, directly use chromedriver. But screenshots will be dependent on your system, so if tests are run on CI or by someone else, they will fail.
  2. Yep, you can try using custom selenoid images, as described in selenoid issue. But I think the issue is in a browser image, so you might want to define your custom browser image, like this.
// creevey.config.js
module.exports = {
  browsers: {
    chrome: {
      dockerImage: 'name-of-your-chromedriver-image'
    }
  }
}

Or it could be another way. Instead of using selenoid docker image, use chromedriver image directly. But I haven't thought about this way before, so you can't have more than one parallel session. I recommend it as a fallback if defining a custom browser image wouldn't help.

  1. It's used to skip pulling images from docker registry every time. It helps if you want to use images aren't exist in registry.

PS. Don't worry. I'm not a native speaker too :)

@yozi-developer
Copy link

According to the issue, it does not work yet
SeleniumHQ/selenium#9733

@daks01
Copy link

daks01 commented Sep 17, 2021

I reproduced a similar error on gitlab ci + docker + selenoid

[Creevey:119] ERROR => WebDriverError: unknown error: Chrome failed to start: crashed.
  (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.)
    at Object.throwDecodedError (/builds/websites/site-shot/node_modules/selenium-webdriver/lib/error.js:517:15)
    at parseHttpResponse (/builds/websites/site-shot/node_modules/selenium-webdriver/lib/http.js:642:13)
    at Executor.execute (/builds/websites/site-shot/node_modules/selenium-webdriver/lib/http.js:568:28)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

I will write more details later

@fifle
Copy link

fifle commented Dec 14, 2021

Hey everyone! Are there any update on those issues?
The problem still persists in combination of Macbook on M1 chip + Docker + Selenium under Codeception.

@TheMontanyes
Copy link

@wKich, Hello!
The problem is still relevant, is there any news on the solution?
I tried all the options, also emulated via arch x64

@ameerajayakumar
Copy link

any solution to this issue? Really affecting running selenium + docker in my M1 chip laptop.

@okletzmayr
Copy link

okletzmayr commented Apr 3, 2022

Looks like ARM images for selenium have been released ~1 month ago:
SeleniumHQ/docker-selenium#1076 (comment)

I managed to get to the Screenshot stage on 0.8.0-beta.0 with M1 with this .creevey/config.js:

module.exports = {
  browsers: {
    chrome: {
      browserName: 'chrome',
      dockerImage: 'seleniarm/standalone-chromium:4.1.3-20220331'
    }
  }
}

The workers look like they work if they can screenshot stuff, but I think aerokube/selenoid is causing problems since this image is still amd64. I haven't looked too deeply into this, but wanted to share anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants