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

ERROR webdriver: Request failed with status 500 due to unknown error: Chrome failed to start: exited abnormally #90

Closed
me-rsharma opened this issue Nov 15, 2023 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@me-rsharma
Copy link

me-rsharma commented Nov 15, 2023

Hello Team, we are getting another issue when we are trying to run test in { browserName: 'vscode', browserVersion: process.env.VSCODE_VERSION || 'stable' }

Logs:

npm run test:e2e:run

> wdio-vscode-service@5.2.1 test:e2e:run
> wdio run ./test/wdio.conf.ts


Execution of 1 workers started at 2023-11-15T07:00:21.476Z

2023-11-15T07:00:21.485Z DEBUG @wdio/utils:initialiseServices: initialise service "vscode" as NPM package
2023-11-15T07:00:22.337Z INFO chromedriver: Initiate Chromedriver Launcher (v8.1.1)
2023-11-15T07:00:22.337Z INFO @wdio/cli:launcher: Run onPrepare hook
2023-11-15T07:00:22.338Z INFO wdio-vscode-service/launcher: Fetch releases from https://update.code.visualstudio.com/api/releases/stable
2023-11-15T07:00:24.488Z INFO wdio-vscode-service/launcher: Download Chromedriver (v102.0.5005.61)
2023-11-15T07:00:26.332Z INFO wdio-vscode-service/launcher: Download VSCode binary (1.71.0)
Downloading VS Code 1.71.0 from https://update.code.visualstudio.com/1.71.0/darwin-arm64/stable
Downloading VS Code [==============================] 100%
Downloaded VS Code into /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/vscode-darwin-arm64-1.71.0

Downloaded VS Code into /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/vscode-darwin-arm64-1.71.0
2023-11-15T07:01:20.780Z INFO chromedriver: Start Chromedriver (/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/chromedriver-102.0.5005.61) with args --port=9515 --url-base=/
2023-11-15T07:01:21.406Z INFO chromedriver: Starting ChromeDriver 102.0.5005.61 (0e59bcc00cc4985ce39ad31c150065f159d95ad3-refs/branch-heads/5005@{#819}) on port 9515
2023-11-15T07:01:21.407Z INFO chromedriver: Only local connections are allowed.
2023-11-15T07:01:21.407Z INFO chromedriver: Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
2023-11-15T07:01:21.411Z INFO chromedriver: ChromeDriver was started successfully.
2023-11-15T07:01:21.501Z DEBUG @wdio/cli:utils: Finished to run "onPrepare" hook in 59164ms
2023-11-15T07:01:21.501Z INFO @wdio/utils: Setting up browser driver for: vscode@1.71.0
2023-11-15T07:01:21.502Z INFO @wdio/utils: Setting up browser binaries for: vscode@1.71.0
2023-11-15T07:01:21.512Z INFO @wdio/cli:launcher: Run onWorkerStart hook
2023-11-15T07:01:21.512Z DEBUG @wdio/cli:utils: Finished to run "onWorkerStart" hook in 0ms
2023-11-15T07:01:21.514Z INFO @wdio/local-runner: Start worker 0-0 with arg: run,./test/wdio.conf.ts
2023-11-15T07:01:21.516Z DEBUG @wdio/local-runner: Send command run to worker with cid "0-0"
[0-0] 2023-11-15T07:01:22.187Z INFO @wdio/local-runner: Run worker command: run
[0-0] 2023-11-15T07:01:22.240Z DEBUG @wdio/runner: init remote session
[0-0] 2023-11-15T07:01:22.242Z DEBUG @wdio/utils:initialiseServices: initialise service "vscode" as NPM package
[0-0] 2023-11-15T07:01:23.151Z INFO wdio-vscode-service: Start VSCode proxy server on port 63114
[0-0] 2023-11-15T07:01:23.152Z INFO wdio-vscode-service: Setting up VSCode directory at /var/folders/td/6114ll7x64q8z0y3spxdq7900000gn/T/tmp-17125-uLo6oVoOdZ1A/settings/User
[0-0] 2023-11-15T07:01:23.153Z INFO wdio-vscode-service: Start VSCode: /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js --no-sandbox --disable-updates --skip-welcome --skip-release-notes --disable-workspace-trust --disable-extensions --extension-development-path=/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/test/extension --extension-tests-path=/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/proxy/cjs/entry.js --user-data-dir=/var/folders/td/6114ll7x64q8z0y3spxdq7900000gn/T/tmp-17125-uLo6oVoOdZ1A/settings --extensions-dir=/var/folders/td/6114ll7x64q8z0y3spxdq7900000gn/T/tmp-17125-uLo6oVoOdZ1A/extensions --vscode-binary-path=/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/vscode-darwin-arm64-1.71.0/Visual Studio Code.app/Contents/MacOS/Electron --folder-uri=file:/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service --file-uri=file:/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/README.md
[0-0] 2023-11-15T07:01:23.153Z DEBUG @wdio/utils:shim: Finished to run "beforeSession" hook in 3ms
[0-0] RUNNING in chrome - file:///test/specs/basic.e2e.ts
[0-0] 2023-11-15T07:01:23.256Z DEBUG @wdio/runner: init remote session
[0-0] 2023-11-15T07:01:23.256Z INFO webdriver: Initiate new session using the WebDriver protocol
[0-0] 2023-11-15T07:01:23.257Z INFO @wdio/utils: Connecting to existing driver at http://localhost:9515/
[0-0] 2023-11-15T07:01:23.274Z INFO webdriver: [POST] http://localhost:9515/session
[0-0] 2023-11-15T07:01:23.274Z INFO webdriver: DATA {
[0-0]   capabilities: {
[0-0]     alwaysMatch: {
[0-0]       browserName: 'chrome',
[0-0]       browserVersion: '1.71.0',
[0-0]       'wdio:vscodeOptions': [Object],
[0-0]       'goog:chromeOptions': [Object]
[0-0]     },
[0-0]     firstMatch: [ {} ]
[0-0]   },
[0-0]   desiredCapabilities: {
[0-0]     browserName: 'chrome',
[0-0]     browserVersion: '1.71.0',
[0-0]     'wdio:vscodeOptions': {
[0-0]       extensionPath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/test/extension',
[0-0]       workspacePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service',
[0-0]       filePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/README.md',
[0-0]       userSettings: [Object],
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/vscode-darwin-arm64-1.71.0/Visual Studio Code.app/Contents/MacOS/Electron'
[0-0]     },
[0-0]     'goog:chromeOptions': {
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js',
[0-0]       args: [Array],
[0-0]       windowTypes: [Array]
[0-0]     }
[0-0]   }
[0-0] }
[0-0] 2023-11-15T07:01:23.393Z DEBUG webdriver: request failed due to response error: unknown error
[0-0] 2023-11-15T07:01:23.393Z WARN webdriver: Request failed with status 500 due to unknown error: Chrome failed to start: exited abnormally.
[0-0]   (unknown error: DevToolsActivePort file doesn't exist)
[0-0]   (The process started from chrome location /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[0-0] 2023-11-15T07:01:23.393Z INFO webdriver: Retrying 1/3
[0-0] 2023-11-15T07:01:23.393Z INFO webdriver: [POST] http://localhost:9515/session
[0-0] 2023-11-15T07:01:23.393Z INFO webdriver: DATA {
[0-0]   capabilities: {
[0-0]     alwaysMatch: {
[0-0]       browserName: 'chrome',
[0-0]       browserVersion: '1.71.0',
[0-0]       'wdio:vscodeOptions': [Object],
[0-0]       'goog:chromeOptions': [Object]
[0-0]     },
[0-0]     firstMatch: [ {} ]
[0-0]   },
[0-0]   desiredCapabilities: {
[0-0]     browserName: 'chrome',
[0-0]     browserVersion: '1.71.0',
[0-0]     'wdio:vscodeOptions': {
[0-0]       extensionPath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/test/extension',
[0-0]       workspacePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service',
[0-0]       filePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/README.md',
[0-0]       userSettings: [Object],
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/vscode-darwin-arm64-1.71.0/Visual Studio Code.app/Contents/MacOS/Electron'
[0-0]     },
[0-0]     'goog:chromeOptions': {
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js',
[0-0]       args: [Array],
[0-0]       windowTypes: [Array]
[0-0]     }
[0-0]   }
[0-0] }
[0-0] 2023-11-15T07:01:23.500Z DEBUG webdriver: request failed due to response error: unknown error
[0-0] 2023-11-15T07:01:23.500Z INFO webdriver: Retrying 2/3
[0-0] 2023-11-15T07:01:23.500Z INFO webdriver: [POST] http://localhost:9515/session
[0-0] 2023-11-15T07:01:23.500Z WARN webdriver: Request failed with status 500 due to unknown error: Chrome failed to start: exited abnormally.
[0-0]   (unknown error: DevToolsActivePort file doesn't exist)
[0-0]   (The process started from chrome location /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[0-0] 2023-11-15T07:01:23.500Z INFO webdriver: DATA {
[0-0]   capabilities: {
[0-0]     alwaysMatch: {
[0-0]       browserName: 'chrome',
[0-0]       browserVersion: '1.71.0',
[0-0]       'wdio:vscodeOptions': [Object],
[0-0]       'goog:chromeOptions': [Object]
[0-0]     },
[0-0]     firstMatch: [ {} ]
[0-0]   },
[0-0]   desiredCapabilities: {
[0-0]     browserName: 'chrome',
[0-0]     browserVersion: '1.71.0',
[0-0]     'wdio:vscodeOptions': {
[0-0]       extensionPath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/test/extension',
[0-0]       workspacePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service',
[0-0]       filePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/README.md',
[0-0]       userSettings: [Object],
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/vscode-darwin-arm64-1.71.0/Visual Studio Code.app/Contents/MacOS/Electron'
[0-0]     },
[0-0]     'goog:chromeOptions': {
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js',
[0-0]       args: [Array],
[0-0]       windowTypes: [Array]
[0-0]     }
[0-0]   }
[0-0] }
[0-0] 2023-11-15T07:01:23.607Z DEBUG webdriver: request failed due to response error: unknown error
[0-0] 2023-11-15T07:01:23.607Z INFO webdriver: Retrying 3/3
[0-0] 2023-11-15T07:01:23.607Z INFO webdriver: [POST] http://localhost:9515/session
[0-0] 2023-11-15T07:01:23.607Z WARN webdriver: Request failed with status 500 due to unknown error: Chrome failed to start: exited abnormally.
[0-0]   (unknown error: DevToolsActivePort file doesn't exist)
[0-0]   (The process started from chrome location /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[0-0] 2023-11-15T07:01:23.607Z INFO webdriver: DATA {
[0-0]   capabilities: {
[0-0]     alwaysMatch: {
[0-0]       browserName: 'chrome',
[0-0]       browserVersion: '1.71.0',
[0-0]       'wdio:vscodeOptions': [Object],
[0-0]       'goog:chromeOptions': [Object]
[0-0]     },
[0-0]     firstMatch: [ {} ]
[0-0]   },
[0-0]   desiredCapabilities: {
[0-0]     browserName: 'chrome',
[0-0]     browserVersion: '1.71.0',
[0-0]     'wdio:vscodeOptions': {
[0-0]       extensionPath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/test/extension',
[0-0]       workspacePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service',
[0-0]       filePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/README.md',
[0-0]       userSettings: [Object],
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/vscode-darwin-arm64-1.71.0/Visual Studio Code.app/Contents/MacOS/Electron'
[0-0]     },
[0-0]     'goog:chromeOptions': {
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js',
[0-0]       args: [Array],
[0-0]       windowTypes: [Array]
[0-0]     }
[0-0]   }
[0-0] }
[0-0] 2023-11-15T07:01:23.714Z DEBUG webdriver: request failed due to response error: unknown error
[0-0] 2023-11-15T07:01:23.714Z ERROR webdriver: Request failed with status 500 due to unknown error: unknown error: Chrome failed to start: exited abnormally.
[0-0]   (unknown error: DevToolsActivePort file doesn't exist)
[0-0]   (The process started from chrome location /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[0-0] 2023-11-15T07:01:23.714Z ERROR webdriver: unknown error: unknown error: Chrome failed to start: exited abnormally.
[0-0]   (unknown error: DevToolsActivePort file doesn't exist)
[0-0]   (The process started from chrome location /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[0-0]     at getErrorFromResponseBody (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriver/build/utils.js:194:12)
[0-0]     at NodeJSRequest._request (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriver/build/request/index.js:164:23)
[0-0]     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[0-0]     at async startWebDriverSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriver/build/utils.js:63:20)
[0-0]     at async Function.newSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriver/build/index.js:27:45)
[0-0]     at async remote (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriverio/build/index.js:45:22)
[0-0]     at async Runner._startSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/@wdio/runner/build/index.js:224:29)
[0-0]     at async Runner._initSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/@wdio/runner/build/index.js:190:25)
[0-0]     at async Runner.run (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/@wdio/runner/build/index.js:79:19)
[0-0] 2023-11-15T07:01:23.715Z ERROR @wdio/runner: Error: Failed to create session.
[0-0] unknown error: Chrome failed to start: exited abnormally.
[0-0]   (unknown error: DevToolsActivePort file doesn't exist)
[0-0]   (The process started from chrome location /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[0-0]     at startWebDriverSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriver/build/utils.js:68:15)
[0-0]     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[0-0]     at async Function.newSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriver/build/index.js:27:45)
[0-0]     at async remote (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriverio/build/index.js:45:22)
[0-0]     at async Runner._startSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/@wdio/runner/build/index.js:224:29)
[0-0]     at async Runner._initSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/@wdio/runner/build/index.js:190:25)
[0-0]     at async Runner.run (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/@wdio/runner/build/index.js:79:19)
[0-0] 2023-11-15T07:01:23.715Z DEBUG @wdio/utils:shim: Finished to run "after" hook in 0ms
2023-11-15T07:01:23.836Z DEBUG @wdio/local-runner: Runner 0-0 finished with exit code 1
[0-0] FAILED in chrome - file:///test/specs/basic.e2e.ts
2023-11-15T07:01:23.836Z INFO @wdio/cli:launcher: Run onWorkerEnd hook
2023-11-15T07:01:23.837Z DEBUG @wdio/cli:utils: Finished to run "onWorkerEnd" hook in 0ms
2023-11-15T07:01:23.837Z INFO @wdio/cli:launcher: Run onComplete hook
2023-11-15T07:01:23.837Z DEBUG @wdio/cli:utils: Finished to run "onComplete" hook in 0ms

Spec Files:	 0 passed, 1 failed, 1 total (100% completed) in 00:01:02

2023-11-15T07:01:23.838Z INFO @wdio/local-runner: Shutting down spawned worker
2023-11-15T07:01:24.090Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2023-11-15T07:01:24.090Z INFO @wdio/local-runner: shutting down
npm run test:e2e:run

> wdio-vscode-service@5.2.1 test:e2e:run
> wdio run ./test/wdio.conf.ts


Execution of 1 workers started at 2023-11-15T07:02:44.223Z

2023-11-15T07:02:44.231Z DEBUG @wdio/utils:initialiseServices: initialise service "vscode" as NPM package
2023-11-15T07:02:45.096Z INFO chromedriver: Initiate Chromedriver Launcher (v8.1.1)
2023-11-15T07:02:45.096Z INFO @wdio/cli:launcher: Run onPrepare hook
2023-11-15T07:02:45.097Z INFO wdio-vscode-service/launcher: Fetch releases from https://update.code.visualstudio.com/api/releases/stable
2023-11-15T07:02:46.823Z INFO wdio-vscode-service/launcher: Download Chromedriver (v108.0.5359.71)
2023-11-15T07:02:48.402Z INFO wdio-vscode-service/launcher: Download VSCode binary (1.81.0)
Downloading VS Code 1.81.0 from https://update.code.visualstudio.com/1.81.0/darwin-arm64/stable
Downloading VS Code [==============================] 100%
Downloaded VS Code into /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/vscode-darwin-arm64-1.81.0

Downloaded VS Code into /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/vscode-darwin-arm64-1.81.0
2023-11-15T07:04:01.530Z INFO chromedriver: Start Chromedriver (/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/chromedriver-108.0.5359.71) with args --port=9515 --url-base=/
2023-11-15T07:04:01.972Z INFO chromedriver: Starting ChromeDriver 108.0.5359.71 (1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359@{#1016}) on port 9515
2023-11-15T07:04:01.972Z INFO chromedriver: Only local connections are allowed.
2023-11-15T07:04:01.972Z INFO chromedriver: Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
2023-11-15T07:04:01.977Z INFO chromedriver: ChromeDriver was started successfully.
2023-11-15T07:04:02.044Z DEBUG @wdio/cli:utils: Finished to run "onPrepare" hook in 76948ms
2023-11-15T07:04:02.045Z INFO @wdio/utils: Setting up browser driver for: vscode@1.81.0
2023-11-15T07:04:02.046Z INFO @wdio/utils: Setting up browser binaries for: vscode@1.81.0
2023-11-15T07:04:02.057Z INFO @wdio/cli:launcher: Run onWorkerStart hook
2023-11-15T07:04:02.057Z DEBUG @wdio/cli:utils: Finished to run "onWorkerStart" hook in 0ms
2023-11-15T07:04:02.058Z INFO @wdio/local-runner: Start worker 0-0 with arg: run,./test/wdio.conf.ts
2023-11-15T07:04:02.062Z DEBUG @wdio/local-runner: Send command run to worker with cid "0-0"
[0-0] 2023-11-15T07:04:02.723Z INFO @wdio/local-runner: Run worker command: run
[0-0] 2023-11-15T07:04:02.777Z DEBUG @wdio/runner: init remote session
[0-0] 2023-11-15T07:04:02.779Z DEBUG @wdio/utils:initialiseServices: initialise service "vscode" as NPM package
[0-0] 2023-11-15T07:04:03.664Z INFO wdio-vscode-service: Start VSCode proxy server on port 63135
[0-0] 2023-11-15T07:04:03.665Z INFO wdio-vscode-service: Setting up VSCode directory at /var/folders/td/6114ll7x64q8z0y3spxdq7900000gn/T/tmp-17299-s7j60XI2Qiho/settings/User
[0-0] 2023-11-15T07:04:03.666Z INFO wdio-vscode-service: Start VSCode: /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js --no-sandbox --disable-updates --skip-welcome --skip-release-notes --disable-workspace-trust --disable-extensions --extension-development-path=/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/test/extension --extension-tests-path=/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/proxy/cjs/entry.js --user-data-dir=/var/folders/td/6114ll7x64q8z0y3spxdq7900000gn/T/tmp-17299-s7j60XI2Qiho/settings --extensions-dir=/var/folders/td/6114ll7x64q8z0y3spxdq7900000gn/T/tmp-17299-s7j60XI2Qiho/extensions --vscode-binary-path=/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/vscode-darwin-arm64-1.81.0/Visual Studio Code.app/Contents/MacOS/Electron --folder-uri=file:/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service --file-uri=file:/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/README.md
[0-0] 2023-11-15T07:04:03.666Z DEBUG @wdio/utils:shim: Finished to run "beforeSession" hook in 4ms
[0-0] RUNNING in chrome - file:///test/specs/basic.e2e.ts
[0-0] 2023-11-15T07:04:03.768Z DEBUG @wdio/runner: init remote session
[0-0] 2023-11-15T07:04:03.769Z INFO webdriver: Initiate new session using the WebDriver protocol
[0-0] 2023-11-15T07:04:03.769Z INFO @wdio/utils: Connecting to existing driver at http://localhost:9515/
[0-0] 2023-11-15T07:04:03.786Z INFO webdriver: [POST] http://localhost:9515/session
[0-0] 2023-11-15T07:04:03.786Z INFO webdriver: DATA {
[0-0]   capabilities: {
[0-0]     alwaysMatch: {
[0-0]       browserName: 'chrome',
[0-0]       browserVersion: '1.81.0',
[0-0]       'wdio:vscodeOptions': [Object],
[0-0]       'goog:chromeOptions': [Object]
[0-0]     },
[0-0]     firstMatch: [ {} ]
[0-0]   },
[0-0]   desiredCapabilities: {
[0-0]     browserName: 'chrome',
[0-0]     browserVersion: '1.81.0',
[0-0]     'wdio:vscodeOptions': {
[0-0]       extensionPath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/test/extension',
[0-0]       workspacePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service',
[0-0]       filePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/README.md',
[0-0]       userSettings: [Object],
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/vscode-darwin-arm64-1.81.0/Visual Studio Code.app/Contents/MacOS/Electron'
[0-0]     },
[0-0]     'goog:chromeOptions': {
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js',
[0-0]       args: [Array],
[0-0]       windowTypes: [Array]
[0-0]     }
[0-0]   }
[0-0] }
[0-0] 2023-11-15T07:04:03.905Z DEBUG webdriver: request failed due to response error: unknown error
[0-0] 2023-11-15T07:04:03.905Z WARN webdriver: Request failed with status 500 due to unknown error: Chrome failed to start: exited abnormally.
[0-0]   (unknown error: DevToolsActivePort file doesn't exist)
[0-0]   (The process started from chrome location /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[0-0] 2023-11-15T07:04:03.905Z INFO webdriver: Retrying 1/3
[0-0] 2023-11-15T07:04:03.906Z INFO webdriver: [POST] http://localhost:9515/session
[0-0] 2023-11-15T07:04:03.906Z INFO webdriver: DATA {
[0-0]   capabilities: {
[0-0]     alwaysMatch: {
[0-0]       browserName: 'chrome',
[0-0]       browserVersion: '1.81.0',
[0-0]       'wdio:vscodeOptions': [Object],
[0-0]       'goog:chromeOptions': [Object]
[0-0]     },
[0-0]     firstMatch: [ {} ]
[0-0]   },
[0-0]   desiredCapabilities: {
[0-0]     browserName: 'chrome',
[0-0]     browserVersion: '1.81.0',
[0-0]     'wdio:vscodeOptions': {
[0-0]       extensionPath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/test/extension',
[0-0]       workspacePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service',
[0-0]       filePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/README.md',
[0-0]       userSettings: [Object],
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/vscode-darwin-arm64-1.81.0/Visual Studio Code.app/Contents/MacOS/Electron'
[0-0]     },
[0-0]     'goog:chromeOptions': {
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js',
[0-0]       args: [Array],
[0-0]       windowTypes: [Array]
[0-0]     }
[0-0]   }
[0-0] }
[0-0] 2023-11-15T07:04:04.013Z DEBUG webdriver: request failed due to response error: unknown error
[0-0] 2023-11-15T07:04:04.013Z INFO webdriver: Retrying 2/3
[0-0] 2023-11-15T07:04:04.013Z INFO webdriver: [POST] http://localhost:9515/session
[0-0] 2023-11-15T07:04:04.013Z WARN webdriver: Request failed with status 500 due to unknown error: Chrome failed to start: exited abnormally.
[0-0]   (unknown error: DevToolsActivePort file doesn't exist)
[0-0]   (The process started from chrome location /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[0-0] 2023-11-15T07:04:04.013Z INFO webdriver: DATA {
[0-0]   capabilities: {
[0-0]     alwaysMatch: {
[0-0]       browserName: 'chrome',
[0-0]       browserVersion: '1.81.0',
[0-0]       'wdio:vscodeOptions': [Object],
[0-0]       'goog:chromeOptions': [Object]
[0-0]     },
[0-0]     firstMatch: [ {} ]
[0-0]   },
[0-0]   desiredCapabilities: {
[0-0]     browserName: 'chrome',
[0-0]     browserVersion: '1.81.0',
[0-0]     'wdio:vscodeOptions': {
[0-0]       extensionPath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/test/extension',
[0-0]       workspacePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service',
[0-0]       filePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/README.md',
[0-0]       userSettings: [Object],
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/vscode-darwin-arm64-1.81.0/Visual Studio Code.app/Contents/MacOS/Electron'
[0-0]     },
[0-0]     'goog:chromeOptions': {
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js',
[0-0]       args: [Array],
[0-0]       windowTypes: [Array]
[0-0]     }
[0-0]   }
[0-0] }
[0-0] 2023-11-15T07:04:04.120Z DEBUG webdriver: request failed due to response error: unknown error
[0-0] 2023-11-15T07:04:04.120Z INFO webdriver: Retrying 3/3
[0-0] 2023-11-15T07:04:04.120Z INFO webdriver: [POST] http://localhost:9515/session
[0-0] 2023-11-15T07:04:04.120Z WARN webdriver: Request failed with status 500 due to unknown error: Chrome failed to start: exited abnormally.
[0-0]   (unknown error: DevToolsActivePort file doesn't exist)
[0-0]   (The process started from chrome location /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[0-0] 2023-11-15T07:04:04.120Z INFO webdriver: DATA {
[0-0]   capabilities: {
[0-0]     alwaysMatch: {
[0-0]       browserName: 'chrome',
[0-0]       browserVersion: '1.81.0',
[0-0]       'wdio:vscodeOptions': [Object],
[0-0]       'goog:chromeOptions': [Object]
[0-0]     },
[0-0]     firstMatch: [ {} ]
[0-0]   },
[0-0]   desiredCapabilities: {
[0-0]     browserName: 'chrome',
[0-0]     browserVersion: '1.81.0',
[0-0]     'wdio:vscodeOptions': {
[0-0]       extensionPath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/test/extension',
[0-0]       workspacePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service',
[0-0]       filePath: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/README.md',
[0-0]       userSettings: [Object],
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/.wdio-vscode-service/vscode-darwin-arm64-1.81.0/Visual Studio Code.app/Contents/MacOS/Electron'
[0-0]     },
[0-0]     'goog:chromeOptions': {
[0-0]       binary: '/Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js',
[0-0]       args: [Array],
[0-0]       windowTypes: [Array]
[0-0]     }
[0-0]   }
[0-0] }
[0-0] 2023-11-15T07:04:04.226Z DEBUG webdriver: request failed due to response error: unknown error
[0-0] 2023-11-15T07:04:04.227Z ERROR webdriver: Request failed with status 500 due to unknown error: unknown error: Chrome failed to start: exited abnormally.
[0-0]   (unknown error: DevToolsActivePort file doesn't exist)
[0-0]   (The process started from chrome location /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[0-0] 2023-11-15T07:04:04.227Z ERROR webdriver: unknown error: unknown error: Chrome failed to start: exited abnormally.
[0-0]   (unknown error: DevToolsActivePort file doesn't exist)
[0-0]   (The process started from chrome location /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[0-0]     at getErrorFromResponseBody (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriver/build/utils.js:194:12)
[0-0]     at NodeJSRequest._request (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriver/build/request/index.js:164:23)
[0-0]     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[0-0]     at async startWebDriverSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriver/build/utils.js:63:20)
[0-0]     at async Function.newSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriver/build/index.js:27:45)
[0-0]     at async remote (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriverio/build/index.js:45:22)
[0-0]     at async Runner._startSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/@wdio/runner/build/index.js:224:29)
[0-0]     at async Runner._initSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/@wdio/runner/build/index.js:190:25)
[0-0]     at async Runner.run (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/@wdio/runner/build/index.js:79:19)
[0-0] 2023-11-15T07:04:04.227Z ERROR @wdio/runner: Error: Failed to create session.
[0-0] unknown error: Chrome failed to start: exited abnormally.
[0-0]   (unknown error: DevToolsActivePort file doesn't exist)
[0-0]   (The process started from chrome location /Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/dist/chromium/index.js is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
[0-0]     at startWebDriverSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriver/build/utils.js:68:15)
[0-0]     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[0-0]     at async Function.newSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriver/build/index.js:27:45)
[0-0]     at async remote (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/webdriverio/build/index.js:45:22)
[0-0]     at async Runner._startSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/@wdio/runner/build/index.js:224:29)
[0-0]     at async Runner._initSession (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/@wdio/runner/build/index.js:190:25)
[0-0]     at async Runner.run (file:///Users/gaurnitai/Desktop/Programming/OpenSource/wdio-vscode-service/node_modules/@wdio/runner/build/index.js:79:19)
[0-0] 2023-11-15T07:04:04.228Z DEBUG @wdio/utils:shim: Finished to run "after" hook in 0ms
2023-11-15T07:04:04.343Z DEBUG @wdio/local-runner: Runner 0-0 finished with exit code 1
[0-0] FAILED in chrome - file:///test/specs/basic.e2e.ts
2023-11-15T07:04:04.343Z INFO @wdio/cli:launcher: Run onWorkerEnd hook
2023-11-15T07:04:04.344Z DEBUG @wdio/cli:utils: Finished to run "onWorkerEnd" hook in 0ms
2023-11-15T07:04:04.344Z INFO @wdio/cli:launcher: Run onComplete hook
2023-11-15T07:04:04.344Z DEBUG @wdio/cli:utils: Finished to run "onComplete" hook in 0ms

Spec Files:	 0 passed, 1 failed, 1 total (100% completed) in 00:01:20

The same test cases is running fine when I am using

{
            browserName: 'chrome',
            'goog:chromeOptions': {
                args: ['--headless', '--disable-gpu', '--window-size=1440,735']
            }
        }

Steps to reproduce:

  1. Clone the repository https://github.com/webdriverio-community/wdio-vscode-service.git
  2. Install the packages by running npm install
  3. Run the test npm run test:e2e

I have tried different version of vscode latest, 1.81.0, 1.80.0, 1.71.0 and getting the same error on all these versions

@me-rsharma me-rsharma changed the title ERROR webdriver: Request failed with status 500 due to unknown error: unknown error: Chrome failed to start: exited abnormally ERROR webdriver: Request failed with status 500 due to unknown error: Chrome failed to start: exited abnormally Nov 15, 2023
@christian-bromann
Copy link
Contributor

We are seeing the same issues with our insiders tests in CI. Not really sure what is causing them because all stable tests are running. Any tips or contributions are welcome!

@christian-bromann christian-bromann added the help wanted Extra attention is needed label Nov 28, 2023
@seanpoulter
Copy link
Contributor

Are either of you still having this problem? Have you managed to work around it?

The root cause of the problem is the binary path returned by @vscode/test-electron does not exist. Here's an example from the original logs:

    'wdio:vscodeOptions': {
      binary: '.../.wdio-vscode-service/vscode-darwin-arm64-1.81.0/Visual Studio Code.app/Contents/MacOS/Electron'

If you inspect the cache you'll find that the Visual Studio Code.app directory was not created. Instead, the path on disk is:

- .../.wdio-vscode-service/vscode-darwin-arm64-1.81.0/Visual Studio Code.app/Contents/MacOS/Electron
+ .../.wdio-vscode-service/vscode-darwin-arm64-1.81.0/Contents/MacOS/Electron

The code responsible is managed by @vscode/test-electron. The issue appears to have been fixed in v2.3.8 by microsoft/vscode-test#246. If you are unable to update the dependencies, work around the issue by setting the binary path yourself.

@seanpoulter
Copy link
Contributor

It looks like this was the same as #78 (Open Issue) and #98 (Closed PR). Thanks for fix this in 5.2.3 @christian-bromann. 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants