React native app crash with appium 1.22.2

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 -

Few things which i tried :

  1. Set the Autolaunch - false in desired capabilities and used driver.Launch() in my steps but didn’t make any difference
  2. Also tried to launch another react native app with the same setup which worked fine.
  3. 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 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}
  4. 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
  5. 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 : correct bundle id ) X
autoLaunch= false
absolutePathToiOSApp=( I am setting .app path as well here )

1 Like

Having the same issue here :confused: if you find solution please shout out

I am facing same issue. Trying different things from 1 week but no luck. Initially I thought it is my bundle identifier issue but same bundle identifier was working few days back and now it is not. Looks like some Appium issue. Please help.

What I figured out is our React Native is using TealiumIOS webview Library( 5.8.2 ) version, The moment I downgraded this library 5.3.1 app stopped crashing but the issue is we cannot move to 5.3.1, I am talking to Tealium Support team to find the solution, I also figured out there is a Tealium Webview at the launch of the app which is invisible and cannot be identified by Appium in 5.8.2 version. Check your app code if you are making any use of Tealium

Hi All , I forgot to update this space but the issue is resolved , it has something to do with the Tealium Library version conflicting with appium desired capabilities, I have added language= en and application started working without crash ,Big Shout out to the Tealium support team.