Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Fatal Exception: NSInvalidArgumentException" + "Crashed: com.twitter.crashlytics.ios.exception" #19078

Closed
3 tasks done
sunweiyang opened this issue Apr 30, 2018 · 13 comments
Closed
3 tasks done
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@sunweiyang
Copy link
Contributor

sunweiyang commented Apr 30, 2018

Environment

Environment:
OS: macOS High Sierra 10.13.4
Node: 9.10.1
Yarn: 1.5.1
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 3.1 AI-173.4697961

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.2 => 0.55.2

Steps to Reproduce

Our iOS app in production has been working with no issues. However, a few days ago, my own device's installation of our production app just so happened to experience a crash after cold launching the app (a split second after the bundle fully loaded). This crash was captured by our Fabric Crashlytics. No other instances of this crash has been reported by our customers -- this was the only case we saw, and we could not reproduce it.

My device details:
iPhone 8
iOS 11.3.1

Crashlytics combined two crash outputs within this crash issue -- outputs are provided below. (I've replaced our app's name with OURAPP).

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x182556d8c __exceptionPreprocess
1  libobjc.A.dylib                0x1817105ec objc_exception_throw
2  CoreFoundation                 0x182564098 __methodDescriptionForSelector
3  CoreFoundation                 0x18255c5c8 ___forwarding___
4  CoreFoundation                 0x18244241c _CF_forwarding_prep_0
5  OURAPP                          0x101601054 RCTReachabilityCallback
6  SystemConfiguration            0x1832a9644 reachPerformAndUnlock
7  CoreFoundation                 0x1824ff404 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
8  CoreFoundation                 0x1824fece0 __CFRunLoopDoSources0
9  CoreFoundation                 0x1824fc79c __CFRunLoopRun
10 CoreFoundation                 0x18241cda8 CFRunLoopRunSpecific
11 GraphicsServices               0x1843ff020 GSEventRunModal
12 UIKit                          0x18c3fd78c UIApplicationMain
13 OURAPP                          0x100c00920 main (main.m:14)
14 libdyld.dylib                  0x181eadfc0 start
Crashed: com.twitter.crashlytics.ios.exception
0  OURAPP                          0x100da3ac8 CLSProcessRecordAllThreads + 114024
1  OURAPP                          0x100da3ac8 CLSProcessRecordAllThreads + 114024
2  OURAPP                          0x100da3984 CLSProcessRecordAllThreads + 113700
3  OURAPP                          0x100d92e74 CLSHandler + 45332
4  OURAPP                          0x100da1af0 __CLSExceptionRecord_block_invoke + 105872
5  libdispatch.dylib              0x181e48ae4 _dispatch_client_callout + 16
6  libdispatch.dylib              0x181e85eb4 _dispatch_queue_barrier_sync_invoke_and_complete + 56
7  OURAPP                          0x100da1584 CLSExceptionRecord + 104484
8  OURAPP                          0x100da13ac CLSExceptionRecordNSException + 104012
9  OURAPP                          0x100da0fc0 CLSTerminateHandler() + 103008
10 OURAPP                          0x100d578dc MSCrashesUncaughtCXXTerminateHandler() (MSCrashesCXXExceptionHandler.mm:174)
11 libc++abi.dylib                0x18170137c std::__terminate(void (*)()) + 16
12 libc++abi.dylib                0x181700ccc __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 130
13 libobjc.A.dylib                0x181710720 _objc_exception_destructor(void*) + 362
14 CoreFoundation                 0x182564098 __methodDescriptionForSelector + 138
15 CoreFoundation                 0x18255c5c8 ___forwarding___ + 1380
16 CoreFoundation                 0x18244241c _CF_forwarding_prep_0 + 92
17 OURAPP                          0x101601054 RCTReachabilityCallback + 736680
18 SystemConfiguration            0x1832a9644 reachPerformAndUnlock + 540
19 CoreFoundation                 0x1824ff404 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
20 CoreFoundation                 0x1824fece0 __CFRunLoopDoSources0 + 456
21 CoreFoundation                 0x1824fc79c __CFRunLoopRun + 1204
22 CoreFoundation                 0x18241cda8 CFRunLoopRunSpecific + 552
23 GraphicsServices               0x1843ff020 GSEventRunModal + 100
24 UIKit                          0x18c3fd78c UIApplicationMain + 236
25 OURAPP                          0x100c00920 main (main.m:14)
26 libdyld.dylib                  0x181eadfc0 start + 4

Expected Behavior

Expectation is cold start of app without crashing.

Actual Behavior

Works as expected a vast majority of the time, but this unexpected crash occurred during this one case.

@react-native-bot
Copy link
Collaborator

Thanks for posting this! It looks like your issue may be missing some necessary information. Can you run react-native info and edit your issue to include these results under the Environment section?

Thank you for your contributions.

@sunweiyang
Copy link
Contributor Author

@react-native-bot I believe I did provide my react-native info output.

@timoteialbu
Copy link

We have been getting the same exception too + another one (EXC_BAD_ACCESS). We are using sentry.io for crash reporting and it tells us that both these errors happen in RCTReachabilityCallback (RCTNetInfo.m:51 & RCTNetInfo.m:52). They happen all the time and we cannot figure out how to solve them. Its also hard to reproduce, however from what we know it always happens on app resume. So either the first time you open the app or the nth time.

Here is my info:

Environment:
OS: macOS High Sierra 10.13.4
Node: 8.11.2
Yarn: 1.6.0
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.3.1 Build version 9E501
Android Studio: 3.1 AI-173.4720617

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.3 => 0.55.3

Let me know what else I can provide.

@NotTooReact89
Copy link

Is there a fix for this yet? We get the same error in my fabric crashlytics and its hard to reproduce but it doesn't happen everytime but happens 1 in every 20 times when i go from online -> offline -> online.

@mcatmos
Copy link

mcatmos commented Aug 1, 2018

Same error here. It's really annoying.

@RafaelOda
Copy link

We are experiencing exactly the same behavior and seeing the same errors on sentry and crashlytics that @timoteialbu described.

We think that this is related to #18776.
I would like to hear from @mmmulani or @lwansbrough if this is the same issue.

@mmmulani
Copy link
Contributor

mmmulani commented Aug 9, 2018

9d45de6 should have fixed this.

What version of RN are you using and does it have those changes?

@RafaelOda
Copy link

I am using 55.3. It doesn't have those changes and that's why I asked you if this should be the same.

It looks very similar to me, but I wasn't able to reproduce the crash using the steps mentioned in the original issue.

@mmmulani
Copy link
Contributor

not sure if it's the same issue, the stack frame looks similar though. The only real way to know is with a repro.

@SendorWang
Copy link

How to do?

@renatobenks-zz
Copy link

Is this fixed?

@mmmulani
Copy link
Contributor

mmmulani commented Nov 6, 2018

possibly, we were seeing an issue similar to this internally and I fixed it in 67afaef

if you are seeing this crash, please provide some repro steps so we can fix it.

@thymikee
Copy link
Contributor

Looking at recent activity, it seems like this is not an issue anymore, so closing.

@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests