React Native - RCTFatalException: Unhandled JS Exception: "version" is a required argument - ios

I'm doing a React Native App
(react-native: 0.43.4)
And I'm having problems on running Release schema on iOS.
I have Pods (Crashlytics) and I'm running my app through the Workspace Project.
On Debug schema it runs without a problem, when I switch to Release it throws this exception:
*** Terminating app due to uncaught exception 'RCTFatalException:
Unhandled JS Exception: "version" is a required argument.',
reason: 'Unhandled JS Exception: "version" is a required argument., stack:
a#551:111
i#550:244
o#550:143
l#543:504
<unknown>#381:901
<unknown>#381:676
<unknown>#381:851
<unknown>#381:676
go#381:525
<unknown>#381:651
<unknown>#381:651
<unknown>#381:651
<unknown>#381:651
<unknown>#12:741
i#2:965
t#2:572
global code#667:9
'
*** First throw call stack:
(0x18f35efd8 0x18ddc0538 0x18f35ef20 0x1000e3010 0x1000dd54c 0x18f364e80 0x18f25a2b4 0x18f25ee7c 0x1000e0f6c 0x100106e0c 0x1001067bc 0x1005f1a50 0x1005f1a10 0x1005ff2e8 0x1005f5634 0x1005ff810 0x100601630 0x10060139c 0x18e41f1d0 0x18e41ed7c)
libc++abi.dylib: terminating with uncaught exception of type NSException
I've been searching this exception although I haven't find a solution yet...
Any clue what this is?
Thank you.

Your error comes from your javascript
Unhandled JS Exception
Since it's happening only on release mode, check any js code that is executed only in that mode (for example, search for any if (!__DEV__) or other flags you might use to distinguish between release and debug mode)

Related

[__NSConcreteURLComponents queryItems]: unrecognized selector

I'm getting this error trying to run a bare project from the react-native init command, on an iOS 7.1 device.
This works on the iOS simulator, so I wonder if its an iOS compatibility issue?
The Movies example app works ok on this device.
```
2016-01-08 16:34:33.224 CouchTest[1210:60b] -[__NSConcreteURLComponents queryItems]: unrecognized selector sent to instance 0x14dacc10
2016-01-08 16:34:33.226 CouchTest[1210:60b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSConcreteURLComponents queryItems]: unrecognized selector sent to instance 0x14dacc10'
* First throw call stack:
(0x2edb0f83 0x39561ccf 0x2edb4917 0x2edb3203 0x2ed02768 0x10abaf 0xb47a1 0xb1735 0xb0c8b 0x39a49833 0x39a4981f 0x39a49777 0x2ed7b8a1 0x2ed7a175 0x2ece4ebf 0x2ece4ca3 0x33bea663 0x3163114d 0x9780d 0x39a6eab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
```
NSURLComponents queryItems is only available on iOS8+
That's why you are seeing the crash.
See the docs here for more info: https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLComponents_class/index.html#//apple_ref/occ/instp/NSURLComponents/queryItems
Setting an exception breakpoint will show you which class/method is making that call. Otherwise, it sounds like react-native is calling queryItems when it shouldn't.

iPhone Project crash on start

I am trying to run my application and suddenly i get this error:
2014-11-05 12:12:54.972 [238:9512] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ''
*** First throw call stack:
(0x235a7c1f 0x30dafc8b 0x235a7b65 0x299b61 0x299adf 0x322ec7 0x13b50d 0x242b6d6f 0x2356e377 0x2356d787 0x2356bded 0x234ba211 0x234ba023 0x2a86d0a9 0x26ac61d1 0x102bff 0x102b88)
libc++abi.dylib: terminating with uncaught exception of type NSException
It's on the start of the application,
i get this error without changing any code in my project, any idea what can cause this?
To resolve the NSException crashes, you have to remove all the warnings of .xib/.storyboard files. Cross check the IBOutlets warnings and you can see a cross (X) icon related to the yellow warnings to remove it.

BugClipper integration issue

I have trouble integrating BugClipper into my project.
I followed the integration instructions mentioned on their website
But, the when I continue with my build it throws the following error -
Cannot find executable for CFBundle/CFPlugIn 0x17eaf2f0 (not loaded)
2014-07-24 12:34:15.457 BugClipper[371:60b] -[SMOCInvokerView smoc_width]: unrecognized selector sent to instance 0x17eae380
2014-07-24 12:34:15.459 BugClipper[371:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SMOCInvokerView smoc_width]: unrecognized selector sent to instance 0x17eae380'
*** First throw call stack:
(0x2eafce83 0x391a66c7 0x2eb007b7 0x2eaff0af 0x2ea4ddc8 0x10e8bf 0x10e60f 0x3968b0af 0x3968bcdb 0x10e5e7 0x105861 0xea8e5 0x312f1aad 0x312f14f3 0x312ebb41 0x31286a07 0x31285cfd 0x312eb321 0x3373876d 0x33738357 0x2eac7777 0x2eac7713 0x2eac5edf 0x2ea30471 0x2ea30253 0x312ea5c3 0x312e5845 0xeaae5 0x3969fab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
it seems the category is not loaded, better go to Build Settings of your Target App, and search for Other Linker Flag and add one line in there, -ObjC -all_load
This should definitely solve your problem.
Cheers

iOS Button Target Actions with Block Crashes

I'm implementing UIButtons with block actions set on them for connivence and speed of integration. I've used this method before, a while ago now, and had little issue with it. Now, however, i'm facing an issue where integrating...
https://gist.github.com/2468899
... into my app now crashes it on launch. The error i'm receiving is as follows...
2012-09-27 22:18:47.459 flink[12174:907] -[UIButton setAction:withBlock:]: unrecognized selector sent to instance 0x1e8ae610
2012-09-27 22:18:47.460 flink[12174:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIButton setAction:withBlock:]: unrecognized selector sent to instance 0x1e8ae610'
*** First throw call stack:
(0x3885a3e7 0x333bf963 0x3885df31 0x3885c64d 0x387b4208 0xea477 0xff6af 0x36b92cb1 0x3882f8f7 0x3882f15d 0x3882df2f 0x387a123d 0x387a10c9 0x3868c33b 0x34014289 0xe7b8f 0xe7b30)
libc++abi.dylib: terminate called throwing an exception
... i've never seen this issue before but it's odd that it is immediately crashing without any interaction.
Thanks in advanced.
You must make sure to add the implementation file of the category to your target. In Xcode, go to the File Inspector and make sure the Target Membership checkbox for your target is checked.

PhoneGap 2.1.0 - window.RequestFileSystem

I have updated to iOS6, and due to this have been trying to update to PhoneGap version 2.1.0. (As the camera etc. does not seem to work in versions previous to this - I have now got this part working) However when I try to access the filesystem by running the following line of code:
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, success, fail);
The app just crashes out, with no error etc. If I put this line on the main page and start from within the simulator then I receive the following error:
2012-09-25 11:26:38.741 MobileManager[4866:15b03] Multi-tasking -> Device: YES, App: YES
2012-09-25 11:26:59.756 MobileManager[4866:17f03] void SendDelegateMessage(NSInvocation *): delegate (webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:) failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode
2012-09-25 11:26:59.766 MobileManager[4866:15b03] -[NSNull intValue]: unrecognized selector sent to instance 0x275678
2012-09-25 11:26:59.767 MobileManager[4866:15b03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull intValue]: unrecognized selector sent to instance 0x275678'
*** First throw call stack:
(0x144012 0x257de7e 0x1cf4bd 0x133bbc 0x13394e 0xd953 0x60812 0x5ff9e 0x60379 0x25916b0 0x1119035 0xc7f3f 0xc796f 0xea734 0xe9f44 0xe9e1b 0x33ae7e3 0x33ae668 0x37f65c 0x22b6 0x21e5)
libc++abi.dylib: terminate called throwing an exception
What does this error mean, and how can I resolve it?
Thanks in advance.
I had accidentally set the LocalFileSystem variable to something else (LocalFileSystem.PERSISTENT was undefined.

Resources