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

Code=3840 "JSON text did not start... - Saving Video Error #1709

Closed
petermulsh opened this issue May 5, 2016 · 2 comments
Closed

Code=3840 "JSON text did not start... - Saving Video Error #1709

petermulsh opened this issue May 5, 2016 · 2 comments

Comments

@petermulsh
Copy link

petermulsh commented May 5, 2016

Continue to get this error after trying to save a video. I've seen related issues with this error but still can not find a solution. If I save the PFObject without the video file, the object successfully saves.

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.}

PFObject *new = [PFObject objectWithClassName:@"Moment"];
 [new setObject:[PFUser currentUser] forKey:@"user"];
 if (largeVideo) {
    for (int i = 0; i < splitArray.count; i++){
        PFFile *file = [splitArray objectAtIndex:i];
        [new setObject:file forKey:[NSString stringWithFormat:@"video%i", i]];
    }
}else{
   // PFFile *file = [PFFile fileWithData:videoData contentType:@"video/mp4"];
    PFFile *file = [PFFile fileWithName:@"video.mp4" data:videoData];
    [new setObject:file forKey:@"video"];
}

[new setObject:file forKey:@"image"];
[new setObject:file2 forKey:@"thumbnail"];

[new saveInBackgroundWithBlock:^(BOOL succeded, NSError *error){}];
@bohemima
Copy link
Contributor

bohemima commented May 8, 2016

Run the parse-server with VERBOSE=1 and paste relevant lines here to help troubleshooting. Also have a look at activating the PFNetworkDidReceiveURLResponseNotification and have a look at the actual response.

@flovilmart
Copy link
Contributor

Closing due to lack of activity, please update to latest parse-server version and reopen if the issue persist.

Don't forget to include your current:

  • node version
  • npm version
  • parse-server version
  • any relevant logs (VERBOSE=1 will enable verbose logging)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants