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.

Crash with cordovaSettingForKey selector

See original GitHub issue

Bug Report

I’ve got an error while compiling (Release/Debug)

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector sent to instance 0x600003ea6ae0'

Problem

After build successfully myProject. I was open my project in Xcode and click the run button on Xcode. the project build successfully and display the lunch screen in simulator device. After that stuff I get an error in main.m

Screenshot 2019-09-27 at 12 14 13 PM

What is expected to happen?

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

What does actually happen?

the project build successfully and display the lunch screen in simulator device. After that stuff I get an error in main.m and not display home page in the simulator device.

Information

This is what I see in console of Xcode:

2019-09-27 15:19:14.943154+0530 myApp[3086:93649] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/mk/Library/Developer/CoreSimulator/Devices/EC5630C3-373A-45AD-A404-5628B1B329B9/data/Containers/Data/Application/06D2441B-F5B5-47B8-B6A7-68AEA36BB0D6/Library/Cookies/com.test.my-app.binarycookies
2019-09-27 15:19:14.954425+0530 myApp[3086:93649] Apache Cordova native platform version 5.0.1 is starting.
2019-09-27 15:19:14.954596+0530 myApp[3086:93649] Multi-tasking -> Device: YES, App: YES
2019-09-27 15:19:14.972439+0530 myApp[3086:93649] -[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector sent to instance 0x6000011cc900
2019-09-27 15:19:14.981981+0530 myApp[3086:93649] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector sent to instance 0x6000011cc900'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff23b98bde __exceptionPreprocess + 350
	1   libobjc.A.dylib                     0x00007fff503b5b20 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff23bb9704 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
	3   CoreFoundation                      0x00007fff23b9d7bc ___forwarding___ + 1436
	4   CoreFoundation                      0x00007fff23b9f6c8 _CF_forwarding_prep_0 + 120
	5   myApp                               0x000000010a028723 -[CDVViewController viewDidLoad] + 227
	6   myApp                               0x000000010a004433 -[MainViewController viewDidLoad] + 51
	7   UIKitCore                           0x00007fff46af87c2 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 83
	8   UIKitCore                           0x00007fff46afd6d3 -[UIViewController loadViewIfRequired] + 1084
	9   UIKitCore                           0x00007fff46afdaf0 -[UIViewController view] + 27
	10  UIKitCore                           0x00007fff47199b55 -[UIWindow addRootViewControllerViewIfPossible] + 150
	11  UIKitCore                           0x00007fff4719920b -[UIWindow _updateLayerOrderingAndSetLayerHidden:actionBlock:] + 232
	12  UIKitCore                           0x00007fff4719a2c9 -[UIWindow _setHidden:forced:] + 362
	13  UIKitCore                           0x00007fff471ad46d -[UIWindow _mainQueue_makeKeyAndVisible] + 42
	14  myApp                               0x000000010a01ef3f -[CDVAppDelegate application:didFinishLaunchingWithOptions:] + 703
	15  myApp                               0x000000010a0041ab -[AppDelegate application:didFinishLaunchingWithOptions:] + 187
	16  UIKitCore                           0x00007fff4715994f -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 232
	17  UIKitCore                           0x00007fff4715b2e7 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 3980
	18  UIKitCore                           0x00007fff47160c05 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1281
	19  UIKitCore                           0x00007fff468b58b1 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122
	20  UIKitCore                           0x00007fff46d96cd5 _UIScenePerformActionsWithLifecycleActionMask + 83
	21  UIKitCore                           0x00007fff468b63c3 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
	22  UIKitCore                           0x00007fff468b5e84 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 474
	23  UIKitCore                           0x00007fff468b61f3 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 821
	24  UIKitCore                           0x00007fff468b5a85 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345
	25  UIKitCore                           0x00007fff468b9e70 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 159
	26  UIKitCore                           0x00007fff46cbdf8b +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 865
	27  UIKitCore                           0x00007fff46db51cf _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240
	28  UIKitCore                           0x00007fff468b9b9e __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 153
	29  UIKitCore                           0x00007fff46db50d2 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 84
	30  UIKitCore                           0x00007fff468b9a0c -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 381
	31  UIKitCore                           0x00007fff46717c96 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 657
	32  UIKitCore                           0x00007fff4671681b -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248
	33  UIKitCore                           0x00007fff467179c0 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 210
	34  UIKitCore                           0x00007fff4715f262 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 535
	35  UIKitCore                           0x00007fff46cdf774 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361
	36  FrontBoardServices                  0x00007fff362e1d43 -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 442
	37  FrontBoardServices                  0x00007fff3630a00c __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 102
	38  FrontBoardServices                  0x00007fff362ecd21 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220
	39  FrontBoardServices                  0x00007fff36309c9d __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 355
	40  libdispatch.dylib                   0x000000010a387d64 _dispatch_client_callout + 8
	41  libdispatch.dylib                   0x000000010a38acd5 _dispatch_block_invoke_direct + 300
	42  FrontBoardServices                  0x00007fff3633108a __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
	43  FrontBoardServices                  0x00007fff36330d78 -[FBSSerialQueue _queue_performNextIfPossible] + 441
	44  FrontBoardServices                  0x00007fff36331287 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
	45  CoreFoundation                      0x00007fff23afbac1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	46  CoreFoundation                      0x00007fff23afb9ec __CFRunLoopDoSource0 + 76
	47  CoreFoundation                      0x00007fff23afb1c4 __CFRunLoopDoSources0 + 180
	48  CoreFoundation                      0x00007fff23af5ecf __CFRunLoopRun + 1263
	49  CoreFoundation                      0x00007fff23af56b6 CFRunLoopRunSpecific + 438
	50  GraphicsServices                    0x00007fff3815cbb0 GSEventRunModal + 65
	51  UIKitCore                           0x00007fff47162a67 UIApplicationMain + 1621
	52  myApp                               0x000000010a0040d1 main + 65
	53  libdyld.dylib                       0x00007fff5123bcf5 start + 1
	54  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

Command or Code

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

Environment, Platform, Device

Environment: Production or development Platform: IOS Device: Simulator (iPad Pro 10.5)

Version information

Ionic:

Ionic CLI : 5.4.1 (/usr/local/lib/node_modules/ionic) Ionic Framework : ionic-angular 2.0.0-rc.4 @ionic/app-scripts : 3.2.4

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1) Cordova Platforms : ios 5.0.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.2, (and 11 other plugins)

Utility:

cordova-res : not installed native-run : not installed

System:

ios-sim : 8.0.2 NodeJS : v10.16.3 (/usr/local/bin/node) npm : 6.11.3 OS : macOS Mojave Xcode : Xcode 11.0 Build version 11A420a

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
brodybitscommented, Aug 31, 2020

I am now reopening this issue with an updated title. I did find a few cases of problems with cordovaSettingForKey from Google.

This looks like a case of Cordova not able to read the configuration from config.xml. I suspect this is an issue in your app, but I think that Cordova should print some information rather than just crashing.

A reproduction would definitely help us reproduce the issue and avoid it in the future.

0reactions
gultyaevcommented, Sep 7, 2021

Still no news?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ios - [__NSDictionaryM cordovaSettingForKey:]: unrecognized ...
This error indicates that the CordovaPreferences category isn't being loaded. That suggests this is being linked statically, but the -objc ...
Read more >
cordovaSettingForKey unrecognized selector - ionic-v1
App debug version ipa runs fine on IOS (ionic run ios), runs fine on Android, but release version (archived, upload appstore version) crashes...
Read more >
App crash with error unrecognized selector sent to instance
Hi,. App crash with error: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[VideoW.MenuScene playerItemDidReachEnd:]: ...
Read more >
Crash on splashscreen on IOS version - mobile - Meteor forums
... (on mobile or simulator) I receive an crash on splash and app stop. ... -[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector ...
Read more >
[Fixed]-iOS 7 CBCentral identifier unrecognized selector-objective-c
I get the central object, which subscribes to the characteristics, however, when I try to get its identifier, I get the following error,...
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