On my Mac, I built image with FROM selenium/standalone-chrome-debug:3.4.0-chromium in Dockerfile.
When I run my app in the container, I got:
org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 4.19.76-linuxkit x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.13 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'a45e0250acbf', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.76-linuxkit', java.version: '1.8.0_121'
Driver info: driver.version: ChromeDriver
Image built in Jenkins with same Dockerfile run same application, it has no issue. Both chromedriver=2.29.461571.
I have setup remote debug and want to debug on my macos before I push to Jenkins/linux, but blocked by this chrome failed to start: exited abnormally in container on macos.
Why this happens on my macos but not in Jenkins/Linux and how to fix it?
This error message...
org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 4.19.76-linuxkit x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.13 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'a45e0250acbf', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.76-linuxkit', java.version: '1.8.0_121'
Driver info: driver.version: ChromeDriver
...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
You are using chromedriver=2.29
Release Notes of chromedriver=2.29 clearly mentions the following :
Supports Chrome v56-58
Presumably you are using the latest chrome=85.0
Release Notes of ChromeDriver v85.0 clearly mentions the following :
Supports Chrome version 85
So there is a clear mismatch between ChromeDriver v2.40 and the Chrome Browser v85.0
Solution
Ensure that:
JDK is upgraded to current levels JDK 8u252.
Selenium is upgraded to current released Version 3.141.59.
ChromeDriver is updated to current ChromeDriver v85.0 level.
Chrome is updated to current Chrome Version 85.0 level. (as per ChromeDriver v85.0 release notes)
If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
Take a System Reboot.
Execute your #Test as non-root user.
Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.
Related
I was using VirtualBox for development when i had a windows pc. Later i bought a Macbook M1 and installed the DDEV instead of VirtualBox.
In my old development virtualbox, i installed selenium and chromedriver in Virtualbox. With this setup i could run Codeception Tests.
Since i'm using DDEV for development, i tired to install Selenium-chromedriver with following tutorials:
https://dev.to/tomasnorre/codeception-ddev-selenium-docker-36kk
https://docs.typo3.org/m/typo3/reference-coreapi/9.5/en-us/Testing/ProjectTesting.html
My docker-compose.selenium.yaml File
version: '3.6'
services:
selenium:
container_name: ddev-${DDEV_SITENAME}-chrome
image: selenium/standalone-chrome:latest
environment:
- VIRTUAL_HOST=$DDEV_HOSTNAME
- HTTP_EXPOSE=4444
external_links:
- ddev-router:$DDEV_HOSTNAME
codeception.yaml File
# suite config
suites:
acceptance:
actor: AcceptanceTester
path: .
modules:
enabled:
- WebDriver:
url: http://test.ddev.site
host: ddev-test-chrome
browser: chrome
- \Helper\Acceptance
I get following Error when i try to execute a Test in ddev ssh with php vendor/bin/codecept run tests/FirstCest.php
[Facebook\WebDriver\Exception\SessionNotCreatedException] Could not start a new session. Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: unknown error: Chrome failed to start: crashed.
(chrome not reachable)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '4.1.1', revision: 'e8fcc2cecf'
System info: host: '4916a3762177', ip: '172.18.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.76-linuxkit', java.version: '11.0.13'
Driver info: driver.version: unknown
Build info: version: '4.1.1', revision: 'e8fcc2cecf'
System info: host: '4916a3762177', ip: '172.18.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.76-linuxkit', java.version: '11.0.13'
Driver info: driver.version: unknown
Is it possible, that the errors are related to M1-Chip or am i doing something wrong?
The selenium/standalone-chrome image is not built for arm64 (Mac M1). In fact, the chrome package it probably derives from is not available at all for arm64.
However, the chromium package is available for arm64. You may be able to use justinribeiro/chrome-headless:chromium, which is built for arm64.
Also, take a look at https://github.com/drud/ddev-contrib/tree/master/docker-compose-services/headless-chrome, which has been updated to use the arm64 chromium image.
This error message...
Build info: version: '4.1.1', revision: 'e8fcc2cecf'
System info: host: '4916a3762177', ip: '172.18.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.76-linuxkit', java.version: '11.0.13'
Driver info: driver.version: unknown
...implies that the ChromeDriver version wasn't detected.
Presumably the main issue is the incompatibility between the version of the binaries you are using.
Solution
Ensure that:
ChromeDriver is updated to current ChromeDriver v96.0 level.
Chrome is updated to current chrome=96.0.4664.45 (as per chrome=96.0.4664.45 release notes).
while trying to run slenium tests from docker which we use in most projects i get this error saying chrome has crashed i 've both google chrome and chrome driver installed and working fine any help with this ?
(node:231) UnhandledPromiseRejectionWarning: WebDriverError: unknown error: Chrome failed to start: crashed.
(chrome not reachable)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '1a84fd607b36', ip: '172.27.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.47-linuxkit', java.version: '1.8.0_292'
Driver info: driver.version: unknown
remote stacktrace: #0 0x00400068e949 <unknown>
This error message...
(node:231) UnhandledPromiseRejectionWarning: WebDriverError: unknown error: Chrome failed to start: crashed.
(chrome not reachable)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '1a84fd607b36', ip: '172.27.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.47-linuxkit', java.version: '1.8.0_292'
Driver info: driver.version: unknown
remote stacktrace: #0 0x00400068e949 <unknown>
...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as java.version: '1.8.0_292' and the error being:
Driver info: driver.version: unknown
remote stacktrace: #0 0x00400068e949 <unknown>
Solution
Ensure that:
JDK is upgraded to current levels JDK 8u311.
Selenium is upgraded to current levels Version 3.141.59.
ChromeDriver is updated to current ChromeDriver v95.0 level.
Chrome is updated to current Chrome Version 95.0 level. (as per ChromeDriver v95.0 release notes).
While launch appium server manually this issue doesnt occur.
Error log
org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Could not find 'adb' in PATH. Please set the ANDROID_HOME or ANDROID_SDK_ROOT environment variables to the corect Android SDK root directory path.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'INSML-0VLLVCF', ip: 'fe80:0:0:0:c3f:fa48:d75f:bc45%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_251'
Driver info: driver.version: AndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not find 'adb' in PATH. Please set the ANDROID_HOME or ANDROID_SDK_ROOT environment variables to the corect Android SDK root directory path.
at getResponseForW3CError (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:388:37)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'INSML-0VLLVCF', ip: 'fe80:0:0:0:c3f:fa48:d75f:bc45%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_251'
Driver info: driver.version: AndroidDriver
Run which aapt in terminal and check the output. Most likely it is empty.
If you didn't install adb, you can follow these steps
If you install it, then probably you didn't set path properly: run cat ~/.bash_profile and make sure to set path to ANDROID_HOME, assuming you did default path installation
export ANDROID_HOME=/Users/<your_username>/Library/Android/sdk
export PATH=$ANDROID_HOME:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools/bin:$PATH
export PATH=$ANDROID_HOME/build-tools/<sdk_version>:$PATH
You can check official Appium docs about environment issues troubleshoot
Hi i'm running a test using galen framework on my local machine and it runs successfully but when it runs on jenkins I get the following error:
> galen test ./test/test-e2e/ui_galen/tests/HomePage.test.js --htmlreport reports -Dwebdriver.chrome.driver=./test/test-e2e/bin/drivers/linux/chromedriver
========================================
Test: valida la home page de identity validation on desktop emulation en 1024 device
========================================
Jan 23, 2018 11:16:35 AM org.openqa.selenium.remote.DesiredCapabilities chrome
INFO: Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
Starting ChromeDriver 2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881) on port 32254
Only local connections are allowed.
org.mozilla.javascript.WrappedException: Wrapped org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881),platform=Linux 4.4.0-1022-aws x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.06 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: '82965b46ff8c', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-1022-aws', java.version: '1.8.0_151'
Driver info: driver.version: ChromeDriver (<cmd>#37)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.mozilla.javascript.gen._cmd__18._c_createDriver_2(<cmd>:37)
at org.mozilla.javascript.gen._cmd__18.call(<cmd>)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
at org.mozilla.javascript.gen._app___test_test_e2e_ui_galen_tests_______ui_galen_config_devices_js_25._c_anonymous_16(/app/./test/test-e2e/ui_galen/tests/../../ui_galen/config/devices.js:116)
at org.mozilla.javascript.gen._app___test_test_e2e_ui_galen_tests_______ui_galen_config_devices_js_25.call(/app/./test/test-e2e/ui_galen/tests/../../ui_galen/config/devices.js)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
at org.mozilla.javascript.gen._app___test_test_e2e_ui_galen_tests_______ui_galen_config_galen_config_js_23._c_openDriverForDevice_6(/app/./test/test-e2e/ui_galen/tests/../../ui_galen/config/galen_config.js:58)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
I have installed Xvfb on jenkins. Is there an extra configuration for Galen to run on jenkins?
Here is the Xvfb config I have:
echo $'\nInitializing X virtual framebuffer (Jenkins only) ...'
export DISPLAY=:0
Xvfb :0 -screen 0 1024x768x8 &> /dev/null &
After that is that I run the npm run e2e-galen:ci command.
did yo started Xvfb before running the Galen commands?
e.g.
Xvfb :99 &
export DISPLAY=:99
As per the instruction with http://ios-driver.github.io/ios-driver/?page=setup , i am trying to set up ios driver my application first testing using this automation.
I have installed java 7 and downloaded the app in given link. Installed OSX 10.9. While executing the command $ java -jar ios-server-0.6.6-SNAPSHOT-standalone.jar -aut path/to/aut.app -port 4444 i am getting below error
45:08:315 INFO ApplicationStore.<init> App archive folder:/Users/labuser/Downloads/applications
false
45:08:838 SEVERE IOSServer.main cannot start ios-driver server: org.openqa.selenium.WebDriverException: path/to/aut.app isn't an IOS app.
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9', java.version: '1.7.0_55'
Driver info: driver.version: unknown
Any one suggest me to resolve this error and am new to use commands in terminal
It looks like path/to/aut.app is a placeholder and you need to replace it with the path to your application.