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

Error Terminating app due to uncaught exception 'NSInvalidArgumentException' #23824

Closed
aniiskywalker opened this issue Mar 8, 2019 · 7 comments
Labels
Bug Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@aniiskywalker
Copy link

aniiskywalker commented Mar 8, 2019

🐛 Bug Report

I've got an error while compiling (Release/Debug)
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RCTCxxBridge devSettings]

To Reproduce

This project is not mine, but I take it to make it run, but after all instalations and stuff I get an error in main.m, and this is what I see in console:

2019-03-07 23:45:50.018 [info][tid:main][RCTCxxBridge.mm:216] Initializing <RCTCxxBridge: 0x600002966a30> (parent: <RCTBridge: 0x600003d78380>, executor: (null)) 
2019-03-07 23:45:50.022250-0600 myApp[21086:280903] Initializing <RCTCxxBridge: 0x600002966a30> (parent: <RCTBridge: 0x600003d78380>, executor: (null)) 
2019-03-07 23:50:28.908445-0600 myApp[21086:280903] -[RCTCxxBridge devSettings]: unrecognized selector sent to instance 0x600002966a30 
2019-03-07 23:50:29.115379-0600 myApp[21086:280903] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RCTCxxBridge devSettings]: unrecognized selector sent to instance 0x600002966a30' 
*** First throw call stack: 
( 0 CoreFoundation 0x00000001103e01bb __exceptionPreprocess + 331 1 libobjc.A.dylib 0x000000010ed74735 objc_exception_throw + 48 2 
CoreFoundation 0x00000001103fef44 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132 3 
CoreFoundation 0x00000001103e4ed6 ___forwarding___ + 1446 4 
CoreFoundation 0x00000001103e6da8 _CF_forwarding_prep_0 + 120 5 
myApp 0x000000010c62b88e -[RCTCxxBridge start] + 4526 6 
myApp 0x000000010c6d3075 -[RCTBridge setUp] + 901 7 
myApp 0x000000010c6d233b -[RCTBridge initWithDelegate:bundleURL:moduleProvider:launchOptions:] + 379 8 
myApp 0x000000010c6d2153 -[RCTBridge initWithBundleURL:moduleProvider:launchOptions:] + 147 9 
myApp 0x000000010c665039 -[RCTRootView initWithBundleURL:moduleName:initialProperties:launchOptions:] + 185 10 
myApp 0x000000010c5d8f4e -[AppDelegate application:didFinishLaunchingWithOptions:] + 334 11 UIKitCore 0x0000000117a8bbde -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 280 12 
UIKitCore 0x0000000117a8d5cb -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3979 13 
UIKitCore 0x0000000117a92c2f -[UIApplication _runWithMainScene:transitionContext:completion:] + 1623 14 UIKitCore 0x00000001172b14e9 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866 15 
UIKitCore 0x00000001172ba29c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153 16 
UIKitCore 0x00000001172b1126 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 233 17 
UIKitCore 0x00000001172b1ae0 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1085 18 
UIKitCore 0x00000001172afcb5 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 795 19 
UIKitCore 0x00000001172af95f -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 435 20 
UIKitCore 0x00000001172b4a90 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 584 21 
UIKitCore 0x00000001172b580e _performActionsWithDelayForTransitionContext + 100 22 
UIKitCore 0x00000001172b47ef -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 221 23 
UIKitCore 0x00000001172b993a -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392 24 UIKitCore 0x0000000117a9144e -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515 25 
UIKitCore 0x0000000117635d09 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 357 26 
FrontBoardServices 0x0000000119a932da -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448 27 
FrontBoardServices 0x0000000119a9e443 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 271 28 
FrontBoardServices 0x0000000119a9db3a __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53 29
libdispatch.dylib 0x0000000110b8f602 _dispatch_client_callout + 8 30 
libdispatch.dylib 0x0000000110b92b78 _dispatch_block_invoke_direct + 301 31 
FrontBoardServices 0x0000000119ad2ba8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30 32 
FrontBoardServices 0x0000000119ad2860 -[FBSSerialQueue _performNext] + 457 33 
FrontBoardServices 0x0000000119ad2e40 -[FBSSerialQueue _performNextFromRunLoopSource] + 45 34 CoreFoundation 0x0000000110345721 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 35 
CoreFoundation 0x0000000110344f93 __CFRunLoopDoSources0 + 243 36 
CoreFoundation 0x000000011033f63f __CFRunLoopRun + 1263 37 
CoreFoundation 0x000000011033ee11 CFRunLoopRunSpecific + 625 38 
GraphicsServices 0x0000000113f8a1dd GSEventRunModal + 62 39 
UIKitCore 0x0000000117a9481d 
UIApplicationMain + 140 40 myApp 0x000000010c5d9670 main + 112 41 libdyld.dylib 0x0000000110c05575 start + 1 42 ??? 0x0000000000000001 0x0 + 1 ) 
libc++abi.dylib: terminating with uncaught exception of type NSException

after a few hours of debugging I realized that the error is in React > CxxBridge > RCTCxxBridge.mm line 344
stuff

Expected Behavior

I tried to run with debug and release modes and always the same error

Code Example

I have no code to show because is terminating with uncaught exception error.

Environment

my enviroment
react-native-cli: 2.0.1 react-native: 0.57.1 yarn 1.13.0 Homebrew 2.0.3 npm 6.4.1 node v10.15.2

React Native Environment Info:
System:
OS: macOS 10.14
CPU: x64 Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz
Memory: 29.73 MB / 4.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.2 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
IDEs:
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.1 => 0.57.1
npmGlobalPackages:
react-native-cli: 2.0.1

PS. I've searched errors related but none of them works for me.

⚠️UPDATE:
After hours of searching what I was doing wrong I clear cache and then my project run! Thank you for your answers

@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write `[skip envinfo]` alongside an explanation in your Environment: section.

@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.58 and verify if the issue still exists.

The "Resolution: Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

@ericlewis
Copy link
Contributor

@aniiskywalker are you intentionally trying to use profiling?

@aniiskywalker
Copy link
Author

@ericlewis you mean signing?

@ericlewis
Copy link
Contributor

@aniiskywalker, no, from what I see here it looks like the profiling flag is enabled. Otherwise this wouldn’t fire. You can disable it by turning off the flag.

@stale
Copy link

stale bot commented Aug 2, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 2, 2019
@stale
Copy link

stale bot commented Aug 9, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 9, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

5 participants