maestro icon indicating copy to clipboard operation
maestro copied to clipboard

dadb.AdbStreamClosed Exception after first test run

Open F-Goncalves opened this issue 2 years ago • 7 comments

Hi, whenever I run maestro test I can only run it once successfully. Every consecutive run fails with a dadb.AdbStreamClosed Exception. Only restarting the Android Emulator solves this. But every second time I run the test the same exception occurs.

Exception in thread "pool-2-thread-1" dadb.AdbStreamClosed: ADB stream is closed for localId: 543f194d at dadb.MessageQueue.poll(MessageQueue.kt:76) at dadb.MessageQueue.take(MessageQueue.kt:37) at dadb.AdbConnection.open(AdbConnection.kt:48) at dadb.DadbImpl.open(DadbImpl.kt:31) 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)

Any advice on how to solve this?

F-Goncalves avatar Sep 20 '22 07:09 F-Goncalves

This is just a guess, but do you perhaps run maestro hierarchy during the test?

dmitry-zaitsev avatar Sep 20 '22 08:09 dmitry-zaitsev

No I didn't. I didn't even know about that command when I encountered this exception.

F-Goncalves avatar Sep 20 '22 09:09 F-Goncalves

What kind of emulator are you using? API version, with/without Google Play, what "device" model, etc.

dmitry-zaitsev avatar Sep 20 '22 09:09 dmitry-zaitsev

Pixel 3a API 32 arm64-v8a with Google Play

Could an IDE that was previously debugging on the same emulator be an issue?

F-Goncalves avatar Sep 20 '22 09:09 F-Goncalves

Unlikely, but it could be related to the fact that this is an ARM emulator or the fact that this is API 32. If you could try the following, it would be a great help:

  • Check if a new emulator with the same exact configuration works
  • If not, does API 30 work?

dmitry-zaitsev avatar Sep 20 '22 09:09 dmitry-zaitsev

the same problem here, i'm using Pixel 3a API 33 arm64-v8a

alucardeht avatar Oct 27 '22 14:10 alucardeht

Unlikely, but it could be related to the fact that this is an ARM emulator or the fact that this is API 32. If you could try the following, it would be a great help:

  • Check if a new emulator with the same exact configuration works
  • If not, does API 30 work?

i created one using API 30 and it works

alucardeht avatar Oct 27 '22 14:10 alucardeht

Assuming that this was resolved, otherwise please reopen the issue

dmitry-zaitsev avatar Nov 15 '22 10:11 dmitry-zaitsev

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue. Thank you for helping keep us our issue tracker clean!

github-actions[bot] avatar Jul 11 '24 17:07 github-actions[bot]