I try to run a selenium client that interacts with remote selenium web driver server.
Some (only some) of my tests are failing because of connection refused.
What should I check on the machine that hosts the server?
com.x.inject.ProvisionException: Guice provision errors:
1) Error in custom provider, org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.44.0', revision: '76d78cf323ce037c5f92db6c1bba601c2ac43ad8', time: '2014-10-23 13:11:40'
System info: host: 'w04.hfa.corp.x.com', ip: '172.28.144.7', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-30-generic', java.version: '1.8.0_25'
Driver info: driver.version: RemoteWebDriver
while locating com.waze.testing.guice.providers.WebDriverProvider
at com.waze.testing.MainModule.configure(MainModule.java:44)
while locating org.openqa.selenium.WebDriver
1 error
at com.x.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1009)
at com.x.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1035)
at com.waze.testing.cucumber.steps.Hooks.before(Hooks.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Selenium 2.44 and "Native Method" phrase in the traceback makes me think this is a compatibility problem. Upgrade selenium to the latest (2.46 currently) version.
Related
The getDriver() function returns an instance of iOS Driver. I am getting the below error when trying to reset the app using the below command,
Driver.getDriver().resetApp();
I also tried replacing this command with closeApp and launchApp as below. But that is also failing with the same error.
Driver.getDriver().closeApp();
Driver.getDriver().launchApp();
The error is not very informative and I am not sure how to fix this error as well. Can someone please help me on the same please?
Unable to determine type from: Y. Last 1 characters read: Y
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'Kishores-MBP', ip: 'fe80:0:0:0:35:43cd:351c:edd3%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_231'
Driver info: driver.version: IOSDriver
org.openqa.selenium.json.JsonException: Unable to determine type from: Y. Last 1 characters read: Y
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'Kishores-MBP', ip: 'fe80:0:0:0:35:43cd:351c:edd3%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_231'
Driver info: driver.version: IOSDriver
at org.openqa.selenium.json.JsonInput.peek(JsonInput.java:122)
at org.openqa.selenium.json.JsonTypeCoercer.lambda$null$6(JsonTypeCoercer.java:140)
at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:126)
at org.openqa.selenium.json.Json.toType(Json.java:69)
at org.openqa.selenium.json.Json.toType(Json.java:55)
at org.openqa.selenium.json.Json.toType(Json.java:50)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:87)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:45)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
at io.appium.java_client.InteractsWithApps.resetApp(InteractsWithApps.java:93)
at hid.seos.testCases.ui.ListEventsForEndpoint.initialise(ListEventsForEndpoint.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:134)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:63)
at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:348)
at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:302)
at org.testng.internal.TestInvoker.runConfigMethods(TestInvoker.java:695)
at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:523)
at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173)
at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:816)
at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.testng.TestRunner.privateRun(TestRunner.java:766)
at org.testng.TestRunner.run(TestRunner.java:587)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:28)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:425)
at org.testng.internal.thread.ThreadUtil.lambda$execute$0(ThreadUtil.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Just figured out the root cause for the exception. It took me long enough, because the error message was not that much helpful.
Root Cause: I was using pcloudy for Appium, and I just missed the line for mentioning the platformVersion in pcloudyDesiredCapabilities. So if anyone else is facing the same issue, just make sure that you are not missing anything in the DesiredCapabilities part when you are initializing the Webdriver(AndroidDriver or IOSDriver).
today I had the same error when I was opening the URL (https://google.com) but after spending time trying to figured what was happen, I realized than the problem was triggered by the firewall where the selenium grid is hosted, so may the problem could be the access from the selenium grid the the URL what you want test. This is my poor experience and I hope help to you in your project.
When I start the selenium test with gird (Remote control), I see this ERROR on log. The browser is not able to open. I did check and tried the following things:
Stop and start both hub and node. I use the default commands to start hub and node. From command prompt, I see that the node was registered successfully and ready to use
Clean Eclipse Project at Project>Clean
Restart my PC
Disconnect VPN
Use latest selenium standalone 3.6; chromedriver.exe
Check the path to chromedriver.exe
Use my PC as hub and another PC as node
Please note that this issue only happen if I run the test with grid (remote control). The test can run normally locally.
2017-10-20 15:23:37,805 ERROR [Log] Class Utils | Method OpenBrowser | Exception desc : Unable to create new service: ChromeDriverService
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T16:15:40.131Z'
System info: host: 'MY-PC', ip: 'xx.xxx.xxx.xx', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'
Driver info: driver.version: unknown
Command duration or timeout: 319 milliseconds
Please give me advice in this case. Thanks!
I'm experiencing a problem running Selenide tests in Firefox version 46. When tests run separately everything works fine. But when I run all test methods in class it hangs on the following step:
addons.productaddons INFO sending request to: https://aus5.mozilla.org/update/3/GMP/46.0/20160421124000/WINNT_x86_64-msvc-x64/en-US/release/Windows_NT%206.1.1.0%20(x64)/default/default/update.xml
addons.productaddons INFO Completed downloading document
addons.productaddons INFO Downloading from https://cdmdownload.adobe.com/firefox/win/x64/primetime_gmp_win_x64_gmc_40673.zip to C:\Users\hunar_letsko\AppData\Local\Temp\tmpaddon
addons.productaddons INFO Downloading from http://ciscobinary.openh264.org/openh264-win64-0410d336bb748149a4f560eb6108090f078254b1.zip to C:\Users\hunar_letsko\AppData\Local\Temp\tmpaddon
addons.manager INFO Skipping background update check
DeferredSave.extensions.json DEBUG Save changes
DeferredSave.extensions.json DEBUG Starting timer
DeferredSave.extensions.json DEBUG Starting write
DeferredSave.extensions.json DEBUG Write succeeded
One more note: when test method are running more than 3 hours of hanging it fails with connection timeout:
org.openqa.selenium.WebDriverException: java.net.SocketTimeoutException: Read timed out
Build info: version: '3.0.0', revision: '350cf60', time: '2016-10-13 10:48:57 -0700'
System info: host: 'EPBYMINW2815', ip: '10.6.9.56', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_92'
Driver info: driver.version: RemoteWebDriver
selenide.url: app_url"
selenide.baseUrl: http://localhost:8080
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:91)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:322)
at org.openqa.selenium.remote.RemoteWebDriver$RemoteNavigation.to(RemoteWebDriver.java:902)
at com.codeborne.selenide.impl.Navigator.navigateToAbsoluteUrl(Navigator.java:69)
at com.codeborne.selenide.impl.Navigator.open(Navigator.java:31)
at com.codeborne.selenide.Selenide.open(Selenide.java:81)
at com.codeborne.selenide.Selenide.open(Selenide.java:55)
at
where app_url is my application's url.
Thanks for any help in advance, guys!
You need to downgrade Selenide. Selenide 4.0 works bad with Firefox.
I created a script in Jmeter that works in the gui and I moved it to an AWS instance.
I'm using:
selenium-server-standalone-2.35.0.jar
ChromeDriver (v2.2)
Chromium 37.0.2062.120 Ubuntu 14.04
and Jmeter 2.11
The script works in the gui (where it reaches my site, logs in etc) but in the non gui mode I get this error in the log file:
2014/10/10 17:54:22 ERROR - jmeter.threads.JMeterThread: Test failed! org.openqa.selenium.WebDriverException: unknown error: unable to discover open pages
(Driver info: chromedriver=2.2,platform=Linux 3.13.0-36-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 21.32 seconds
Build info: version: '2.39.0', revision: '14fa800511cc5d66d426e08b0b2ab926c7ed7398', time: '2013-12-16 13:18:38'
System info: host: 'ip-10-1-1-132', ip: '10.1.1.132', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-36-generic', java.version: '1.7.0_65'
Driver info: org.openqa.selenium.chrome.ChromeDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at org.openqa.selenium.chrome.ChromeDriver.startSession(ChromeDriver.java:182)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:115)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:161)
at com.googlecode.jmeter.plugins.webdriver.config.ChromeDriverConfig.createBrowser(ChromeDriverConfig.java:44)
at com.googlecode.jmeter.plugins.webdriver.config.ChromeDriverConfig.createBrowser(ChromeDriverConfig.java:16)
at com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig.threadStarted(WebDriverConfig.java:212)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:597)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:961)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:946)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:566)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:554)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.lang.Thread.run(Thread.java:745)
Any ideas?
You are using a version of ChromeDriver from 2013, which in no way whatsoever is going to support v37 of Chrome.
http://chromedriver.storage.googleapis.com/2.11/notes.txt
----------ChromeDriver v2.11 (2014-10-07)----------
Supports Chrome v36-40
So I'd suggest upgrading to v2.11 and retrying & upgrade Selenium whilst you are at it, v2.35 of Selenium is also from 2013.
I am using chrome browser in selenium project.
Here is the user agent string that I am using:
System.setProperty("webdriver.chrome.driver","C:\\users\\..\\chromedriver.exe");
driver = new ChromeDriver();
What happens IF I run the script:
It open the chrome browser and after some time it close it and giving error:
org.openqa.selenium.WebDriverException: unknown error: unable to
discover open pages (Driver info: chromedriver=2.2,platform=Windows
NT 6.1 x86) (WARNING: The server did not provide any stacktrace
information) Command duration or timeout: 26.83 seconds Build info:
version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:12:12'
System info: host: 'QAVM-9', ip: '27.101.1.26', os.name: 'Windows 7',
os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_45' Driver
info: org.openqa.selenium.chrome.ChromeDriver at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at
org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at
org.openqa.selenium.chrome.ChromeDriver.startSession(ChromeDriver.java:182)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:111)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:115)
at
org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:161)
at
org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:150)
at
org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:139)
Please help me, It completely stop the execution.
Let me know in case need any other information.
I would suggest you to update your chrome driver since your version is 2.2 and the latest is 2.9. It might be possible that your existing chrome driver might not be supporting your chrome browser if the browser is of latest version.
Chrome driver versions are here
Also check the release notes here. Each chromedriver mentions which chrome browser versions
it supports.
Here's what I did to get rid of that error (
unknown error: unable to discover open pages
)
In your protractor config file, add the following:
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: ['--no-sandbox']
}
},
The most important line there is the --no-sandbox; adding that line somehow gets rid of that error.
I am not exactly sure why it works but it's a workaround I found while digging around online.