Skip to content

'unauthorized' error using 2.0.8 #407

@RadianSmile

Description

@RadianSmile

I run Parse server @2.0.8

then happened a strange thing :

I ran the sample code in node :

...
Parse = require ('parse/node');
var obj = new Parse.Object('GameScore');
obj.set('score',1337);
obj.save().then(function(obj) {
  console.log(obj.toJSON());
  var query = new Parse.Query('GameScore');
  query.get(obj.id).then(function(objAgain) {
    console.log(objAgain.toJSON());
  }, function(err) {console.log(err); });
}, function(err) { console.log(err); });
...

then my server log showed :

2016-02-14T11:54:01.166014+00:00 app[web.1]: { score: 1337,
2016-02-14T11:54:01.166021+00:00 app[web.1]:   createdAt: '2016-02-14T11:54:00.537Z',
2016-02-14T11:54:01.166022+00:00 app[web.1]:   updatedAt: '2016-02-14T11:54:00.537Z',
2016-02-14T11:54:01.166023+00:00 app[web.1]:   objectId: 'rzuNqFVFY0' }
2016-02-14T11:54:01.201652+00:00 app[web.1]: ParseError { code: undefined, message: 'unauthorized' }

that means it could create object , but not able to query.

that's so wired. So I test it with
[email protected]

then this code runs smoothly :

2016-02-14T12:14:01.634098+00:00 app[web.1]: { score: 1337,
2016-02-14T12:14:01.634103+00:00 app[web.1]:   createdAt: '2016-02-14T12:14:00.587Z',
2016-02-14T12:14:01.634104+00:00 app[web.1]:   updatedAt: '2016-02-14T12:14:00.587Z',
2016-02-14T12:14:01.634106+00:00 app[web.1]:   objectId: '2MbFbROSAP' }
2016-02-14T12:14:01.685361+00:00 app[web.1]: { score: 1337,
2016-02-14T12:14:01.685366+00:00 app[web.1]:   updatedAt: '2016-02-14T12:14:00.587Z',
2016-02-14T12:14:01.685367+00:00 app[web.1]:   createdAt: '2016-02-14T12:14:00.587Z',
2016-02-14T12:14:01.685367+00:00 app[web.1]:   objectId: '2MbFbROSAP' }

Please check! Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:questionSupport or code-level question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions