I'm having a real issue with running my react-native ios app. I installed Xcode (version 8.3.3) and all the other basic dependencies needed, all I did was:
react-native init AwesomeProject
cd AwesomeProject
react-native run-ios
And what happens is the AwesomeProject app opens for a second then closes. I also tried running it through xcode and get the same problem, although it is atleast reporting an error of:
2017-09-04 20:38:11.369 [info][tid:main][RCTCxxBridge.mm:188]
Initializing <RCTCxxBridge: 0x6000001a0540> (parent: <RCTBridge: 0x6000000a9a20>, executor: (null))
2017-09-04 20:38:11.390 [warn][tid:main][RCTBridge.m:114] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-09-04 20:38:11.404 [info][tid:main][RCTRootView.m:301] Running application AwesomeProject ({
initialProps = {
};
rootTag = 1;
})
2017-09-04 20:38:11.467 AwesomeProject[10363:1261593] -[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa383534303930327
2017-09-04 20:38:11.509 AwesomeProject[10363:1261593] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa383534303930327'
*** First throw call stack:
(
0 CoreFoundation 0x000000010e4f4b0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010d3aa141 objc_exception_throw + 48
2 CoreFoundation 0x000000010e564134 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010e47b840 ___forwarding___ + 1024
4 CoreFoundation 0x000000010e47b3b8 _CF_forwarding_prep_0 + 120
5 AwesomeProject 0x000000010c7653f4 -[RCTMultipartStreamReader emitProgress:contentLength:final:callback:] + 244
6 AwesomeProject 0x000000010c765bea -[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:] + 1610
7 AwesomeProject 0x000000010c7b551c -[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:] + 444
8 CFNetwork 0x000000010df54c51 __88-[NSURLSession delegate_streamTask:didBecomeInputStream:outputStream:completionHandler:]_block_invoke + 51
9 Foundation 0x000000010ceb43b7 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
10 Foundation 0x000000010ceb40bb -[NSBlockOperation main] + 101
11 Foundation 0x000000010ceb2877 -[__NSOperationInternal _start:] + 627
12 Foundation 0x000000010ceae5fc __NSOQSchedule_f + 198
13 libdispatch.dylib 0x00000001121d605c _dispatch_client_callout + 8
14 libdispatch.dylib 0x00000001121b494f _dispatch_queue_serial_drain + 221
15 libdispatch.dylib 0x00000001121b5669 _dispatch_queue_invoke + 1084
16 libdispatch.dylib 0x00000001121b7ec4 _dispatch_root_queue_drain + 634
17 libdispatch.dylib 0x00000001121b7bef _dispatch_worker_thread3 + 123
18 libsystem_pthread.dylib 0x000000011256d5a2 _pthread_wqthread + 1299
19 libsystem_pthread.dylib 0x000000011256d07d start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
And I then get brought to this page with the following Thread 8: signal SIGABRT error:
-> 0x112538d42 <+10>: jae 0x112538d4c ; <+20>
I have googled a lot with regards to the NSEXCEPTION yet I still cannot seem to even run my app. Any help would be much appreciated
Apparently there's an issue with react-native 0.48.0.
You can follow the thread below, it should be fixed with 0.48.1.
https://github.com/facebook/react-native/issues/15768
Edit: I can confirm 0.48.1 works fine. Update using:
npm install -g react-native-git-upgrade
react-native-git-upgrade
Related
I'm trying to create a basic React Native app. While I can create the project, it will not run inside the simulator.
After the app loads, it immediately quits. If I remove node_modules and do npm install to download all the modules fresh, I will see the app reload the Javascript. Then when it hits 100%, it immediately quits again.
The steps I used to create the app are as follows:
$ react-native init demo1
$ cd demo1
$ react-native run-ios
That's literally it. I'm using the following versions of tools:
$ node --version
v6.11.2
$ npm --version
3.10.10
$ react-native --version
react-native-cli: 2.0.1
react-native: 0.48.0
The full log is here. What am I doing wrong?
Investigating this more, it turns out the Xcode project fails with a stack trace:
2017-09-02 13:03:00.775 [info][tid:main][RCTCxxBridge.mm:188] Initializing <RCTCxxBridge: 0x6080001a2ae0> (parent: <RCTBridge: 0x6000000a1f80>, executor: (null))
2017-09-02 13:03:00.804 [warn][tid:main][RCTBridge.m:114] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-09-02 13:03:00.825 [info][tid:main][RCTRootView.m:301] Running application r1 ({
initialProps = {
};
rootTag = 1;
})
2017-09-02 13:03:00.960 r1[47802:5600672] -[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa313434323930327
2017-09-02 13:03:00.977 r1[47802:5600672] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa313434323930327'
*** First throw call stack:
(
0 CoreFoundation 0x000000010e094b0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010cf4a141 objc_exception_throw + 48
2 CoreFoundation 0x000000010e104134 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010e01b840 ___forwarding___ + 1024
4 CoreFoundation 0x000000010e01b3b8 _CF_forwarding_prep_0 + 120
5 r1 0x000000010c301394 -[RCTMultipartStreamReader emitProgress:contentLength:final:callback:] + 244
6 r1 0x000000010c301b8a -[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:] + 1610
7 r1 0x000000010c3514bc -[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:] + 444
8 CFNetwork 0x000000010daf4c51 __88-[NSURLSession delegate_streamTask:didBecomeInputStream:outputStream:completionHandler:]_block_invoke + 51
9 Foundation 0x000000010ca543b7 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
10 Foundation 0x000000010ca540bb -[NSBlockOperation main] + 101
11 Foundation 0x000000010ca52877 -[__NSOperationInternal _start:] + 627
12 Foundation 0x000000010ca4e5fc __NSOQSchedule_f + 198
13 libdispatch.dylib 0x0000000111d7605c _dispatch_client_callout + 8
14 libdispatch.dylib 0x0000000111d5494f _dispatch_queue_serial_drain + 221
15 libdispatch.dylib 0x0000000111d55669 _dispatch_queue_invoke + 1084
16 libdispatch.dylib 0x0000000111d57ec4 _dispatch_root_queue_drain + 634
17 libdispatch.dylib 0x0000000111d57bef _dispatch_worker_thread3 + 123
18 libsystem_pthread.dylib 0x000000011210d5a2 _pthread_wqthread + 1299
19 libsystem_pthread.dylib 0x000000011210d07d start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Is this some sort of bug or is this something I did?
This seems to be a 0.48 issue. Try using 0.47.1 and you should be fine.
react-native init demo1 --version react-native#0.47.1
This issue has been fixed in RN 0.48.1. If you create a new project (as of September 4, 2017) you shouldn't run into this issue.
I am using react-native-piechart to render a single chart. I have added ART.xcodeprojto my Libraries. I also added libART.a to my Build Phases > Link Binary With Libraries.
When I render the chart, my application crashes. When running react-native log-ios I get the following stack trace
Apr 13 16:37:30 Dan-MBP mycpd[52875] <Error>: -[__NSArrayI length]: unrecognized selector sent to instance 0x6080000e8b80
Apr 13 16:37:30 Dan-MBP mycpd[52875] <Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI length]: unrecognized selector sent to instance 0x6080000e8b80'
*** First throw call stack:
(
0 CoreFoundation 0x0000000105159d4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000103fdd21e objc_exception_throw + 48
2 CoreFoundation 0x00000001051c9f04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00000001050df005 ___forwarding___ + 1013
4 CoreFoundation 0x00000001050deb88 _CF_forwarding_prep_0 + 120
5 mycpd 0x0000000100cd0f77 -[RNSVGPathParser initWithPathString:] + 295
6 mycpd 0x0000000100cce0a0 +[RCTConvert(RNSVG) CGPath:] + 80
7 mycpd 0x0000000100c1ac0a __49-[RCTComponentData propBlockForKey:inDictionary:]_block_invoke.223 + 282
8 mycpd 0x0000000100c1b840 __49-[RCTComponentData propBlockForKey:inDictionary:]_block_invoke.259 + 720
9 mycpd 0x0000000100c1bbb8 __49-[RCTComponentData propBlockForKey:inDictionary:]_block_invoke_2.272 + 40
10 mycpd 0x0000000100bb6dd3 RCTPerformBlockWithLogFunction + 483
11 mycpd 0x0000000100bb6f8f RCTPerformBlockWithLogPrefix + 239
12 mycpd 0x0000000100c1bb1d __49-[RCTComponentData propBlockForKey:inDictionary:]_block_invoke.267 + 445
13 mycpd 0x0000000100c1c015 __37-[RCTComponentData setProps:forView:]_block_invoke + 181
14 CoreFoundation 0x00000001050ea2a5 __65-[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 85
15 CoreFoundation 0x00000001050ea1ba -[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:] + 250
16 mycpd 0x0000000100c1be7f -[RCTComponentData setProps:forView:] + 223
17 mycpd 0x0000000100c01f02 __50-[RCTUIManager createView:viewName:rootTag:props:]_block_invoke + 162
18 libdispatch.dylib 0x0000000107804808 _dispatch_call_block_and_release + 12
19 libdispatch.dylib 0x000000010782612e _dispatch_client_callout + 8
20 libdispatch.dylib 0x000000010780d4fb _dispatch_main_queue_callback_4CF + 1054
21 CoreFoundation 0x000000010511de49 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
22 CoreFoundation 0x00000001050e337d __CFRunLoopRun + 2205
23 CoreFoundation 0x00000001050e2884 CFRunLoopRunSpecific + 420
24 GraphicsServices 0x0000000109cd2a6f GSEventRunModal + 161
25 UIKit 0x0000000102161c68 UIApplicationMain + 159
26 mycpd 0x0000000100a08ddf main + 111
27 libdyld.dylib 0x000000010786f68d start + 1
28 ??? 0x0000000000000001 0x0 + 1
)
Apr 13 16:37:30 Dan-MBP SpringBoard[50607] <Error>: [KeyboardArbiter] HW kbd: Failed to set (null) as keyboard focus
Apr 13 16:37:30 Dan-MBP com.apple.CoreSimulator.SimDevice.D55EDF21-DD38-4727-9408-2ED7C7D3E93F.launchd_sim[50590] (UIKitApplication:com.thinkdigital.mycpd[0xb38b][52875]) <Notice>: Service exited due to Abort trap: 6
Apr 13 16:37:30 Dan-MBP backboardd[50608] <Error>: [Common] Unable to get short BSD proc info for 52875: No such process
Apr 13 16:37:30 Dan-MBP backboardd[50608] <Error>: [Common] Unable to get proc info for 52875: No such process
Apr 13 16:37:30 Dan-MBP assertiond[50611] <Warning>: notify_suspend_pid() failed with error 7
What I have tried
Removing the package via yarn, and removing ART.xcodeproj and libART.a from Xcode and then reinstalling.
I have tried multiple chart libraries - this problem persists.
I created a fresh project to test the libraries were not causing the issue, they worked absolutely fine.
I had the same issue when using react-native-progress. A similar crash was reported here
To fix I removed references to react-native-svg, then ran:
npm install react-native-svg --save
react-native link react-native-svg
I did a manually install of the Firebase SDK to my iOS project. Following the instruction from README.md
I included all the files from the Analytics folder:
FirebaseAnalytics.framework
FirebaseInstanceID.framework
GoogleInterchangeUtilities.framework
GoogleSymbolUtilities.framework
GoogleUtilities.framework
And I included "import FirebaseAnalytics" to my AppDelegate. and then I called:
FIRApp.configure()
But Xcode is still telling me this:
*** Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure] Firebase Analytics is not available.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000104178d85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000106761deb objc_exception_throw + 48
2 CoreFoundation 0x0000000104178cbd +[NSException raise:format:] + 205
3 helloworld 0x0000000103f17190 -[FIRApp configureCore] + 325
4 helloworld 0x0000000103f16bb1 +[FIRApp addAppToAppDictionary:] + 100
5 helloworld 0x0000000103f162e2 +[FIRApp configureDefaultAppWithOptions:sendingNotifications:] + 268
6 helloworld 0x0000000103f16027 +[FIRApp configure] + 302
7 helloworld 0x0000000103ee9d81 _TFC6mognet11AppDelegate11applicationfTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVs10DictionaryCSo8NSObjectPs9AnyObject____Sb + 97
8 helloworld 0x0000000103ee9ea4 _TToFC6mognet11AppDelegate11applicationfTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVs10DictionaryCSo8NSObjectPs9AnyObject____Sb + 180
9 UIKit 0x00000001051a49ac -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 272
10 UIKit 0x00000001051a5c0d -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3415
11 UIKit 0x00000001051ac568 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1769
12 UIKit 0x00000001051a9714 -[UIApplication workspaceDidEndTransaction:] + 188
13 FrontBoardServices 0x00000001091bd8c8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
14 FrontBoardServices 0x00000001091bd741 -[FBSSerialQueue _performNext] + 178
15 FrontBoardServices 0x00000001091bdaca -[FBSSerialQueue _performNextFromRunLoopSource] + 45
16 CoreFoundation 0x000000010409e301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17 CoreFoundation 0x000000010409422c __CFRunLoopDoSources0 + 556
18 CoreFoundation 0x00000001040936e3 __CFRunLoopRun + 867
19 CoreFoundation 0x00000001040930f8 CFRunLoopRunSpecific + 488
20 UIKit 0x00000001051a8f21 -[UIApplication _run] + 402
21 UIKit 0x00000001051adf09 UIApplicationMain + 171
22 helloworld 0x0000000103eea832 main + 114
23 libdyld.dylib 0x000000010722592d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
What am I doing wrong here? FYI. I am running Xcode Version 7.3.1 and I have the latest SDK.
Did you add the -ObjC flag in "Other Linking Flags" setting? When I did this in my Objective-C project, the app stopped crashing when trying to load Firebase. I also included all the Firebase files, used the Firebase.h header and [FIRApp configure] to call Firebase.
I am running Xcode 8.
We are keeping getting a strange error on when starting a cordova app
Apache Cordova native platform version 4.1.1 is starting.
[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector sent to instance 0x7fef81d10e00
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector sent to instance 0x7fef81d10e00'
*** First throw call stack:
(
0 CoreFoundation 0x0000000105fdcd85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000105a50deb objc_exception_throw + 48
2 CoreFoundation 0x0000000105fe5d3d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x0000000105f2bcfa ___forwarding___ + 970
4 CoreFoundation 0x0000000105f2b8a8 _CF_forwarding_prep_0 + 120
5 שוליק.נט 0x0000000105527ab3 -[CDVViewController viewDidLoad] + 195
6 שוליק.נט 0x0000000105525a06 -[MainViewController viewDidLoad] + 54
7 UIKit 0x0000000106bf5984 -[UIViewController loadViewIfRequired] + 1198
8 UIKit 0x0000000106bf5cd3 -[UIViewController view] + 27
9 UIKit 0x0000000106acbfb4 -[UIWindow addRootViewControllerViewIfPossible] + 61
10 UIKit 0x0000000106acc69d -[UIWindow _setHidden:forced:] + 282
11 UIKit 0x0000000106ade180 -[UIWindow makeKeyAndVisible] + 42
12 שוליק.נט 0x000000010552b188 -[CDVAppDelegate application:didFinishLaunchingWithOptions:] + 776
Recently I had the same problem with a Visual Studio TACO project. In particular this appeared when updated the Cordova CLI platform version from 5.1.1 to 6.1.1. This resulted in the modification of the native version of iOS Cordova from the 3.8.2 to 4.1.1 which produced the problem commented.
After many tests I found the solution. The problem was caused by file 'build.xconfig' located in '[project_folder]/res/native/ios/cordova'. After delete this file and recompile the project the problem was solved.
My app is occasionally crashing for some users and I have been unable to replicate the problem.
I have managed to get a few crash reports from one of the users which I have imported to Xcode, but I am unable to symbolicate the reports fully with some of the myApp lines not showing the actual class/code being called. Two sample stack traces extracts:
Last Exception Backtrace:
0 CoreFoundation 0x39e5c3e2 __exceptionPreprocess + 158
1 libobjc.A.dylib 0x38eb595e objc_exception_throw + 26
2 CoreFoundation 0x39da66d0 -[__NSPlaceholderArray initWithObjects:count:] + 160
3 CoreFoundation 0x39da6e04 +[NSArray arrayWithObject:] + 40
4 myApp 0x0012117c 0x63000 + 778620
5 myApp 0x0012c700 0x63000 + 825088
6 myApp 0x00148784 0x63000 + 939908
7 myApp 0x0013caf0 0x63000 + 891632
8 myApp 0x0013b9da 0x63000 + 887258
9 myApp 0x0006bda2 -[myAppAppDelegate init] (myAppAppDelegate.m:45)
10 UIKit 0x3380d8aa -[UIClassSwapper initWithCoder:] + 186
Last Exception Backtrace:
0 CoreFoundation 0x39e5c3e2 __exceptionPreprocess + 158
1 libobjc.A.dylib 0x38eb595e objc_exception_throw + 26
2 CoreFoundation 0x39da66d0 -[__NSPlaceholderArray initWithObjects:count:] + 160
3 CoreFoundation 0x39da6e04 +[NSArray arrayWithObject:] + 40
4 myApp 0x000c217c 0x4000 + 778620
5 myApp 0x000cd700 0x4000 + 825088
6 myApp 0x000e9784 0x4000 + 939908
7 myApp 0x000ddaf0 0x4000 + 891632
8 myApp 0x000dc9da 0x4000 + 887258
9 myApp 0x0000cda2 -[myAppAppDelegate init] (myAppAppDelegate.m:45)
10 UIKit 0x3380d8aa -[UIClassSwapper initWithCoder:] + 186
This is an app submitted to the store from an archived build which still exists in Xcode. I have also tried the atos command, and running several of the symbolicate scripts available with no success. (I am 100% sure I have the correct .app and .dSYM files).
Anyone have any idea how I may be able to find out more info about these stack traces and determine where this crash is happening?
(Note: I am aware that line 9 references the app delegate's init command, which is very useful. My question is specifically regarding the subsequent calls that are not symbolicated)
Thanks!