Getting "Error: read ECONNRESET" on reseting and launching the app - selenium-webdriver

I am getting the following error on resetting the app [driver.resetApp()] and on launching the app on Appium (version: 1.4.16.1). I am using Java.
Eclispe console
org.openqa.selenium.WebDriverException: chrome not reachable
(Session info: chrome=50.0.2661.86)
(Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.08 seconds
Build info: version: '2.48.2', revision: '41bccdd', time: '2015-10-09 19:59:12'
System info: host: 'IN2084073W1', ip: '192.168.56.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_21'
*** Element info: {Using=id, value=password}
Session ID: 2968b7e9-948e-4b75-94ed-838d10a08c82
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities [{platform=LINUX, app=C:/apk/appname.apk, javascriptEnabled=true, appActivity=.MainActivity, browserName=, networkConnectionEnabled=true, desired={newCommandTimeout=120, app=C:/apk/surveyorapp.apk, platformVersion=5.1, deviceName=TA93303Q2F, platformName=Android, appActivity=.MainActivity, browserName=, appPackage=com.axa.surveyorapp}, locationContextEnabled=false, appPackage=com.axa.surveyorapp, newCommandTimeout=120, platformVersion=5.1, databaseEnabled=false, deviceName=TA93303Q2F, platformName=Android, webStorageEnabled=false, warnings={}, takesScreenshot=true}]
Appium Log
error: Could not proxy command to remote server. Original error: Error: read ECONNRESET
error: Chromedriver: Chromedriver exited unexpectedly with code 3221225477, signal null
info: Chromedriver: Changed state to 'stopped'
warn: Chromedriver for context WEBVIEW_com.clientname.appname stopped unexpectedly
error: Chromedriver quit unexpectedly during session
Update
Thanks for the update Emna. I have tried your option.
Can you please let me know how exactly I need to add this. I am using AndroidDriver not AppiumDriver. I have tried with both, but I'm getting below error.

Try to use :
(AppiumDriver)driver.resetApp();
Instead of :
driver.resetApp();
You can have a look into this link: Appium java-client
and use this link also to download ;)

Related

Intermittent error in webdriver start up - using WebDriverManager

System.InvalidOperationException : 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: Process unexpectedly closed with status 0
Build info: version: '4.1.2', revision: '9a5a329c5a'
System info: host: 'a9efa94d3168', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-1052-aws', java.version: '11.0.13'
Driver info: driver.version: unknown
I have seen other articles referencing this error and they state that the Chrome driver version and the browser version must be the same. I am using WebDriverManager, which is supposed to ensure that they are the same.
I am running the code in a Gitlab pipeline - it is running in a docker container on Linux.
I only get this error occasionally. If it was a problem with my code set up I would expect to get it on every run.

protractor - session not created exception

I am getting the error below when trying to run Protractor test against chrome.
session not created exception: Chrome version must be >= 59.0.3071.0
[11:42:23] E/launcher - session not created exception: Chrome version must be >= 59.0.3071.0 (Driver info: chromedriver=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide
any stacktrace information) Command duration or timeout: 6.44 seconds Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:54:15.039Z' System info: host: 'PC328569', ip: '10.25.227.179', os.name: 'Windows 7', os.arch: 'amd64', os.version:
'6.1', java.version: '1.8.0_121' Driver info: driver.version: unknown [11:42:23] E/launcher - SessionNotCreatedError: session not created exception: Chrome version must be >= 59.0.3071.0 (Driver info: chromedriver=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platform=Windows
NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 6.44 seconds Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:54:15.039Z' System info: host: 'PC328569', ip:
'10.25.227.179', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121' Driver info: driver.version: unknown at WebDriverError (D:\Balachander\DailyScript\node_modules\selenium-webdriver\lib\error.js:27:5) at SessionNotCreatedError
(D:\Balachander\DailyScript\node_modules\selenium-webdriver\lib\error.js:214:5) at Object.checkLegacyResponse (D:\Balachander\DailyScript\node_modules\selenium-webdriver\lib\error.js:505:15) at parseHttpResponse (D:\Balachander\DailyScript\node_modules\selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (D:\Balachander\DailyScript\node_modules\selenium-webdriver\lib\http.js:440:13) at process._tickCallback (internal/process/next_tick.js:103:7) From: Task: WebDriver.createSession() at Function.createSession (D:\Balachander\DailyScript\node_modules\selenium-webdriver\lib\webdriver.js:777:24)
at Function.createSession (D:\Balachander\DailyScript\node_modules\selenium-webdriver\chrome.js:709:29) at createDriver (D:\Balachander\DailyScript\node_modules\selenium-webdriver\index.js:167:33) at Builder.build (D:\Balachander\DailyScript\node_modules\selenium-webdriver\index.js:623:16)
at Hosted.getNewDriver (D:\Balachander\DailyScript\node_modules\protractor\lib\driverProviders\driverProvider.ts:60:29) at Runner.createBrowser (D:\Balachander\DailyScript\node_modules\protractor\lib\runner.ts:225:39) at q.then.then (D:\Balachander\DailyScript\node_modules\protractor\lib\runner.ts:391:27)
at _fulfilled (D:\Balachander\DailyScript\node_modules\q\q.js:834:54) at self.promiseDispatch.done (D:\Balachander\DailyScript\node_modules\q\q.js:863:30) at Promise.promise.promiseDispatch (D:\Balachander\DailyScript\node_modules\q\q.js:796:13) [11:42:23]
E/launcher - Process exited with error code 199
Versions of the executables used:
webdriver manager - 12.0.6
protractor - 5.1.2
chrome driver - 2.32
Java - 1.8
What I have tried:
1.Updating the webdriver to latest version
npm update -g protractor
webdriver-manager update
2.Editing Protractor's config file: node_modules/protractor/config.json
Changing the chrome driver version to whatever you need. eg. "chromedriver": "2.24".Run webdriver-manager update.
But for some reason webdriver-manager always uses chrome driver 2.32.
Any help or suggestion is appreciated. Thanks.
As per Below references you need to update your actual installed chrome.
Update chrome by :- About Google Chrome
Menu -> Help ->
Refer :-
https://github.com/appveyor/ci/issues/1600
Chromedriver error "Chrome version must be >= 52" using Nightwatch
Hope it will help you :)

Chrome browser is not launching when launched on selenium webdriver

I have the following configuration :
Webdriver version : 3.3.0
Chrome version : 56
Chromedriver version : 2.24
OS Version : Windows 10
The exception I am facing is given below. I am quite new to selenium so not sure what could be the possible reason. I tried executing the same code with severla versions of chromedriver but with no luck
Starting ChromeDriver 2.24.417431 (9aea000394714d2fbb20850021f6204f2256b9cf) on port 45496
Only local connections are allowed.
Mar 13, 2017 8:27:43 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
Exception in thread "main" org.openqa.selenium.NoSuchSessionException: no such session
(Driver info: chromedriver=2.24.417431 (9aea000394714d2fbb20850021f6204f2256b9cf),platform=Windows NT 10.0.14393 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 16 milliseconds
Build info: version: 'unknown', revision: 'b526bd5', time: '2017-03-07 11:11:07 -0800'
System info: host: 'DESKTOP-CU1N4JE', ip: '192.168.1.4', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{message=unknown error: chrome failed to start
(Driver info: chromedriver=2.24.417431 (9aea000394714d2fbb20850021f6204f2256b9cf),platform=Windows NT 10.0.14393 x86_64), platform=ANY}]
Session ID: 0f4877e9d55cf1682ea6b45d0196319a
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:638)
at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteTimeouts.implicitlyWait(RemoteWebDriver.java:835)
at pkg_1302_02.Cl_1303_02.main(Cl_1303_02.java:19)
You are using an older version of chrome driver. Using latest chrome drive will solve the issue. Download latest chrome driver from Link to download Chrome driver

Protractor - Safari - Timed out awaiting response to command "sendKeysToElement"

One of my E2E Test is failing only on Safari browser, when trying to send Text to an inputBox.
element(by.css('#content')).clear();
element(by.css('#content')).sendKeys("%20%DCben%20von%20Xylophonmusik%20qu%E4lt%20jeden%20gr%F6%DFeren%20Zwerg%20El%20ping%FCino%20Wenceslao%20hizo%20kil%F3metros%20bajo%20exhaustiva%20ll"); //UTF Text
Seeing following error in Webdriver manager console
18:40:12.150 INFO - Executing: [send keys: 16 [[SafariDriver: safari
on MAC (null)] -> css selector: #contentText],
[Falsches%20%DCben%20von%20Xylophonmusik%20qu%E4lt%20jeden%20gr%F6%DFeren%20Zwerg%20El%20ping%FCino%20Wenceslao%20hizo%20kil%F3metros%20bajo%20exhaustiva%20lluvia%20y%20%0A%200c%F4t%E9%20de%20l%27alc%F4ve%20ovo%EFde%2C%20o%F9%20les%20b%FBche%u0E40%u18:40:42.663
WARN - Exception thrown org.openqa.selenium.TimeoutException: Timed
out awaiting response to command "sendKeysToElement" after 30004 ms
(WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 30.02 seconds Build info: version:
'2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50' System
info: host: 'vq-mac-dt-036.local', ip: '10.21.134.62', os.name: 'Mac
OS X', os.arch: 'x86_64', os.version: '10.9.5', java.version:
'1.8.0_31' Driver info: org.openqa.selenium.safari.SafariDriver
Capabilities [{browserName=safari, takesScreenshot=true,
javascriptEnabled=true, version=7.0.6, cssSelectorsEnabled=true,
platform=MAC, secureSsl=true}] Session ID: null at
sun.reflect.GeneratedConstructorAccessor57.newInstance(Unknown Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at org.openqa.selenium.remote.ErrorHandler.createThrowa18:40:42.664
WARN - Exception: Timed out awaiting response to command
"sendKeysToElement" after 30004 ms (WARNING: The server did not
provide any stacktrace information) Command duration or timeout: 30.02
seconds
This test is working in Firefox, Chrome Browsers. I can't find any open issue related to safari driver.
Could you please advise, how to resolve this.
Thanks in advance.
Try chaining the clear, click and sendKeys functions on the input box to send the value. I don't think the UTF8 text should cause any problem. Here's how to do it -
var ele = element(by.css('#content'));
ele.clear().then(function(){
ele.click().then(function(){
ele.sendKeys("%20%DCben%20von%20Xylophonmusik%20qu%E4lt%20jeden%20gr%F6%DFeren%20Zwerg%20El%20ping%FCino%20Wenceslao%20hizo%20kil%F3metros%20bajo%20exhaustiva%20ll"); //UTF Text
});
});
Hope this helps.

Can't run Protractor with Safari

I'm trying to solve it for days, please help me!
I'm running my protractor tests using chrome, firefox and internet explorer, but when I try to run the same test in Safari, I get the following error:
ScriptTimeoutError: Timed out awaiting response to command "executeScript" after 30003 ms (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 30.08 seconds
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
System info: host: 'myPC', ip: '192.168.0.12', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_45'
Driver info: org.openqa.selenium.safari.SafariDriver
Capabilities [{browserName=safari, takesScreenshot=true, javascriptEnabled=true, version=5.1.7, cssSelectorsEnabled=true, platform=WINDOWS, secureSsl=true}]
Session ID: null
The error comes when I try to get some url like browser.get('https://www.google.com'); I tried to run the same test in Safari in my colleague's macbook to see if the problem is my windows environment (and the older safari version 5.1.7) but had the same problem. I also tried to change the allScriptsTimeout and got the same problem, I tried many different configurations in my protractor configuration file and it didn't worked =(
I'm sure that I"m doing something wrong but have no ideia about what... I didn't found more information about this error.
Edit: There is a known issue (https://github.com/angular/protractor/issues/2111) about using protractor with safari

Resources