maestro
maestro copied to clipboard
Error when trying to run iOS test
I followed the install directions and have a simulator running with idb_companion but i get the following error when running maestro test test_flow.yaml
. Originally I was getting an error about missing java so i installed that with brew.
java.lang.IllegalStateException: No devices found. Select a platform by passing --platform <android|ios> for more details
at maestro.cli.util.MaestroFactory.autoDetectPlatform(MaestroFactory.kt:78)
at maestro.cli.util.MaestroFactory.createMaestro(MaestroFactory.kt:34)
at maestro.cli.command.TestCommand.call(TestCommand.kt:58)
at maestro.cli.command.TestCommand.call(TestCommand.kt:30)
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 picocli.CommandLine.execute(CommandLine.java:2058)
at maestro.cli.AppKt.main(App.kt:94)
and this is my test_flow.yaml
file.
AppId: com.reactjs.native.Versd-Dev
---
- launchApp
- tapOn: "Text on the screen"
Actually when i run maestro test test_flow.yaml
it causes idb_companion to crash with the following error:
IDB Companion Built at Aug 12 2022 08:41:50
IDB Companion architecture arm64
Providing targets across Simulator and Device sets.
CoreSimulator: Loading from /Library/Developer/PrivateFrameworks/CoreSimulator.framework
CoreSimulator: Successfully loaded
CoreSimulator: SimDevice has correct path of /Library/Developer
AccessibilityPlatformTranslation: Already loaded, skipping
AccessibilityPlatformTranslation: AXPTranslationObject has correct path of /System/Library
Loaded All Private Frameworks [CoreSimulator, AccessibilityPlatformTranslation]
MobileDevice: Loading from /System/Library/PrivateFrameworks/MobileDevice.framework
MobileDevice: Successfully loaded
Loaded All Private Frameworks [MobileDevice]
[framework_loader] MobileDevice: Loading from /System/Library/PrivateFrameworks/MobileDevice.framework
[framework_loader] MobileDevice: Successfully loaded
[framework_loader] Loaded All Private Frameworks [MobileDevice]
Oct 15 19:00:53 idb_companion[16380] <Notice>: _SubscribeForMuxNotifications (thread 0x10299fd40): returned 0x0.
Starting swift server on tcp port 10882
Swift server started on [IPv6]::/:::10882
{"grpc_swift_port":10882,"grpc_port":10882}
Companion will stay alive if target goes offline
Start of describe
dyld: lazy symbol binding failed: can't resolve symbol _$sScCMa in /opt/homebrew/Cellar/idb-companion/1.1.8/bin/../Frameworks/IDBGRPCSwift.framework/Versions/A/IDBGRPCSwift because dependent dylib @rpath/libswift_Concurrency.dylib could not be loaded
dyld: can't resolve symbol _$sScCMa in /opt/homebrew/Cellar/idb-companion/1.1.8/bin/../Frameworks/IDBGRPCSwift.framework/Versions/A/IDBGRPCSwift because dependent dylib @rpath/libswift_Concurrency.dylib could not be loaded
Abort trap: 6
@matthewmturner out of curiosity are you using idb_companion
to connect to a simulator or real device?
I'm toying with maestro and have only used sims for the time being which connect + launch the tests successfully. (I say "launch" because that part is true, but actually performing the test steps for me is a different story 😅 ... "
@matthewmturner out of curiosity are you using
idb_companion
to connect to a simulator or real device?I'm toying with maestro and have only used sims for the time being which connect + launch the tests successfully. (I say "launch" because that part is true, but actually performing the test steps for me is a different story 😅 ... "
I'm connecting to simulator although I confess I had never used idb_companion before this so maybe I've done something wrong
I'm having a similar issue, no matter if it's a sim or device 🙏
maestro --platform ios test flow.yaml
com.github.michaelbull.result.UnwrapException: kotlin.Unit io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
at maestro.drivers.IOSDriver.open(IOSDriver.kt:50)
at maestro.Maestro$Companion.ios(Maestro.kt:401)
at maestro.Maestro$Companion.ios(Maestro.kt:396)
at maestro.cli.util.MaestroFactory.createIos(MaestroFactory.kt:68)
at maestro.cli.util.MaestroFactory.createMaestro(MaestroFactory.kt:39)
at maestro.cli.command.TestCommand.call(TestCommand.kt:58)
at maestro.cli.command.TestCommand.call(TestCommand.kt:30)
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 picocli.CommandLine.execute(CommandLine.java:2058)
at maestro.cli.AppKt.main(App.kt:94)
meh, ignore me, I forgot to idb_companion --udid {id of the iOS device}
😢
@matthewmturner perhaps use a simple example to confirm it's all working and go from there
For my experiment, I used:
- maestro v1.9.0
- iOS simulator v14
- Xcode 14.0.1
- app under test was iMessage
appId: com.apple.MobileSMS
---
- launchApp
I am a bit confused how to run the app, My starting flow is not working. I am having this app downloaded on my simulator. But it can not trigger it to start. Android works fine when it gets the apk.
- you need to have idb_companion installed on your computer
- run
idb list-targets
to find the id of the started simulator ( needs to be in booted state) - run
idb_companion --udid {id of the iOS device}
with the id you just found - in another terminal run
maestro test test_flow.yaml
(or whatever your test file is named)
Hope it helps :)
I have an issue where this exact crash happening. I figure it out that it was crashing in a iOS 16 SIM (isn't supported yet https://maestro.mobile.dev/troubleshooting/known-issues) So check that versions are < iOS 16
BTW I've downloaded python 3 using the web: https://www.python.org/downloads/

Followed the instructions from https://github.com/facebook/idb to get the UUID of the device (although you can find them using the organiser) but I used the pip 3.10 version instead.
pip3.10 install fb-idb
the issue with ios 16 seems to be on the idb
side https://maestro.mobile.dev/troubleshooting/known-issues
@phynet TLDR - iOS 16 is not yet supported using maestro (view the known issues link above)
Also noting that this comment chain is starting to drift off. @matthewmturner hope idb_companion
is treating you well now 🤞
@rborn @alexandlazaris Oops, then is my bad. Sorry for add noise to this channel.
@alexandlazaris thanks for the details. using the minimal test i still have the same issue. i use the following:
- maestro v1.10.1
- iOS Simulator Running iPhone 12 Pro on iOS 14.4
- XCode 13.2.1
- App under test was iMessage (using same test file you provided)
I have also a crash on iOS when I try to launch a test with maestro. It works on Android
My config
- Macbook Pro MacOS Monterey 12.5.1 with M1 Pro chip
- maestro v1.11.3
- iOS Simulator Running iPhone 13 on iOS 15.5
- XCode 13.4.1
What I did
- in a terminal launched
idb_companion --udid UDID_OF_MY_PHONE
- in another terminal window launched
maestro test ios-flow.yaml
- maestro is able to launch the app through my simulator, I can see the splashscreen
- the app crashes just after the splashscreen and I see a weird message in my terminal, the idb_companion stop running
2022-11-01 19:34:37.864+0100 Signalled: SIGTERM
2022-11-01 19:34:37.864+0100 Successfully removed temporal directory: file:///var/folders/q_/jsxfktlj52j6v5s6l5mj1y240000gn/T/IDB/61B7050A-FE8E-4CA1-BB85-E25F6330337E
2022-11-01 19:34:37.947+0100 Responding to termination of idb with signo 15
In the simulator I see this error message
@alexCoding42 this message shows usually when you you don't have metro started
@rborn yes now when I start the metro bundler I don't see this error, but I still face a crash of idb companion when trying to run maestro test ios-flow.yaml
Right after the launchApp
step idb companion stops running and my test fails
It seems there is an ongoing issue that is being investigated for iOS. I just spoke with some people on the Slack channel, so I guess we just have to wait :)
https://mobile-dev-inc.slack.com/archives/C041FU72T54/p1666866408069079
I had to upgrade my Xcode to 14 to resolve the issue that i originally reported.
@alexCoding42 - were you able to make any progress on that issue? I'm facing the same thing
@TomasBarry I reached the support on the Slack channel of mobile-dev there is an ongoing conversation about it: https://mobile-dev-inc.slack.com/archives/C041FU72T54/p1667904287117889?thread_ts=1666866408.069079&cid=C041FU72T54
When I installed the head version of maestro then uninstalled it and reinstalled maestro latest stable release I was able to run my tests on iOS, weird but it seems to work now.
They are doing some fixes that should be release soon
I have also a crash on iOS when I try to launch a test with maestro. It works on Android
My config
- Macbook Pro MacOS Monterey 12.5.1 with M1 Pro chip
- maestro v1.11.3
- iOS Simulator Running iPhone 13 on iOS 15.5
- XCode 13.4.1
What I did
- in a terminal launched
idb_companion --udid UDID_OF_MY_PHONE
- in another terminal window launched
maestro test ios-flow.yaml
- maestro is able to launch the app through my simulator, I can see the splashscreen
- the app crashes just after the splashscreen and I see a weird message in my terminal, the idb_companion stop running
2022-11-01 19:34:37.864+0100 Signalled: SIGTERM 2022-11-01 19:34:37.864+0100 Successfully removed temporal directory: file:///var/folders/q_/jsxfktlj52j6v5s6l5mj1y240000gn/T/IDB/61B7050A-FE8E-4CA1-BB85-E25F6330337E 2022-11-01 19:34:37.947+0100 Responding to termination of idb with signo 15
In the simulator I see this error message
Please Use npx react-native start on ur project
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!