Open pezzeonline opened 1 year ago
With my Macbook Pro(M1 Pro) currently - I have an issue with connecting physical devices but with the emulator, it's working.
Previously(before a few months) it's worked for me on my old Macbook Air(M1) with the device as well.
Personally, I don't think it's M1 - maybe some configuration or something similar. If anyone has an idea to get this fixed it would be very much helpful.
Personally, I don't think it's M1 - maybe some configuration or something similar. If anyone has an idea to get this fixed it would be very much helpful.
Exactly, I've used maestro on m1 months ago and it worked. Now it seems not working anymore even if I try old releases.
This indeed doesn't seem related to M1 MacBooks, because I use Maestro (test and studio) daily on an M1.
@pezzeonline can you check if there is some process running on 7001
port that would block the connection?
This indeed doesn't seem related to M1 MacBooks, because I use Maestro (test and studio) daily on an M1.
@pezzeonline can you check if there is some process running on
7001
port that would block the connection?
Tested and no process on 7001 port. I thought it was an M1 problem because I have the same error on 2 Mac M1 but it works on Intel.
The first time I execute maestro the error is:
➜ server git:(develop) ✗ maestro studio
Running on 968c6a2b0506
java.io.IOException: pm list packages --user 0 dev.mobile.maestro.test
at maestro.drivers.AndroidDriver.shell(AndroidDriver.kt:773)
at maestro.drivers.AndroidDriver.isPackageInstalled(AndroidDriver.kt:761)
at maestro.drivers.AndroidDriver.uninstallMaestroApks(AndroidDriver.kt:736)
at maestro.drivers.AndroidDriver.open(AndroidDriver.kt:90)
at maestro.Maestro$Companion.android(Maestro.kt:534)
at maestro.cli.session.MaestroSessionManager.createAndroid(MaestroSessionManager.kt:270)
at maestro.cli.session.MaestroSessionManager.createMaestro(MaestroSessionManager.kt:151)
at maestro.cli.session.MaestroSessionManager.access$createMaestro(MaestroSessionManager.kt:49)
at maestro.cli.session.MaestroSessionManager$newSession$session$1.invoke(MaestroSessionManager.kt:81)
at maestro.cli.session.MaestroSessionManager$newSession$session$1.invoke(MaestroSessionManager.kt:80)
at maestro.cli.db.KeyValueStore.withExclusiveLock(KeyValueStore.kt:37)
at maestro.cli.session.SessionStore.withExclusiveLock(SessionStore.kt:74)
at maestro.cli.session.MaestroSessionManager.newSession(MaestroSessionManager.kt:80)
at maestro.cli.command.StudioCommand.call(StudioCommand.kt:36)
at maestro.cli.command.StudioCommand.call(StudioCommand.kt:18)
at picocli.CommandLine.executeUserObject(CommandLine.java:1933)
at picocli.CommandLine.access$1200(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2332)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2326)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2291)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2159)
at maestro.cli.DisableAnsiMixin$Companion.executionStrategy(DisableAnsiMixin.kt:22)
at picocli.CommandLine.execute(CommandLine.java:2058)
at maestro.cli.AppKt.main(App.kt:125)
Caused by: java.io.IOException: Command failed (shell,v2,raw:pm list packages --user 0 dev.mobile.maestro.test): closed
at dadb.adbserver.AdbServer.send$dadb(AdbServer.kt:99)
at dadb.adbserver.AdbServerDadb.open(AdbServer.kt:138)
at dadb.Dadb$DefaultImpls.openShell(Dadb.kt:43)
at dadb.adbserver.AdbServerDadb.openShell(AdbServer.kt:118)
at dadb.Dadb$DefaultImpls.shell(Dadb.kt:36)
at dadb.adbserver.AdbServerDadb.shell(AdbServer.kt:118)
at maestro.drivers.AndroidDriver.shell(AndroidDriver.kt:771)
And the second time is the error I've attached before.
Heads up - Just updated the title of this issue as it seems to not be related specifically to M1s
@pezzeonline : I am having the same problem on intel #1089, did you manage to solve the problem?
The version I tried is 1.28.0.
Unfortunatelly not. I've tried a lot of different versions without success.
@pezzeonline : Even if I try to run the maestro bugreport command, it gives me no information.
@Leland-Takamine, @ArthurSav , @axelniklasson : Can you tell us what this could be due to?
From what we know so far it doesn't depend on the maestro version or even on the Intel/M1 version.
I am also experiencing this issue, out of the blue, with the latest version on Android only. It was working and then it stopped working. I have tried different emulators. Neither maestro studio nor maestro test are working. maestro bugreport generates an empty file. There are no processes running on port 7001.
I just quit the terminal and launched it again and it started working...
@MartaGalve : Did you install via brew or curl?
Using curl @Angelk90
@MartaGalve : Is it currently working for you?
Does it happen to you that it gets stuck, it says Running on ....
?
Then close and run the command again and then it works?
I just quit the terminal and launched it again and it started working...
This also seemed to fix the issue for me, yet I got the io exception when trying to run the tests and launching the app.
My app id starts with io.xyz
which also might be related.
When changing the appId
in the flow.yaml
file to com.xyz
I all of a sudden got a different error when trying to run the tests- the error stated that the app was not installed.
(Un)fortunately, I can not reproduce it anymore
@Angelk90 since I relaunched the terminal I have had no issues.
I've been facing similar issues for some time now around android drive & grpc, this is really stumping our android CI as we can't just quit and restart.
This issue does seem similar to what I've found with the below issues, I believe all of these above are related to theio.grpc.StatusRuntimeException
.
Below are what I've found to be all related in order of when I first found them:
I've also noticed an android alert displays "System UI isn't responding" & also a secondary alert "Process system isn't responding" sometimes occur on the emulator/physical device when this grpc exception is thrown. Sometimes the android alert message doesn't show and the device become unresponsive, then suddenly become responsive after some time.
There is some issues raised around this grpc issue here also https://github.com/grpc/grpc-java/issues/10120
I'm on an Apple MacBook Pro M2 Max.
Hopefully these breadcrumbs might help solve this.
last post is 100% on right path. This is about the gRPC stream between device and AndroidDriver
I noticed this on devices that had problem on RPC port, or low memory devices, or when I was working on Sharding feature involving the RPC port.
I think we need a stream handler that keeps the RPC connection active like a heartbeat function, constantly checking the connection in a safe way and gracefully reconnect when something interrupts it or times it out.
I genuinely think the flakes are caused by this.
@Leland-Takamine you can reproduce this by running many maestro instances until you run out of memory, and one of them will give up early and result in interrupting the gRPC stream causing this io exception.
I think this is exactly the problem - I might look into it after sharding is merged. 100% stable sessions would be great
I used Maestro in the past but since some months Maestro is not longer working on more than one Macbook with ARM M1.
Test already done without success:
Maestro is working only on emulator.
Here it is a log of maestro studio (but it is the same with maestro test):