Hello,
I have a problem with a starting of Espresso Driver with Appium. From Log it seems to me like the server wont start, but I don’t understand what is the problem. Thanks for any help
I am using Python 3.12, Appium 2.11.4, espresso 3.5.0
Server log:
[28e4b33d][EspressoDriver@2dfd] Installed Espresso Test Server apk 'C:\Users\KARELV~1\AppData\Local\Temp\io.appium.espressoserver.test_3.5.0_com.sensus.datalogger_HA11RZB8.apk' (pkg: 'io.appium.espressoserver.test')
[28e4b33d][ADB] Adding packages ["io.appium.settings","io.appium.espressoserver.test"] to Doze whitelist
[28e4b33d][ADB] Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.espressoserver.test",";"]]
[28e4b33d][ADB] Running 'C:\Users\KarelVrabka\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s HA11RZB8 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.espressoserver.test ;'
[28e4b33d][EspressoDriver@2dfd] Performing cleanup of automation leftovers
[28e4b33d][EspressoDriver@2dfd] No obsolete sessions have been detected (socket hang up)
[28e4b33d][EspressoDriver@2dfd] Starting Espresso Server v3.5.0 with cmd: adb shell am instrument -w -e debug false -e disableAnalytics true io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner
[28e4b33d][ADB] Creating ADB subprocess with args: ["-P","5037","-s","HA11RZB8","shell","am","instrument","-w","-e","debug","false","-e","disableAnalytics","true","io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner"]
[28e4b33d][EspressoDriver@2dfd] Waiting up to 45000ms for Espresso server to be online
[28e4b33d][EspressoDriver@2dfd] Matched '/status' to command name 'getStatus'
[28e4b33d][EspressoDriver@2dfd] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[28e4b33d][EspressoDriver@2dfd] socket hang up
[28e4b33d][EspressoDriver@2dfd] Matched '/status' to command name 'getStatus'
[28e4b33d][EspressoDriver@2dfd] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[28e4b33d][EspressoDriver@2dfd] socket hang up
[28e4b33d][EspressoDriver@2dfd] Matched '/status' to command name 'getStatus'
[28e4b33d][EspressoDriver@2dfd] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[28e4b33d][EspressoDriver@2dfd] socket hang up
[28e4b33d][EspressoDriver@2dfd] Matched '/status' to command name 'getStatus'
[28e4b33d][EspressoDriver@2dfd] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[28e4b33d][EspressoDriver@2dfd] socket hang up
[28e4b33d][EspressoDriver@2dfd] Matched '/status' to command name 'getStatus'
[28e4b33d][EspressoDriver@2dfd] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[28e4b33d][EspressoDriver@2dfd] socket hang up
[28e4b33d][EspressoDriver@2dfd] Matched '/status' to command name 'getStatus'
[28e4b33d][EspressoDriver@2dfd] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[28e4b33d][EspressoDriver@2dfd] socket hang up
[28e4b33d][EspressoDriver@2dfd] Matched '/status' to command name 'getStatus'
[28e4b33d][EspressoDriver@2dfd] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[28e4b33d][EspressoDriver@2dfd] socket hang up
[28e4b33d][EspressoDriver@2dfd] Matched '/status' to command name 'getStatus'
[28e4b33d][EspressoDriver@2dfd] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[28e4b33d][EspressoDriver@2dfd] socket hang up
[28e4b33d][EspressoDriver@2dfd] Matched '/status' to command name 'getStatus'
[28e4b33d][EspressoDriver@2dfd] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[28e4b33d][EspressoDriver@2dfd] socket hang up
[28e4b33d][EspressoDriver@2dfd] [Instrumentation] Process crashed before executing the test(s):
J6.f: Fatal exception in coroutines machinery for CancellableContinuation(DispatchedContinuation[k3.e@d2d9977, Continuation at R3.b@a36c9e4]){Completed}@52f9e4d. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
at o8.E.h(Unknown Source:39)
at o8.E.run(Unknown Source:170)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at A1.e.run(Unknown Source:272)
at java.lang.Thread.run(Thread.java:919)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [k0{Cancelling}@9e4d249, k3.e@d2d9977]
Caused by: kotlinx.coroutines.CompletionHandlerException: Exception in completion handler k@a6bc238[job@45ef211] for Y{Cancelling}@45ef211
at o8.e0.V(Unknown Source:60)
at o8.e0.b0(Unknown Source:167)
at o8.e0.y(Unknown Source:41)
at o8.e0.C(Unknown Source:6)
at o8.k.b(Unknown Source:4)
at o8.e0.A(Unknown Source:25)
at o8.e0.V(Unknown Source:73)
at o8.e0.b0(Unknown Source:167)
at o8.e0.S(Unknown Source:4)
at o8.a.e(Unknown Source:13)
at P6.a.e(Unknown Source:30)
at o8.E.run(Unknown Source:114)
... 4 more
Caused by: java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/String;Ljava/lang/Throwable;Lo8/W;)V in class Lkotlinx/coroutines/JobCancellationException; or its super classes (declaration of 'kotlinx.coroutines.JobCancellationException' appears in /data/app/io.appium.espressoserver.test-0FgS4P1T-PiVk8UShLnDiQ==/base.apk!classes5.dex)
at o8.e0.E(Unknown Source:64)
at o8.e0.y(Unknown Source:108)
at o8.k.q(Unknown Source:8)
at o8.e0.V(Unknown Source:25)
... 15 more
[28e4b33d][EspressoDriver@2dfd] [Instrumentation] INSTRUMENTATION_RESULT: shortMsg=Process crashed.
INSTRUMENTATION_CODE: 0
[28e4b33d][EspressoDriver@2dfd] Instrumentation process exited with code 0 from signal null
[28e4b33d][EspressoDriver@2dfd] Espresso server process has been unexpectedly terminated. Check the Appium server log and the logcat output for more details
[28e4b33d][EspressoDriver@2dfd] Deleting espresso session
[28e4b33d][ADB] Running 'C:\Users\KarelVrabka\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s HA11RZB8 shell dumpsys activity services io.appium.settings/.recorder.RecorderService'
[28e4b33d][ADB] Running 'C:\Users\KarelVrabka\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s HA11RZB8 shell am force-stop com.sensus.datalogger'
[28e4b33d][EspressoDriver@2dfd] Restoring hidden api policy to the device default configuration
[28e4b33d][ADB] Running 'C:\Users\KarelVrabka\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s HA11RZB8 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy''
[28e4b33d][Logcat] Stopping logcat capture
[28e4b33d][ADB] Removing forwarded port socket connection: 8300
[28e4b33d][ADB] Running 'C:\Users\KarelVrabka\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s HA11RZB8 forward --remove tcp:8300'
[28e4b33d][AppiumDriver@af16] Event 'newSessionStarted' logged at 1729583244224 (09:47:24 GMT+0200 (středoevropský letní čas))
[28e4b33d][AppiumDriver@af16] Encountered internal error running command: A new session could not be created. Details: Espresso server process has been unexpectedly terminated. Check the Appium server log and the logcat output for more details. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting.
Error: Espresso server process has been unexpectedly terminated. Check the Appium server log and the logcat output for more details. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting.
at Object.errorWithException (C:\Users\KarelVrabka\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\support\lib\logging.js:41:45)
at waitMs (C:\Users\KarelVrabka\.appium\node_modules\appium-espresso-driver\lib\espresso-runner.js:368:26)
at spin (C:\Users\KarelVrabka\.appium\node_modules\appium-espresso-driver\node_modules\asyncbox\lib\asyncbox.js:219:26)
at spin (C:\Users\KarelVrabka\.appium\node_modules\appium-espresso-driver\node_modules\asyncbox\lib\asyncbox.js:229:20)
at spin (C:\Users\KarelVrabka\.appium\node_modules\appium-espresso-driver\node_modules\asyncbox\lib\asyncbox.js:229:14)
at spin (C:\Users\KarelVrabka\.appium\node_modules\appium-espresso-driver\node_modules\asyncbox\lib\asyncbox.js:229:14)
at spin (C:\Users\KarelVrabka\.appium\node_modules\appium-espresso-driver\node_modules\asyncbox\lib\asyncbox.js:229:14)
at spin (C:\Users\KarelVrabka\.appium\node_modules\appium-espresso-driver\node_modules\asyncbox\lib\asyncbox.js:229:14)
at spin (C:\Users\KarelVrabka\.appium\node_modules\appium-espresso-driver\node_modules\asyncbox\lib\asyncbox.js:229:14)
at spin (C:\Users\KarelVrabka\.appium\node_modules\appium-espresso-driver\node_modules\asyncbox\lib\asyncbox.js:229:14)
at spin (C:\Users\KarelVrabka\.appium\node_modules\appium-espresso-driver\node_modules\asyncbox\lib\asyncbox.js:229:14)
at spin (C:\Users\KarelVrabka\.appium\node_modules\appium-espresso-driver\node_modules\asyncbox\lib\asyncbox.js:229:14)
at waitForCondition (C:\Users\KarelVrabka\.appium\node_modules\appium-espresso-driver\node_modules\asyncbox\lib\asyncbox.js:236:10)
at EspressoRunner.startSession (C:\Users\KarelVrabka\.appium\node_modules\appium-espresso-driver\lib\espresso-runner.js:360:7)
at EspressoDriver.startEspressoSession (C:\Users\KarelVrabka\.appium\node_modules\appium-espresso-driver\lib\driver.ts:460:5)
at EspressoDriver.createSession (C:\Users\KarelVrabka\.appium\node_modules\appium-espresso-driver\lib\driver.ts:270:7)
at AppiumDriver.createSession (C:\Users\KarelVrabka\AppData\Roaming\npm\node_modules\appium\lib\appium.js:731:35)