mobile-dev-inc / maestro

Painless Mobile UI Automation
https://maestro.mobile.dev/
Apache License 2.0
5.63k stars 255 forks source link

Exception in thread "pool-4-thread-1, v1.31.0 #1412

Open itsrahulsah opened 1 year ago

itsrahulsah commented 1 year ago

I tied to run a long flow, after half of test run I get this :-

Exception in thread "pool-4-thread-1" java.io.IOException: Command failed (host:transport:emulator-5554): device 'emulator-5554' not found
        at dadb.adbserver.AdbServer.send$dadb(AdbServer.kt:99)
        at dadb.adbserver.AdbServerDadb.open(AdbServer.kt:137)
        at dadb.forwarding.TcpForwarder.handleForwarding$lambda-1(TcpForwarder.kt:64)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)

host : - Ubuntu 20.04.4 LTS device:- emulator-5554 verison :- v1.31.0

felipevolpone commented 1 year ago

There isn't enough information reported, so can you provide the following? How long is the flow? Is your app native or it's using RN/Flutter? Which platform (android/ios)? Can you share your app binary and the flow? What's the adb-server status after this error? This doesn't seem related to maestro, but with adb connection.

didyk commented 1 year ago

@felipevolpone hi! We have react native application and run tests on Android. We have the similar issue on the CI. We have Maestro and Detox and we use Genymotion and only Maestro's test have next error:

Exception in thread "pool-4-thread-1" java.io.IOException: Command failed (host:transport:localhost:40001): device 'localhost:40001' not found

More important, we always have this error in the last step:

image
kojofosu commented 11 months ago

Having similar issue for lengthy tests

image

bartekpacia commented 9 months ago

I'm having a very similar issue. All I do is run maestro studio and leave it running for a few minutes. During that few minutes, I kill and re-run my Flutter app (a few times) and then this exception is thrown.

I'm not sure if it warrants its own issue since the stacktrace is pretty similar.

Crash logs ``` $ maestro studio Running on emulator-5554 ╭────────────────────────────────────────────────────────╮ │ │ │ Maestro Studio is running at http://localhost:9999 │ │ │ ╰────────────────────────────────────────────────────────╯ Tip: Maestro Studio can now run simultaneously alongside other Maestro CLI commands! Navigate to http://localhost:9999 in your browser to open Maestro Studio. Ctrl-C to exit. Exception in thread "pool-4-thread-1" java.io.IOException: Command failed (host:transport:emulator-5554): device offline at dadb.adbserver.AdbServer.send$dadb(AdbServer.kt:99) at dadb.adbserver.AdbServerDadb.open(AdbServer.kt:137) at dadb.forwarding.TcpForwarder.handleForwarding$lambda-1(TcpForwarder.kt:64) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840) maestro.MaestroException$DriverTimeout: Android driver unreachable at maestro.drivers.AndroidDriver.runDeviceCall(AndroidDriver.kt:933) at maestro.drivers.AndroidDriver.deviceInfo(AndroidDriver.kt:154) at maestro.ViewHierarchy$Companion.from-c1iYVAs(ViewHierarchy.kt:28) at maestro.Maestro.viewHierarchy-prqvCes(Maestro.kt:412) at maestro.studio.DeviceService.getDeviceScreen(DeviceService.kt:172) at maestro.studio.DeviceService.access$getDeviceScreen(DeviceService.kt:43) at maestro.studio.DeviceService$routes$3$1.invokeSuspend(DeviceService.kt:82) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) ```
Environment MacBook Air M1, macOS Sonoma Android emulator version 33.1.13.0 (build_id 10332831) OS image: `system-images;android-31;google_apis;arm64-v8a`, revision 11 Maestro 1.34.1
Fishbowler commented 3 weeks ago

Not seeing this on Android SDK 33. Seeing it often in SDK 34+. Unsure why that would make a difference though 🤔