I am trying to automate react native app on ios 15.2, tried on 12.0 as well ( doesn’t look like any issue with the ios version here ) using appium 1.22.2, Xcode 13.2.1, When I start running the test it installs the application on the simulator correctly & launches it as well but with black screen & immediately closes down. I have tried on debug/release/prod builds but no luck, I tried to analyze IOS Simulator Logs but couldn’t find out the root cause why it’s crashing
Please find the IOS Simulator Logs - https://gist.github.com/cnerkar1859/4680f75a6ce4e4a6d04a549f19046e50
Few things which i tried :
- Set the Autolaunch - false in desired capabilities and used driver.Launch() in my steps but didn’t make any difference
- Also tried to launch another react native app with the same setup which worked fine.
- Also added the bundle id in the desired capabilities as I have seen this error multiple times but I confirmed with the dev about the correct bundle id but still, i receive this error
2022-02-10 13:56:52:817 - [WD Proxy] Got response with status 500: {"value":{" error": "session not created","message":"Cannot launch nz.co.vodafone.MyVodafoneApp application. Make sure the correct bundle identifier has been provided in capabilities and check the device log for possible crash report occurrences", "traceback":"},"sessionId": null}
- I could see in logs - app is crashed with message -
(CoreFoundation) *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
but couldn’t find the exact reason - I tried to downgrade to appium 1.19 but couldn’t make WDA launch, not sure if some issue with version compatibility with this app , Any help would be appreciated, I am really stuck right now.
Desired capabilities :
bundle.id.local=(setting correct bundle id )
device.name=iPhone X
device.udid=C718FD83-5F77-4763-BAD0-7B3B0B6644B4
device.os.version=12.0
automation.instrumentation=XCUITest
orientation=PORTRAIT
no.reset=false
auto.webview=
launchTimeout=500000
new.command.timeout=1200
auto.accept.alerts=true
show.ios.log=true
show.xcode.log=true
autoLaunch= false
absolutePathToiOSApp=( I am setting .app path as well here )