Skip to content

ParseError { code: 107, message: 'Received an error with invalid JSON from Parse: Cannot POST /parse/1 /push\n' } #2492

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

Closed
Manpreet1322 opened this issue Aug 10, 2016 · 3 comments

Comments

@Manpreet1322
Copy link

Manpreet1322 commented Aug 10, 2016

I got this error in console, when I am trying to send push using migrated parse server URL, its working fine without parse.serverURL. I already used this url as serverUrl: http://localhost:1337/parse

Is there any migration problem?

@ranhsd
Copy link
Contributor

ranhsd commented Aug 10, 2016

If you use parse server you should POST your request to the following URL :

http://localhost:1337/parse/push

@Manpreet1322
Copy link
Author

Thank you for your reply:

I am using this code for parse push:

var query = new Parse.Query(Parse.Installation);
query.equalTo('userObjectId', '--');

    Parse.Push.send({
        where: query,
        data: {
          alert: 'Testing .....',
          badge: 1,
          sound: 'default'
        }
      }, {
        useMasterKey: true,
        success: function() {
          console.log('Push sent!');
        },
        error: function(error) {
          console.log('There was a problem :(');
        }
      });

But it always return the above error.

@Manpreet1322
Copy link
Author

Manpreet1322 commented Aug 10, 2016

I just update parse sdk version and its working.

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

2 participants