appium-espresso-driver icon indicating copy to clipboard operation
appium-espresso-driver copied to clipboard

Sometimes? "shell ime enable io.appium.settings/.UnicodeIME" fails on Android 13 beta

Open KazuCocoa opened this issue 3 years ago • 2 comments

I saw /Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell ime enable io.appium.settings/.UnicodeIME raised an error as below in Android 13 beta emulator. The command itself succeeded, but it seems like the initial time? or something failed once?

[debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[debug] [ADB] Running '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop persist.sys.locale'
[debug] [ADB] Current device property 'persist.sys.locale':
[debug] [ADB] Running '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.product.locale'
[debug] [ADB] Current device property 'ro.product.locale': en-US
[debug] [ADB] Current locale: 'en-US'; requested locale: 'en-US'
[debug] [ADB] Running '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop persist.sys.locale'
[debug] [ADB] Current device property 'persist.sys.locale':
[debug] [ADB] Running '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.product.locale'
[debug] [ADB] Current device property 'ro.product.locale': en-US
[debug] [ADB] Requested locale is equal to current locale: 'en-us'
[debug] [Logcat] Starting logs capture with command: /Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 logcat -v threadtime
[debug] [AndroidDriver] Enabling Unicode keyboard support
[debug] [ADB] Running '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get secure default_input_method'
[debug] [AndroidDriver] Unsetting previous IME com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME
[debug] [AndroidDriver] Setting IME to 'io.appium.settings/.UnicodeIME'
[debug] [ADB] Running '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell ime enable io.appium.settings/.UnicodeIME'
[debug] [EspressoDriver@142c (10970321)] Deleting espresso session
[debug] [ADB] Running '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.android.apis'
[debug] [Logcat] Stopping logcat capture
[EspressoDriver@142c (10970321)] Restoring hidden api policy to the device default configuration
[debug] [ADB] Running '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy''
[debug] [ADB] Removing forwarded port socket connection: 8200
[debug] [ADB] Running '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:8200'
[EspressoDriver@142c] Unable to remove port forward 'Error executing adbExec. Original error: 'Command '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp\:8200' exited with code 1'; Command output: adb: error: listener 'tcp:8200' not found
[EspressoDriver@142c] '
[debug] [AppiumDriver@6009] Event 'newSessionStarted' logged at 1654964517548 (09:21:57 GMT-0700 (Pacific Daylight Time))
[debug] [AppiumDriver@6009] Encountered internal error running command: A new session could not be created. Details: Error executing adbExec. Original error: 'Command '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell ime enable io.appium.settings/.UnicodeIME' exited with code 255'; Command output: Unknown input method io.appium.settings/.UnicodeIME cannot be enabled for user #0
[debug] [AppiumDriver@6009] . Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting.
[debug] [AppiumDriver@6009] Error: Command '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell ime enable io.appium.settings/.UnicodeIME' exited with code 255
[debug] [AppiumDriver@6009]     at ChildProcess.<anonymous> (/Users/kazuaki/.appium/node_modules/appium-espresso-driver/node_modules/teen_process/lib/exec.js:113:19)
[debug] [AppiumDriver@6009]     at ChildProcess.emit (events.js:400:28)
[debug] [AppiumDriver@6009]     at maybeClose (internal/child_process.js:1058:16)
[debug] [AppiumDriver@6009]     at Socket.<anonymous> (internal/child_process.js:443:11)
[debug] [AppiumDriver@6009]     at Socket.emit (events.js:400:28)
[debug] [AppiumDriver@6009]     at Pipe.<anonymous> (net.js:686:12)
[HTTP] <-- POST /wd/hub/session 500 4639 ms - 1085
[HTTP]

KazuCocoa avatar Jun 11 '22 16:06 KazuCocoa

Ok case:

[debug] [AndroidDriver] Unsetting previous IME com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME
[debug] [AndroidDriver] Setting IME to 'io.appium.settings/.UnicodeIME'
[debug] [ADB] Running '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell ime enable io.appium.settings/.UnicodeIME'
[debug] [ADB] Running '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell ime set io.appium.settings/.UnicodeIME'
[debug] [ADB] Running '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get global animator_duration_scale'
[debug] [ADB] Running '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get global transition_animation_scale'
[debug] [ADB] Running '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get global window_animation_scale'
[debug] [ADB] Running '/Users/kazuaki/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am broadcast -a io.appium.settings.animation -n io.appium.settings/.receivers.AnimationSettingReceiver --es setstatus disable'

KazuCocoa avatar Jun 11 '22 16:06 KazuCocoa

Hey @KazuCocoa, I am facing the same error and looked up solution but didn't find any. UnknownError: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/Users/runner/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell ime enable io.appium.settings/.UnicodeIME' exited with code 255'; Stderr: 'Unknown input method io.appium.settings/.UnicodeIME cannot be enabled for user #0'; Code: '255' Attached is the full log from the android job I have 6_Run Android E2E Tests.txt

abdelrahman-labeeb avatar Aug 01 '22 20:08 abdelrahman-labeeb

Potentially we need to enable the IME by manual once by some security restriction. Still beta, so let's see how this will be in next beta or RC.

KazuCocoa avatar Aug 10 '22 06:08 KazuCocoa