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

Send keys not works in android container #114

Open
sasha943 opened this issue May 6, 2019 · 6 comments

Comments

Projects
None yet
2 participants
@sasha943
Copy link

commented May 6, 2019

I create custom android image with next params:
Appium version: 1.9.1
Android version: 8.0
Device: Nexus 9
Chrome browser: no
Chromedriver version: 2.34

Also to Dockerfile to run section add libgconf-2-4 for ubuntu platform

When use sendkeys method got exception:
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: unknown error: an X display is required for keycode conversions, consider using Xvfb (Session info: chrome=44.0.2403.119) (Driver info: chromedriver=2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b),platform=Linux 4.9.0-8-amd64 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z' System info: host: 'lin-build-7', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.0-8-amd64', java.version: '1.8.0_152' Driver info: mobileApplication.drivers.AndroidMobileDriver Capabilities {androidNaturalOrientation: true, app: /etc/cordova/*-debug..., appActivity: *.MainActivity, appPackage: *, appWaitActivity: *.MainActivity, appWaitPackage: *, autoGrantPermissions: true, browserName: android, clearSystemFiles: true, databaseEnabled: false, desired: {androidNaturalOrientation: true, app: /etc/cordova/*-debug..., appActivity: *.MainActivity, appWaitActivity: **.MainActivity, autoGrantPermissions: true, browserName: android, clearSystemFiles: true, deviceName: emulator-5554, enableVNC: false, enableVideo: false, javascriptEnabled: true, name: androidContainerWithThreadN..., nativeWebScreenshot: true, newCommandTimeout: 3600, noReset: true, orientation: LANDSCAPE, platformName: Android, recreateChromeDriverSessions: true, resetKeyboard: true, takesScreenshot: true, udid: emulator-5554, version: 6.0}, deviceManufacturer: unknown, deviceModel: Android SDK built for x86, deviceName: emulator-5554, deviceScreenSize: 2048x1536, deviceUDID: emulator-5554, enableVNC: false, enableVideo: false, javascriptEnabled: true, locationContextEnabled: false, name: androidContainerWithThreadN..., nativeWebScreenshot: true, networkConnectionEnabled: true, newCommandTimeout: 3600, noReset: true, orientation: LANDSCAPE, platform: LINUX, platformName: Android, platformVersion: 6.0, recreateChromeDriverSessions: true, resetKeyboard: true, takesScreenshot: true, udid: emulator-5554, version: 6.0, warnings: {}, webStorageEnabled: false} Session ID: 97185e6e-7741-45de-83a9-2e6c5de38072 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166) at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40) at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80) at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:231) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)

Next error got while execute:
( (JavascriptExecutor) driver ).executeScript( script )("var elem=arguments[0]; jQuery(\"#\"+elem.id).trigger(\"change\")", getWebElement( by ) );
Exception:
org.openqa.selenium.WebDriverException: unknown error: jQuery is not defined (Session info: chrome=71.0.3578.98) (Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 4.9.0-8-amd64 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z' System info: host: 'lin-build-7', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.0-8-amd64', java.version: '1.8.0_152' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.45.615279 (12b89733300bd2..., userDataDir: /opt/teamcity/BuildAgent/te...}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:17631}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, proxy: Proxy(), rotatable: false, setWindowRect: true, strictFileInteractability: false, takesHeapSnapshot: true, takesScreenshot: true, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unexpectedAlertBehaviour: ignore, unhandledPromptBehavior: ignore, version: 71.0.3578.98, webStorageEnabled: true} Session ID: 4a6ec01002647b08c7669ef14ce9d446 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166) at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40) at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80) at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548) at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:485)

On real device or emulator that setup not in docker container everything works well
Also checked on other configuration: Android 6.0 (chromedriver 2.20)

Please advise

@vania-pooh vania-pooh added the bug label May 6, 2019

@sasha943

This comment has been minimized.

Copy link
Author

commented May 8, 2019

hi, any updates or estimates?

@vania-pooh

This comment has been minimized.

Copy link
Member

commented May 8, 2019

I think we could try to rebuild these images with recent Appium release.

@sasha943

This comment has been minimized.

Copy link
Author

commented May 8, 2019

Tried Appium version 1.13.0, the same problem

@sasha943

This comment has been minimized.

Copy link
Author

commented May 10, 2019

any updates?

@vania-pooh

This comment has been minimized.

Copy link
Member

commented May 10, 2019

@sasha943 need to search for Appium bugs then.

@sasha943

This comment has been minimized.

Copy link
Author

commented May 14, 2019

@vania-pooh I create topic at appium forum, but no response yet =(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.