Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cordova 'NSInternalInconsistencyException', reason: 'ERROR: config.xml does not exist

I am trying to run a new hello world cordova app for ios. It keeps crashing at the splash screen.

but I keep getting the error

'NSInternalInconsistencyException', reason: 'ERROR: config.xml does not exist. Please run cordova-ios/bin/cordova_plist_to_config_xml path/to/project.

when I navigate to hellocordva.xcodeproj and run

run cordova-ios/bin/cordova_plist_to_config_xml . Its not a command

here is what the config.xml in side of the testapp/platforms/ios/HelloCordova in the looks like

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:gap="http://phonegap.com/ns/1.0">
    <preference name="AllowInlineMediaPlayback" value="false" />
    <preference name="BackupWebStorage" value="cloud" />
    <preference name="DisallowOverscroll" value="false" />
    <preference name="EnableViewportScale" value="false" />
    <preference name="KeyboardDisplayRequiresUserAction" value="true" />
    <preference name="MediaPlaybackRequiresUserAction" value="false" />
    <preference name="SuppressesIncrementalRendering" value="false" />
    <preference name="SuppressesLongPressGesture" value="false" />
    <preference name="Suppresses3DTouchGesture" value="false" />
    <preference name="GapBetweenPages" value="0" />
    <preference name="PageLength" value="0" />
    <preference name="PaginationBreakingMode" value="page" />
    <preference name="PaginationMode" value="unpaginated" />
    <feature name="LocalStorage">
        <param name="ios-package" value="CDVLocalStorage" />
    </feature>
    <feature name="HandleOpenUrl">
        <param name="ios-package" value="CDVHandleOpenURL" />
        <param name="onload" value="true" />
    </feature>
    <feature name="IntentAndNavigationFilter">
        <param name="ios-package" value="CDVIntentAndNavigationFilter" />
        <param name="onload" value="true" />
    </feature>
    <feature name="GestureHandler">
        <param name="ios-package" value="CDVGestureHandler" />
        <param name="onload" value="true" />
    </feature>
    <allow-intent href="itms:*" />
    <allow-intent href="itms-apps:*" />
    <name>HelloCordova</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="[email protected]" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
</widget>

and this is the config.xml file inside of testapp root directory

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:gap = "http://phonegap.com/ns/1.0">
    <name>HelloCordova</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="[email protected]" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
</widget>

here is the entire error message in xcode as well incase it helps

2016-03-23 09:04:35.758 HelloCordova[7284:185520] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/ibraheemabukhdair/Library/Developer/CoreSimulator/Devices/364F5298-04FE-4875-BE94-DEF9F74EA607/data/Containers/Data/Application/AD59ED2C-1BA5-4639-9260-CFF211D7C527/Library/Cookies/io.cordova.hellocordova.binarycookies
2016-03-23 09:04:35.803 HelloCordova[7284:185520] Apache Cordova native platform version 4.0.1 is starting.
2016-03-23 09:04:35.803 HelloCordova[7284:185520] Multi-tasking -> Device: YES, App: YES
2016-03-23 09:04:35.803 HelloCordova[7284:185520] *** Assertion failure in -[MainViewController parseSettingsWithParser:], /Users/ibraheemabukhdair/components/cordova/testapp/platforms/ios/CordovaLib/Classes/Public/CDVViewController.m:149
2016-03-23 09:04:35.805 HelloCordova[7284:185520] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'ERROR: config.xml does not exist. Please run cordova-ios/bin/cordova_plist_to_config_xml path/to/project.'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000106eb1d85 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x00000001068fcdeb objc_exception_throw + 48
    2   CoreFoundation                      0x0000000106eb1bea +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x0000000106546d5a -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
    4   HelloCordova                        0x00000001063b405e -[CDVViewController parseSettingsWithParser:] + 478
    5   HelloCordova                        0x00000001063b42fe -[CDVViewController loadSettings] + 110
    6   HelloCordova                        0x00000001063b38a9 -[CDVViewController __init] + 1017
    7   HelloCordova                        0x00000001063b3962 -[CDVViewController initWithNibName:bundle:] + 162
    8   HelloCordova                        0x00000001063b30a9 -[MainViewController initWithNibName:bundle:] + 121
    9   HelloCordova                        0x00000001063b3abe -[CDVViewController init] + 62
    10  HelloCordova                        0x00000001063b315e -[MainViewController init] + 62
    11  HelloCordova                        0x00000001063b2fa3 -[AppDelegate application:didFinishLaunchingWithOptions:] + 115
    12  UIKit                               0x0000000107a869ac -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 272
    13  UIKit                               0x0000000107a87c0d -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3415
    14  UIKit                               0x0000000107a8e568 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1769
    15  UIKit                               0x0000000107a8b714 -[UIApplication workspaceDidEndTransaction:] + 188
    16  FrontBoardServices                  0x000000010c4b58c8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
    17  FrontBoardServices                  0x000000010c4b5741 -[FBSSerialQueue _performNext] + 178
    18  FrontBoardServices                  0x000000010c4b5aca -[FBSSerialQueue _performNextFromRunLoopSource] + 45
    19  CoreFoundation                      0x0000000106dd7301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    20  CoreFoundation                      0x0000000106dcd22c __CFRunLoopDoSources0 + 556
    21  CoreFoundation                      0x0000000106dcc6e3 __CFRunLoopRun + 867
    22  CoreFoundation                      0x0000000106dcc0f8 CFRunLoopRunSpecific + 488
    23  UIKit                               0x0000000107a8af21 -[UIApplication _run] + 402
    24  UIKit                               0x0000000107a8ff09 UIApplicationMain + 171
    25  HelloCordova                        0x00000001063b2f11 main + 65
    26  libdyld.dylib                       0x0000000109d5392d start + 1
    27  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
like image 742
Train Avatar asked Mar 23 '16 13:03

Train


2 Answers

I had a similar error, that happened because the file was actually missing. It happened after renaming the project in XCode. Deleting the XCode project and building it again solved it:

rm -rf platforms/ios
phonegap build ios  # or cordova build ios
like image 39
rafahoro Avatar answered Sep 19 '22 17:09

rafahoro


You can fix this issue by adding config.xml to Targets>Build Phases>Copy Bundle Resources

like image 93
Craig Johnson Avatar answered Sep 22 '22 17:09

Craig Johnson