[错误]:最终错误地运行命令失败:错误Domain = NSCocoaErrorDomain Code = 3840“JSON文本没有以数组或对象开头

时间:2016-10-14 07:59:29

标签: ios json heroku parse-platform heroku-api

我正在尝试设置我的iOS应用,以便我可以在heroku上使用解析数据库。在我的应用程序中,我写道:

 func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    // Enable storing and querying data from Local Datastore.
    // Remove this line if you don't want to use Local Datastore features or want to use cachePolicy.
    Parse.enableLocalDatastore()

    let parseConfiguration = ParseClientConfiguration(block: { (ParseMutableClientConfiguration) -> Void in
        ParseMutableClientConfiguration.applicationId = "insta95222295"
        ParseMutableClientConfiguration.clientKey = "asdfsdfj@#$543sd"
        ParseMutableClientConfiguration.server = "https://insta9522.herokuapp.com/parse"

    })

    Parse.initializeWithConfiguration(parseConfiguration)

当我运行它时,我收到以下错误:

>Object has been saved. 
>2016-10-14 00:50:49.984 ParseStarterProject-Swift[9199:231387] [Error]: Failed to run command eventually with error: Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set." UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}

1 个答案:

答案 0 :(得分:0)

转到您的Heroku信息中心,在“设置”标签中,确保已将PARSE_MOUNT设置为/parse

enter image description here