Closed aakash1313 closed 1 year ago
Is idb_companion running?
Yes the idb_companion was running and randomly it stopped worked and i got the crash on the terminal .
@aakash1313 I've updated the title and description to match with your finding that the iOS version caused this error. What iOS version did you use to get this error?
@berikv : It failed on iOS 16
the same happened to me
i have used the example from you docs
appId: com.apple.MobileAddressBook
---
- launchApp
- tapOn: "John Appleseed"
- tapOn: "Edit"
- tapOn: "Add phone"
- inputText: "123123"
- tapOn: "Done"
- assertVisible: "message"
the error I have got
com.github.michaelbull.result.UnwrapException: kotlin.Unit io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
at maestro.drivers.IOSDriver.contentDescriptor(IOSDriver.kt:155)
at maestro.ViewHierarchy$Companion.from-c1iYVAs(ViewHierarchy.kt:28)
at maestro.Maestro.viewHierarchy-prqvCes(Maestro.kt:278)
at maestro.Maestro.waitForAppToSettle-prqvCes(Maestro.kt:317)
at maestro.Maestro.tap(Maestro.kt:137)
at maestro.orchestra.Orchestra.tapOnElement(Orchestra.kt:350)
at maestro.orchestra.Orchestra.executeCommand(Orchestra.kt:129)
at maestro.orchestra.Orchestra.executeCommands(Orchestra.kt:111)
at maestro.orchestra.Orchestra.runFlow(Orchestra.kt:73)
at maestro.cli.runner.MaestroCommandRunner.runCommands(MaestroCommandRunner.kt:105)
at maestro.cli.runner.TestRunner$runContinuous$watchFiles$1$2$1.invoke(TestRunner.kt:82)
at maestro.cli.runner.TestRunner$runContinuous$watchFiles$1$2$1.invoke(TestRunner.kt:81)
at maestro.cli.runner.TestRunner.runCatching(TestRunner.kt:116)
at maestro.cli.runner.TestRunner.access$runCatching(TestRunner.kt:21)
at maestro.cli.runner.TestRunner$runContinuous$watchFiles$1$2.invoke(TestRunner.kt:81)
at maestro.cli.runner.TestRunner$runContinuous$watchFiles$1$2.invoke(TestRunner.kt:69)
at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)
here is the idb log:
2022-10-18 18:04:30.158 idb_companion[23417:8819027] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (NSConcreteAttributedString)'
*** First throw call stack:
(
0 CoreFoundation 0x00000001abd65148 __exceptionPreprocess + 240
1 libobjc.A.dylib 0x00000001abaafe04 objc_exception_throw + 60
2 Foundation 0x00000001acc1ca9c _writeJSONValue + 836
3 Foundation 0x00000001acc1d420 ___writeJSONObject_block_invoke + 388
4 CoreFoundation 0x00000001abca74e0 __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 24
5 CoreFoundation 0x00000001abce6db8 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 212
6 Foundation 0x00000001acc1ccf8 _writeJSONObject + 524
7 Foundation 0x00000001acdf8ba0 -[_NSJSONWriter dataWithRootObject:options:] + 88
8 Foundation 0x00000001acc1c620 +[NSJSONSerialization dataWithJSONObject:options:error:] + 120
9 idb_companion 0x000000010009d4f4 $s13idb_companion30AccessibilityInfoMethodHandlerV6handle7request7context12IDBGRPCSwift04Idb_cD8ResponseVAG0k1_cD7RequestV_4GRPC26GRPCAsyncServerCallContextVtYaKFTQ0_ + 156
10 idb_companion 0x00000001000d84f1 $s13idb_companion24CompanionServiceProviderC18accessibility_info7request7context12IDBGRPCSwift29Idb_AccessibilityInfoResponseVAG0k1_lM7RequestV_4GRPC26GRPCAsyncServerCallContextVtYaKFAIyYaYbKXEfU_TQ0_ + 1
11 idb_companion 0x00000001000d83d1 $s13idb_companion24CompanionServiceProviderC18accessibility_info7request7context12IDBGRPCSwift29Idb_AccessibilityInfoResponseVAG0k1_lM7RequestV_4GRPC26GRPCAsyncServerCallContextVtYaKFAIyYaYbKXEfU_TATQ0_ + 1
12 libswift_Concurrency.dylib 0x000000022c439151 $ss9TaskLocalC9withValue_9operation4file4lineqd__x_qd__yYaKXESSSutYaKlFTQ0_ + 1
13 IDBCompanionUtilities 0x000000010028d781 $s21IDBCompanionUtilities17FBTeardownContextC15withAutocleanup8function4file4line6column9operationxSS_SSS2ixyYaYbKXEtYaKlFZTQ0_ + 1
14 idb_companion 0x00000001000d8321 $s13idb_companion24CompanionServiceProviderC18accessibility_info7request7context12IDBGRPCSwift29Idb_AccessibilityInfoResponseVAG0k1_lM7RequestV_4GRPC26GRPCAsyncServerCallContextVtYaKFTQ0_ + 1
15 idb_companion 0x00000001000d84e5 $s13idb_companion24CompanionServiceProviderC12IDBGRPCSwift04Idb_cd5AsyncE0AadEP18accessibility_info7request7contextAD0G26_AccessibilityInfoResponseVAD0g1_mN7RequestV_4GRPC26GRPCAsyncServerCallContextVtYaYbKFTWTQ0_ + 1
16 IDBGRPCSwift 0x0000000104501ce1 $s12IDBGRPCSwift33Idb_CompanionServiceAsyncProviderPAAE6handle6method7context4GRPC25GRPCServerHandlerProtocol_pSgSs_AG04CallL7ContextVtFAA0B26_AccessibilityInfoResponseVAA0b1_pQ7RequestV_AG015GRPCAsyncServernO0VtYaYbKcxcfu24_AmO_AQtYaYbKcfu25_TQ0_ + 1
17 IDBGRPCSwift 0x00000001045012e5 $s12IDBGRPCSwift33Idb_CompanionServiceAsyncProviderPAAE6handle6method7context4GRPC25GRPCServerHandlerProtocol_pSgSs_AG04CallL7ContextVtFAA0B26_AccessibilityInfoResponseVAA0b1_pQ7RequestV_AG015GRPCAsyncServernO0VtYaYbKcxcfu24_AmO_AQtYaYbKcfu25_TATQ0_ + 1
18 IDBGRPCSwift 0x0000000104500ee1 $s12IDBGRPCSwift28Idb_AccessibilityInfoRequestV4GRPC26GRPCAsyncServerCallContextVAA0b1_cD8ResponseVs5Error_pIeghHgnozo_AcfHsAI_pIeghHnnrzo_TRTQ0_ + 1
19 IDBGRPCSwift 0x00000001045015c1 $s12IDBGRPCSwift28Idb_AccessibilityInfoRequestV4GRPC26GRPCAsyncServerCallContextVAA0b1_cD8ResponseVs5Error_pIeghHgnozo_AcfHsAI_pIeghHnnrzo_TRTATQ0_ + 1
20 IDBGRPCSwift 0x0000000104473ce1 $s4GRPC22GRPCAsyncServerHandlerV7context19requestDeserializer18responseSerializer12interceptors8wrappingACyxq_q0_q1_GAA04CallD7ContextV_q_xSayAA0C11InterceptorCyq0_q1_GGq1_q0__AA0bclM0VtYaYbKctcfcyAA0B13RequestStreamVyq0_G_AA0b8ResponseP6WriterVyq1_GAQtYaYbKcfU_AA08ProtobufI0Vy12IDBGRPCSwift021Idb_AccessibilityInfoQ0VG_AA0sG0VyAZ0u1_vwO0VGA5_A0_Tg5TQ2_ + 1
21 IDBGRPCSwift 0x00000001045015c5 $s4GRPC22GRPCAsyncServerHandlerV7context19requestDeserializer18responseSerializer12interceptors8wrappingACyxq_q0_q1_GAA04CallD7ContextV_q_xSayAA0C11InterceptorCyq0_q1_GGq1_q0__AA0bclM0VtYaYbKctcfcyAA0B13RequestStreamVyq0_G_AA0b8ResponseP6WriterVyq1_GAQtYaYbKcfU_AA08ProtobufI0Vy12IDBGRPCSwift021Idb_AccessibilityInfoQ0VG_AA0sG0VyAZ0u1_vwO0VGA5_A0_Tg5TATQ0_ + 1
22 IDBGRPCSwift 0x0000000104517b51 $s4GRPC18AsyncServerHandlerC010invokeUserD019requestStreamSource08responseH6Writer11callContextyAA018PassthroughMessageI0Cyq0_s5Error_pG_AA0bK0CyAA0b8ResponsehK8DelegateCyq1_GGAA09GRPCAsyncc4CallM0VtYaYbKFTQ0_ + 1
23 IDBGRPCSwift 0x00000001045018cd $s4GRPC18AsyncServerHandlerC26receiveInterceptedMetadatayy8NIOHPACK12HPACKHeadersVFyyYaYbKcfU0_AA18ProtobufSerializerVy12IDBGRPCSwift29Idb_AccessibilityInfoResponseVG_AA0J12DeserializerVyAJ0m1_nO7RequestVGAqLTg5TQ0_ + 1
24 IDBGRPCSwift 0x0000000104501639 $s4GRPC18AsyncServerHandlerC26receiveInterceptedMetadatayy8NIOHPACK12HPACKHeadersVFyyYaYbKcfU0_AA18ProtobufSerializerVy12IDBGRPCSwift29Idb_AccessibilityInfoResponseVG_AA0J12DeserializerVyAJ0m1_nO7RequestVGAqLTg5TATQ0_ + 1
25 IDBGRPCSwift 0x00000001044a0f6d $s7NIOCore16EventLoopPromiseV16completeWithTaskyScTyyts5NeverOGxyYaYbKcFyyYaYbcfU_yt_Tgq5TQ0_ + 1
26 IDBGRPCSwift 0x00000001044e6909 $s7NIOCore16EventLoopPromiseV16completeWithTaskyScTyyts5NeverOGxyYaYbKcFyyYaYbcfU_yt_Tgq5TATQ0_ + 1
27 IDBGRPCSwift 0x00000001044a1069 $sxIeghHr_xs5Error_pIegHrzo_s8SendableRzs5NeverORs_r0_lTRyt_Tgq5TQ0_ + 1
28 IDBGRPCSwift 0x00000001045015e5 $sxIeghHr_xs5Error_pIegHrzo_s8SendableRzs5NeverORs_r0_lTRyt_Tgq5TATQ0_ + 1
29 libswift_Concurrency.dylib 0x000000022c45bea1 _ZL23completeTaskWithClosurePN5swift12AsyncContextEPNS_10SwiftErrorE + 1
)
libc++abi: terminating with uncaught exception of type NSException
zsh: abort idb_companion --udid D81944D0-6F57-457E-819A-7E5F7FF15B18
Any solutions to this issue ?
Hi @oguzparlak, thanks for the reminder. I tested the addressbook app flow locally on 3 different iOS 16 simulators and a iOS 15 simulator. I could not reproduce the issue.
@aakash1313 can you share the output of:
idb_companion --version
maestro --version
Is it possible to take a screenshot of the maestro output? I'm interested in which step it failed.
Here is the case:
I have a UITabBarItem with accessibility identifier: "search_tab_item"
I can successfully tap on the item, but as soon as it taps it throws the error.
Steps:
Run IDB on an iOS 16 simulator like so:
idb_companion --udid 010EADBC-2D1A-4CA7-9B7E-E55D7F0684FA
Output:
IDB Companion Built at Aug 12 2022 08:41:50
IDB Companion architecture arm64
Invoked with args=[/opt/homebrew/bin/idb_companion, --udid, 010EADBC-2D1A-4CA7-9B7E-E55D7F0684FA] env={rvm_bin_path => /Users/oguzparlak/.rvm/bin, RUBY_VERSION => ruby-3.0.0, OLDPWD => /Users/oguzparlak/Desktop/iOS/bubilet.ios/BubiletUITests, SSH_AUTH_SOCK => /private/tmp/com.apple.launchd.bpa6kh2CUf/Listeners, SHELL => /bin/zsh, rvm_path => /Users/oguzparlak/.rvm, XPC_SERVICE_NAME => 0, __CFBundleIdentifier => com.apple.Terminal, GEM_HOME => /Users/oguzparlak/.rvm/gems/ruby-3.0.0, TERM_PROGRAM_VERSION => 445, HOMEBREW_REPOSITORY => /opt/homebrew, HOME => /Users/oguzparlak, PWD => /Users/oguzparlak/Desktop/iOS/bubilet.ios/BubiletUITests, TMPDIR => /var/folders/k2/w1378njn18l5w4lzjhgkgbwr0000gn/T/, SHLVL => 1, XPC_FLAGS => 0x0, PATH => /Users/oguzparlak/.rvm/gems/ruby-3.0.0/bin:/Users/oguzparlak/.rvm/gems/ruby-3.0.0@global/bin:/Users/oguzparlak/.rvm/rubies/ruby-3.0.0/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/oguzparlak/.rvm/bin:/Users/oguzparlak/.maestro/bin, TERM => xterm-256color, HOMEBREW_CELLAR => /opt/homebrew/Cellar, TERM_PROGRAM => Apple_Terminal, USER => oguzparlak, TERM_SESSION_ID => 040ABC90-DEFB-4F17-BB1F-5E09BD572489, HOMEBREW_PREFIX => /opt/homebrew, rvm_version => 1.29.12 (latest), LOGNAME => oguzparlak, INFOPATH => /opt/homebrew/share/info:, rvm_prefix => /Users/oguzparlak, _ => /opt/homebrew/bin/idb_companion, __CF_USER_TEXT_ENCODING => 0x1F5:0x0:0x0, GEM_PATH => /Users/oguzparlak/.rvm/gems/ruby-3.0.0:/Users/oguzparlak/.rvm/gems/ruby-3.0.0@global, LC_CTYPE => UTF-8, MANPATH => /opt/homebrew/share/man::, IRBRC => /Users/oguzparlak/.rvm/rubies/ruby-3.0.0/.irbrc, MY_RUBY_HOME => /Users/oguzparlak/.rvm/rubies/ruby-3.0.0}
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]
Nov 14 23:02:29 idb_companion[71488] <Notice>: _MobileDeviceLibraryInitRoutine (thread 0x102d64580): MobileDevice.framework version: 1497.1.14.100.1
Nov 14 23:02:29 idb_companion[71488] <Notice>: _AMDRemotePairingCopyFrameworkVersion_block_invoke (thread 0x102d64580): RemotePairing found at /Library/Apple/System/Library/PrivateFrameworks/RemotePairing.framework
Nov 14 23:02:29 idb_companion[71488] <Notice>: _MobileDeviceLibraryInitRoutine (thread 0x102d64580): RemotePairing.framework version: 58.2
[framework_loader] MobileDevice: Loading from /System/Library/PrivateFrameworks/MobileDevice.framework
[framework_loader] MobileDevice: Successfully loaded
[framework_loader] Loaded All Private Frameworks [MobileDevice]
Nov 14 23:02:29 idb_companion[71488] <Notice>: _SubscribeForMuxNotifications (thread 0x102d64580): returned 0x0.
Starting swift server on tcp port 10882
Swift server started on [IPv6]::/:::10882
{"grpc_port":10882,"grpc_swift_port":10882}
Companion will stay alive if target goes offline
Run test flow:
maestro test search.yaml
Test finishes successfully but as soon as it finishes, It produce this:
com.github.michaelbull.result.UnwrapException: kotlin.Unit io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason
at maestro.drivers.IOSDriver.contentDescriptor(IOSDriver.kt:157)
at maestro.ViewHierarchy$Companion.from-c1iYVAs(ViewHierarchy.kt:28)
at maestro.Maestro.viewHierarchy-prqvCes(Maestro.kt:280)
at maestro.Maestro.waitForAppToSettle-prqvCes(Maestro.kt:319)
at maestro.Maestro.tap(Maestro.kt:192)
at maestro.Maestro.tap(Maestro.kt:149)
at maestro.orchestra.Orchestra.tapOnElement(Orchestra.kt:358)
at maestro.orchestra.Orchestra.executeCommand(Orchestra.kt:133)
at maestro.orchestra.Orchestra.executeCommands(Orchestra.kt:111)
at maestro.orchestra.Orchestra.runFlow(Orchestra.kt:73)
at maestro.cli.runner.MaestroCommandRunner.runCommands(MaestroCommandRunner.kt:109)
at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:34)
at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:31)
at maestro.cli.runner.TestRunner.runCatching(TestRunner.kt:121)
at maestro.cli.runner.TestRunner.runSingle(TestRunner.kt:31)
at maestro.cli.command.TestCommand.call(TestCommand.kt:65)
at maestro.cli.command.TestCommand.call(TestCommand.kt:31)
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:100)
IDB Version:
idb_companion --version
{"build_time":"08:41:50","build_date":"Aug 12 2022"}
Maestro Version:
maestro --version
1.13.2
Yaml File Content:
# flow.yaml
appId: tr.com.bubilet.ios.debug
---
- launchApp
- tapOn:
id: "search_tab_item"
maestro hierarchy
Running on iPhone 14 Pro - iOS 16.0 - 010EADBC-2D1A-4CA7-9B7E-E55D7F0684FA
Waiting for idb service to start..
Waiting for Simulator to boot..
Waiting for Accessibility info to become available..
Simulator iPhone 14 Pro - iOS 16.0 - 010EADBC-2D1A-4CA7-9B7E-E55D7F0684FA ready
{
"attributes" : { },
"children" : [ {
"attributes" : {
"text" : "Bubilet Debug",
"bounds" : "[0,0][393,852]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"resource-id" : "",
"bounds" : "[0,53][393,97]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"bounds" : "[0,97][393,147]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "HEPSİ",
"bounds" : "[0,97][83,147]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "EĞLENCE",
"bounds" : "[83,97][191,147]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "KONSER",
"bounds" : "[191,97][291,147]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "TİYATRO",
"bounds" : "[291,97][393,147]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"bounds" : "[0,147][393,768]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"bounds" : "[0,147][393,361]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "Şehrindeki Konserler Burada!",
"bounds" : "[30,177][306,229]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "GÖZAT",
"bounds" : "[239,320][290,337]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "Manga Geliyor!",
"bounds" : "[346,177][622,203]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "BİLET AL",
"bounds" : "[546,320][607,337]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "Mekanlar",
"bounds" : "[15,361][378,380]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"bounds" : "[0,380][393,518]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "SoldOut Performance Hall",
"bounds" : "[15,478][107,507]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "IF Performance Hall Beşiktaş",
"bounds" : "[117,478][209,507]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "Hangout Cure",
"bounds" : "[219,478][311,492]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "SoldOut Performance Hall",
"bounds" : "[321,478][413,507]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "BİLET AL",
"bounds" : "[281,569][342,586]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "Öne Çıkan Konserler",
"bounds" : "[15,639][378,661]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "%10",
"bounds" : "[24,684][62,708]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "icnLiked",
"bounds" : "[152,679][186,713]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "18 Ekim Salı",
"bounds" : "[35,900][170,914]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "Gülşen Konseri",
"bounds" : "[20,930][185,964]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "Ooze Venue / İzmir",
"bounds" : "[20,969][185,982]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "199.90 TL",
"bounds" : "[20,987][98,1006]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "179.90 TL",
"bounds" : "[106,987][185,1006]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "%5",
"bounds" : "[211,684][242,708]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "icnLike",
"bounds" : "[340,679][374,713]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "19 Ekim Çarşamba",
"bounds" : "[222,900][357,914]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "Can Bonomo Konseri",
"bounds" : "[207,930][372,946]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "Harbiye Açıkhava",
"bounds" : "[207,951][372,982]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "120.90 TL",
"bounds" : "[207,987][372,1006]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "Tab Bar",
"bounds" : "[0,769][393,852]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"bounds" : "[0,0][0,0]"
},
"children" : [ ],
"enabled" : false
}, {
"attributes" : {
"text" : "1",
"bounds" : "[2,770][77,818]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "0",
"resource-id" : "search_tab_item",
"bounds" : "[81,770][155,818]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "0",
"bounds" : "[159,770][234,818]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "0",
"bounds" : "[238,770][312,818]"
},
"children" : [ ],
"enabled" : true
}, {
"attributes" : {
"text" : "0",
"bounds" : "[316,770][391,818]"
},
"children" : [ ],
"enabled" : true
} ]
}
Test finishes successfully but as soon as it finishes, It produce this ...
Does maestro produce that message? Maestro now starts idb_companion for you, so you do not have to start idb_companion yourself.
We will add a way to retrieve the idb_companion logs from maestro so that we can study them for the root cause. I'll keep you posted when its available!
I've just added logging facilities to maestro to retrieve the idb_companion logs for maestro runs. They have not been released yet, if you want to try them before the release is out, use:
brew uninstall maestro
brew install maestro-head --HEAD
To go back to stable:
brew uninstall maestro-head
brew install maestro
On the latest build, maestro will print out the directory where the idb logs can be found. They are zipped. If all of this works, please add them to this issue!
Do you mean 1.14.0 ? How can I find the logs ?
I'm getting this output while I try this:
maestro test search.yaml
com.github.michaelbull.result.UnwrapException: kotlin.Unit io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason
at maestro.drivers.IOSDriver.contentDescriptor(IOSDriver.kt:156)
at maestro.ViewHierarchy$Companion.from-c1iYVAs(ViewHierarchy.kt:28)
at maestro.Maestro.viewHierarchy-prqvCes(Maestro.kt:281)
at maestro.Maestro.waitForAppToSettle-prqvCes(Maestro.kt:320)
at maestro.Maestro.tap(Maestro.kt:195)
at maestro.Maestro.tap(Maestro.kt:152)
at maestro.orchestra.Orchestra.tapOnElement(Orchestra.kt:440)
at maestro.orchestra.Orchestra.executeCommand(Orchestra.kt:137)
at maestro.orchestra.Orchestra.executeCommands(Orchestra.kt:115)
at maestro.orchestra.Orchestra.runFlow(Orchestra.kt:77)
at maestro.cli.runner.MaestroCommandRunner.runCommands(MaestroCommandRunner.kt:109)
at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:34)
at maestro.cli.runner.TestRunner$runSingle$result$1.invoke(TestRunner.kt:31)
at maestro.cli.runner.TestRunner.runCatching(TestRunner.kt:121)
at maestro.cli.runner.TestRunner.runSingle(TestRunner.kt:31)
at maestro.cli.command.TestCommand.call(TestCommand.kt:65)
at maestro.cli.command.TestCommand.call(TestCommand.kt:31)
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:100)
There is a special homebrew tap for building maestro from source from the main branch, it's called maestro-head. You'd need to uninstall maestro to be able to install it. Another option is to wait until the next release, If needed I can do one later today.
When using maestro with debug log support, the maestro command will print out where you can find the app logs:
./maestro test ~/samples/ios-flow.yaml
Debug logs are stored in /Users/berik/Library/Logs/maestro/2022-11-17_112218
Note that the directory will be zipped before maestro finishes, to save disk space. The logs for the above run will be located in /Users/berik/Library/Logs/maestro/2022-11-17_112218.zip
Maestro 1.15.0 is released and contains the logging functionality.
Could you brew upgrade maestro
, run the maestro test
command and then finally run maestro bugreport
to find the zip file containing the debug info and send it to us?
Here is the log from idb_companion
2022-11-18 12:34:57.017 idb_companion[4118:60307] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (NSConcreteAttributedString)'
*** First throw call stack:
(
0 CoreFoundation 0x00000001ad7e5148 __exceptionPreprocess + 240
1 libobjc.A.dylib 0x00000001ad52fe04 objc_exception_throw + 60
2 Foundation 0x00000001ae69ca9c _writeJSONValue + 836
3 Foundation 0x00000001ae69d420 ___writeJSONObject_block_invoke + 388
4 CoreFoundation 0x00000001ad7274e0 __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 24
5 CoreFoundation 0x00000001ad7273f4 -[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:] + 180
6 Foundation 0x00000001ae69ccf8 _writeJSONObject + 524
7 Foundation 0x00000001ae6c1bb8 ___writeJSONArray_block_invoke + 260
8 CoreFoundation 0x00000001ad757e14 __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 24
9 CoreFoundation 0x00000001ad757c9c -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 196
10 Foundation 0x00000001ae6c19e8 _writeJSONArray + 356
11 Foundation 0x00000001ae878ba0 -[_NSJSONWriter dataWithRootObject:options:] + 88
12 Foundation 0x00000001ae69c620 +[NSJSONSerialization dataWithJSONObject:options:error:] + 120
13 idb_companion 0x00000001023e94f4 $s13idb_companion30AccessibilityInfoMethodHandlerV6handle7request7context12IDBGRPCSwift04Idb_cD8ResponseVAG0k1_cD7RequestV_4GRPC26GRPCAsyncServerCallContextVtYaKFTQ0_ + 156
14 idb_companion 0x00000001024244f1 $s13idb_companion24CompanionServiceProviderC18accessibility_info7request7context12IDBGRPCSwift29Idb_AccessibilityInfoResponseVAG0k1_lM7RequestV_4GRPC26GRPCAsyncServerCallContextVtYaKFAIyYaYbKXEfU_TQ0_ + 1
15 idb_companion 0x00000001024243d1 $s13idb_companion24CompanionServiceProviderC18accessibility_info7request7context12IDBGRPCSwift29Idb_AccessibilityInfoResponseVAG0k1_lM7RequestV_4GRPC26GRPCAsyncServerCallContextVtYaKFAIyYaYbKXEfU_TATQ0_ + 1
16 libswift_Concurrency.dylib 0x000000022deb9151 $ss9TaskLocalC9withValue_9operation4file4lineqd__x_qd__yYaKXESSSutYaKlFTQ0_ + 1
17 IDBCompanionUtilities 0x0000000102941781 $s21IDBCompanionUtilities17FBTeardownContextC15withAutocleanup8function4file4line6column9operationxSS_SSS2ixyYaYbKXEtYaKlFZTQ0_ + 1
18 idb_companion 0x0000000102424321 $s13idb_companion24CompanionServiceProviderC18accessibility_info7request7context12IDBGRPCSwift29Idb_AccessibilityInfoResponseVAG0k1_lM7RequestV_4GRPC26GRPCAsyncServerCallContextVtYaKFTQ0_ + 1
19 idb_companion 0x00000001024244e5 $s13idb_companion24CompanionServiceProviderC12IDBGRPCSwift04Idb_cd5AsyncE0AadEP18accessibility_info7request7contextAD0G26_AccessibilityInfoResponseVAD0g1_mN7RequestV_4GRPC26GRPCAsyncServerCallContextVtYaYbKFTWTQ0_ + 1
20 IDBGRPCSwift 0x00000001069a5ce1 $s12IDBGRPCSwift33Idb_CompanionServiceAsyncProviderPAAE6handle6method7context4GRPC25GRPCServerHandlerProtocol_pSgSs_AG04CallL7ContextVtFAA0B26_AccessibilityInfoResponseVAA0b1_pQ7RequestV_AG015GRPCAsyncServernO0VtYaYbKcxcfu24_AmO_AQtYaYbKcfu25_TQ0_ + 1
21 IDBGRPCSwift 0x00000001069a52e5 $s12IDBGRPCSwift33Idb_CompanionServiceAsyncProviderPAAE6handle6method7context4GRPC25GRPCServerHandlerProtocol_pSgSs_AG04CallL7ContextVtFAA0B26_AccessibilityInfoResponseVAA0b1_pQ7RequestV_AG015GRPCAsyncServernO0VtYaYbKcxcfu24_AmO_AQtYaYbKcfu25_TATQ0_ + 1
22 IDBGRPCSwift 0x00000001069a4ee1 $s12IDBGRPCSwift28Idb_AccessibilityInfoRequestV4GRPC26GRPCAsyncServerCallContextVAA0b1_cD8ResponseVs5Error_pIeghHgnozo_AcfHsAI_pIeghHnnrzo_TRTQ0_ + 1
23 IDBGRPCSwift 0x00000001069a55c1 $s12IDBGRPCSwift28Idb_AccessibilityInfoRequestV4GRPC26GRPCAsyncServerCallContextVAA0b1_cD8ResponseVs5Error_pIeghHgnozo_AcfHsAI_pIeghHnnrzo_TRTATQ0_ + 1
24 IDBGRPCSwift 0x0000000106917ce1 $s4GRPC22GRPCAsyncServerHandlerV7context19requestDeserializer18responseSerializer12interceptors8wrappingACyxq_q0_q1_GAA04CallD7ContextV_q_xSayAA0C11InterceptorCyq0_q1_GGq1_q0__AA0bclM0VtYaYbKctcfcyAA0B13RequestStreamVyq0_G_AA0b8ResponseP6WriterVyq1_GAQtYaYbKcfU_AA08ProtobufI0Vy12IDBGRPCSwift021Idb_AccessibilityInfoQ0VG_AA0sG0VyAZ0u1_vwO0VGA5_A0_Tg5TQ2_ + 1
25 IDBGRPCSwift 0x00000001069a55c5 $s4GRPC22GRPCAsyncServerHandlerV7context19requestDeserializer18responseSerializer12interceptors8wrappingACyxq_q0_q1_GAA04CallD7ContextV_q_xSayAA0C11InterceptorCyq0_q1_GGq1_q0__AA0bclM0VtYaYbKctcfcyAA0B13RequestStreamVyq0_G_AA0b8ResponseP6WriterVyq1_GAQtYaYbKcfU_AA08ProtobufI0Vy12IDBGRPCSwift021Idb_AccessibilityInfoQ0VG_AA0sG0VyAZ0u1_vwO0VGA5_A0_Tg5TATQ0_ + 1
26 IDBGRPCSwift 0x00000001069bbb51 $s4GRPC18AsyncServerHandlerC010invokeUserD019requestStreamSource08responseH6Writer11callContextyAA018PassthroughMessageI0Cyq0_s5Error_pG_AA0bK0CyAA0b8ResponsehK8DelegateCyq1_GGAA09GRPCAsyncc4CallM0VtYaYbKFTQ0_ + 1
27 IDBGRPCSwift 0x00000001069a58cd $s4GRPC18AsyncServerHandlerC26receiveInterceptedMetadatayy8NIOHPACK12HPACKHeadersVFyyYaYbKcfU0_AA18ProtobufSerializerVy12IDBGRPCSwift29Idb_AccessibilityInfoResponseVG_AA0J12DeserializerVyAJ0m1_nO7RequestVGAqLTg5TQ0_ + 1
28 IDBGRPCSwift 0x00000001069a5639 $s4GRPC18AsyncServerHandlerC26receiveInterceptedMetadatayy8NIOHPACK12HPACKHeadersVFyyYaYbKcfU0_AA18ProtobufSerializerVy12IDBGRPCSwift29Idb_AccessibilityInfoResponseVG_AA0J12DeserializerVyAJ0m1_nO7RequestVGAqLTg5TATQ0_ + 1
29 IDBGRPCSwift 0x0000000106944f6d $s7NIOCore16EventLoopPromiseV16completeWithTaskyScTyyts5NeverOGxyYaYbKcFyyYaYbcfU_yt_Tgq5TQ0_ + 1
30 IDBGRPCSwift 0x000000010698a909 $s7NIOCore16EventLoopPromiseV16completeWithTaskyScTyyts5NeverOGxyYaYbKcFyyYaYbcfU_yt_Tgq5TATQ0_ + 1
31 IDBGRPCSwift 0x0000000106945069 $sxIeghHr_xs5Error_pIegHrzo_s8SendableRzs5NeverORs_r0_lTRyt_Tgq5TQ0_ + 1
32 IDBGRPCSwift 0x00000001069a55e5 $sxIeghHr_xs5Error_pIegHrzo_s8SendableRzs5NeverORs_r0_lTRyt_Tgq5TATQ0_ + 1
33 libswift_Concurrency.dylib 0x000000022dedbea1 _ZL23completeTaskWithClosurePN5swift12AsyncContextEPNS_10SwiftErrorE + 1
)
libc++abi: terminating with uncaught exception of type NSException
[https://github.com/facebook/idb/issues/802](url) There is an open issue at idb repo. It's exactly the same and remains unsolved for now.
Hey folks, I am closing this issue as iOS 16 is in fact supported. We acknowledge that there are some idb issues (and we are working on solutions), but we have confirmed that it is not iOS 16 related
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!
When maestro is run on an unsupported iOS version, a grpc error is thrown.
Exception:
kotlin.Unit io.grpc.StatusRuntimeException: UNAVAILABLE:
Stack trace: