question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App working on IOS simulator but crashes after 10 seconds when downloaded via TestFlight or Appstore

See original GitHub issue

Description

I am not sure what the bug is but when I open the app in Xcode simulator it works fine but when I deploy it on the TestFlight its crashes after 10 seconds

Here is the crash log

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  1
Last Exception Backtrace:
0   CoreFoundation                	0x1ac1ca5ac exceptionPreprocess + 220 (NSException.m:199)
1   libobjc.A.dylib               	0x1c02b842c objc_exception_throw + 60 (objc-exception.mm:565)
2   MyApp                        	0x100d1bb8c RCTFatal + 668 (RCTAssert.m:146)
3   MyApp                        	0x100d955e4 -[RCTExceptionsManager reportFatal:stack:exceptionId:suppressRedBox:] + 492 (RCTExceptionsManager.mm:64)
4   MyApp                        	0x100d9601c -[RCTExceptionsManager reportException:] + 1536 (RCTExceptionsManager.mm:135)
5   CoreFoundation                	0x1ac1cf5d4 invoking_ + 148
6   CoreFoundation                	0x1ac0aa9e8 -[NSInvocation invoke] + 448 (NSForwarding.m:3389)
7   CoreFoundation                	0x1ac0aafa4 -[NSInvocation invokeWithTarget:] + 80 (NSForwarding.m:3495)
8   MyApp                        	0x100d4a580 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 460 (RCTModuleMethod.mm:569)
9   MyApp                        	0x100d4c714 facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&) + 244 (RCTNativeModule.mm:108)
10  MyApp                        	0x100d4c478 operator() + 44 (RCTNativeModule.mm:73)
11  MyApp                        	0x100d4c478 invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) + 88 (RCTNativeModule.mm:65)
12  libdispatch.dylib             	0x1abdc6fd0 _dispatch_call_block_and_release + 32 (init.c:1454)
13  libdispatch.dylib             	0x1abdc8ac8 _dispatch_client_callout + 20 (object.m:559)
14  libdispatch.dylib             	0x1abdcfc08 _dispatch_lane_serial_drain + 580 (inline_internal.h:2548)
15  libdispatch.dylib             	0x1abdd0734 _dispatch_lane_invoke + 408 (queue.c:3862)
16  libdispatch.dylib             	0x1abdda528 _dispatch_workloop_worker_thread + 708 (queue.c:6590)
17  libsystem_pthread.dylib       	0x1f40bb908 _pthread_wqthread + 276 (pthread.c:2193)
18  libsystem_pthread.dylib       	0x1f40c277c start_wqthread + 8
Thread 0 name:
Thread 0:
0   libsystem_kernel.dylib        	0x00000001d8308dd0 mach_msg_trap + 8
1   libsystem_kernel.dylib        	0x00000001d8308184 mach_msg + 76 (mach_msg.c:103)
2   CoreFoundation                	0x00000001ac146cf8 CFRunLoopServiceMachPort + 380 (CFRunLoop.c:2641)
3   CoreFoundation                	0x00000001ac140ea8 CFRunLoopRun + 1216 (CFRunLoop.c:2974)
4   CoreFoundation                	0x00000001ac1404bc CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242)
5   GraphicsServices              	0x00000001c2c52820 GSEventRunModal + 164 (GSEvent.c:2259)
6   UIKitCore                     	0x00000001aeaed164 -[UIApplication _run] + 1072 (UIApplication.m:3270)
7   UIKitCore                     	0x00000001aeaf2840 UIApplicationMain + 168 (UIApplication.m:4739)
8   MyApp                        	0x0000000100c4d4e4 main + 88 (main.m:7)
9   libdyld.dylib                 	0x00000001abe07e40 start + 4
Thread 1 name:
Thread 1 Crashed:
0   libsystem_kernel.dylib        	0x00000001d832c98c pthread_kill + 8
1   libsystem_pthread.dylib       	0x00000001f40bac74 pthread_kill + 272 (pthread.c:1375)
2   libsystem_c.dylib             	0x00000001b5302c34 abort + 116 (abort.c:147)
3   libsystem_c.dylib             	0x00000001b5302bc0 abort + 116 (abort.c:118)
4   libcabi.dylib               	0x00000001c03b7e24 abort_message + 132 (abort_message.cpp:76)
5   libcabi.dylib               	0x00000001c03a9434 demangling_terminate_handler() + 308 (cxa_default_handlers.cpp:67)
6   libobjc.A.dylib               	0x00000001c02b8710 _objc_terminate() + 132 (objc-exception.mm:701)
7   MyApp                        	0x0000000100e50c24 CLSTerminateHandler() + 344 (CLSException.mm:310)
8   libcabi.dylib               	0x00000001c03b72a8 std::terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
9   libcabi.dylib               	0x00000001c03b7234 std::terminate() + 44 (cxa_handlers.cpp:88)
10  libdispatch.dylib             	0x00000001abdc8adc _dispatch_client_callout + 40 (object.m:562)
11  libdispatch.dylib             	0x00000001abdcfc08 _dispatch_lane_serial_drain + 580 (inline_internal.h:2548)
12  libdispatch.dylib             	0x00000001abdd0734 _dispatch_lane_invoke + 408 (queue.c:3862)
13  libdispatch.dylib             	0x00000001abdda528 _dispatch_workloop_worker_thread + 708 (queue.c:6590)
14  libsystem_pthread.dylib       	0x00000001f40bb908 _pthread_wqthread + 276 (pthread.c:2193)
15  libsystem_pthread.dylib       	0x00000001f40c277c start_wqthread + 8

React Native version:

0.62.2

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
samcampisicommented, Dec 1, 2021

@Dassine thank you so much for your comment 🙌 I’ll give this a go and see if it solves the crash for me

0reactions
ZeiRashedcommented, Dec 10, 2021

@samcampisi after 7 days debugging, what saved my life was enabling hermes-engine in my Podfile:

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => true
  )

@Dassine this fixed similar crashes for me… do we know exactly why this fix works? It would be great to know what’s actually breaking under the hood when Hermes is disabled.

Read more comments on GitHub >

github_iconTop Results From Across the Web

App working on IOS simulator but c… | Apple Developer Forums
I am not sure how to debug it because its working fine on Simulator and it works fine for 10 seconds on actual...
Read more >
iOS app crashes at launch on Testflight for iOS 14 and below ...
We have the same problem, our app started crashing since 8.12.2021 on iOS 14 when it is installed from TestFlight. It doesn't crash...
Read more >
Is your app crashing on TestFlight? Issues and potential ...
This article looks into problems that may crash your app on TestFlight and provides potential workarounds and solutions.
Read more >
[Top 7 Ways] Fix iPhone Apps Keep Crashing on iOS 16
Part 2: 6 Common Ways to Fix iPhone Apps Crashing after iOS 16 Update · Way 1: Force Quit the Crashed App and...
Read more >
[Solved]-Swift: app runs well in simulator but crashes on actual ...
My App crashed with the same error on my device but not on the simulator. It turns out that my iOS 8 beta...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found