UIAutomation2: Driver failed to start
See original GitHub issueThe problem
Failed to start driver with UIAutomation2. With old UIAutomation - no issues.
Environment
- Appium version (or git revision) that exhibits the issue: 1.6.4-beta
- Last Appium version that did not exhibit the issue (if applicable): ?
- Mobile platform/version under test: Android
- Real device or emulator/simulator: Real device with Android 6.0
Link to Appium logs
debug] [ADB] Running '/Users/Aleksei/Library/Android/sdk/platform-tools/adb' with args: ["-P",5037,"-s","LGH8155e9892e6","forward","--remove","tcp:8200"]
[MJSONWP] Encountered internal error running command: TypeError: Cannot read property 'isScreenLocked' of undefined
at Object.callee$0$0$ (../../lib/android-helpers.js:419:18)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at F (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.export.js:30:36)
at AsyncIterator.enqueue (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at Object.runtime.async (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
at Object.callee$0$0 [as unlock] (../../lib/android-helpers.js:418:59)
at AndroidUiautomator2Driver.startUiAutomator2Session$ (../../lib/driver.js:242:19)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
[HTTP] <-- POST /wd/hub/session 500 7940 ms - 187
HTTP] --> POST /wd/hub/session {"capabilities":{"desiredCapabilities":{"app":"/Users/Aleksei/Downloads/test_clients/xxxx.apk","noReset":false,"clearSystemFiles":"true","appWaitActivity":"ee.xxx, ee.xxxxx, ee.xxxxx","disableAndroidWatchers":"true","version":"","deviceName":"LGH8155e9892e6","fullReset":true,"platform":"ANDROID","automationName":"UIAutomator2","browserName":"","autoGrantPermissions":"true","waitForAppScript":"$.delay(100); true;","udid":"LGH8155e9892e6","platformName":"Android"},"requiredCapabilities":{}}}
[debug] [MJSONWP] Bad parameters: BadParametersError: Parameters were incorrect. We wanted {"required":["desiredCapabilities"],"optional":["requiredCapabilities","capabilities","sessionId","id"]} and you sent ["capabilities"]
[HTTP] <-- POST /wd/hub/session 400 2 ms - 171
System info: host: 'aleks.local', ip: '127.0.0.1', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.2', java.version: '1.8.0_101'
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Unable to install uiautomator2 . Getting error massage. Please ...
Error: × Encountered an error when installing package: npm command 'install --save-dev appium-uiautomator2-driver --json' failed with code null.
Read more >Error installing uiautomator2 driver with Appium - Stack Overflow
I am pretty new to appium and I tried installing the uiautomator2 driver to the latest appium version 2.0.0- ...
Read more >Appium driver install uiautomator2 can't install - Support
Hi. When I try to install uiautomator2 on Mac I have this error appium driver install uiautomator2 info Appium Setting NODE_PATH to ...
Read more >appium-uiautomator2-driver | Yarn - Package Manager
Appium UiAutomator2 Driver is a test automation framework for Android devices. Appium UiAutomator2 Driver automates native, hybrid and mobile web apps, ...
Read more >appium-uiautomator2-driver - npm
UiAutomator2 integration for Appium. Latest version: 2.12.0, last published: 16 days ago. Start using appium-uiautomator2-driver in your ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@SrinivasanTarget @mykola-mokhnach I made a change on appium-uiatomator2-driver with a fix. https://github.com/appium/appium-uiautomator2-driver/pull/66
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.