You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I'm trying to send a push notification with the badge property set to a number or 'Icrement', I always get the "Object not found for update" error. When I remove the badge property, everything works just fine.
!!! This only happens when I get the Installation Query through 'matchesKeyInQuery'.
When I get the installation query directly (.equalTo('objectId','xxxxxxx')) everything works just fine!
Steps to reproduce
var installationQuery = new Parse.Query(Parse.Installation);
var userQuery = new Parse.Query(Parse.User);
userQuery.equalTo('objectId', 'myUserId')
installationQuery.matchesKeyInQuery('objectId', 'installationId', userQuery);
Uh oh!
There was an error while loading. Please reload this page.
When I'm trying to send a push notification with the badge property set to a number or 'Icrement', I always get the "Object not found for update" error. When I remove the badge property, everything works just fine.
!!! This only happens when I get the Installation Query through 'matchesKeyInQuery'.
When I get the installation query directly (.equalTo('objectId','xxxxxxx')) everything works just fine!
Steps to reproduce
var installationQuery = new Parse.Query(Parse.Installation);
var userQuery = new Parse.Query(Parse.User);
userQuery.equalTo('objectId', 'myUserId')
installationQuery.matchesKeyInQuery('objectId', 'installationId', userQuery);
Parse.Push.send({
where: installationQuery,
data: {
alert: 'Hi',
badge: 5,
sound: "default"
}
}, {
useMasterKey: true,
success: function () {
// Push was successful
response.success(usr.id);
},
error: function (error) {
// Handle error
console.log(error);
response.success(error);
}
});
Environment Setup
Server
Database
Logs/Trace
2016-11-11T04:56:39.326000+00:00 heroku[router]: at=info method=POST path="/parse/push" host=fimp.herokuapp.com request_id=925290c2-0827-46ca-a157-0aaf3adce04c fwd="91.230.107.3" dyno=web.1 connect=0ms service=57ms status=200 bytes=533
2016-11-11T04:56:39.264825+00:00 app[web.1]: verbose: REQUEST for [POST] /parse/push: {
2016-11-11T04:56:39.264836+00:00 app[web.1]: "where": {
2016-11-11T04:56:39.264838+00:00 app[web.1]: "objectId": {
2016-11-11T04:56:39.264839+00:00 app[web.1]: "$select": {
2016-11-11T04:56:39.264840+00:00 app[web.1]: "key": "installationId",
2016-11-11T04:56:39.264841+00:00 app[web.1]: "query": {
2016-11-11T04:56:39.264842+00:00 app[web.1]: "where": {
2016-11-11T04:56:39.264842+00:00 app[web.1]: "objectId": "BwupyyH1Gq"
2016-11-11T04:56:39.264843+00:00 app[web.1]: },
2016-11-11T04:56:39.264844+00:00 app[web.1]: "className": "_User"
2016-11-11T04:56:39.264845+00:00 app[web.1]: }
2016-11-11T04:56:39.264845+00:00 app[web.1]: }
2016-11-11T04:56:39.264846+00:00 app[web.1]: }
2016-11-11T04:56:39.264846+00:00 app[web.1]: },
2016-11-11T04:56:39.264847+00:00 app[web.1]: "data": {
2016-11-11T04:56:39.264848+00:00 app[web.1]: "alert": "Hi",
2016-11-11T04:56:39.264848+00:00 app[web.1]: "badge": 5,
2016-11-11T04:56:39.264849+00:00 app[web.1]: "sound": "default"
2016-11-11T04:56:39.264849+00:00 app[web.1]: }
2016-11-11T04:56:39.264860+00:00 app[web.1]: } method=POST, url=/parse/push, host=fimp.herokuapp.com, connection=close, user-agent=node-XMLHttpRequest, Parse/js1.8.5 (NodeJS 4.4.5), accept=/, content-type=text/plain, x-request-id=925290c2-0827-46ca-a157-0aaf3adce04c, x-forwarded-for=91.230.107.3, x-forwarded-proto=http, x-forwarded-port=80, via=1.1 vegur, connect-time=0, x-request-start=1478840199267, total-route-time=0, content-length=373, key=installationId, objectId=BwupyyH1Gq, className=_User, alert=Hi, badge=5, sound=default
2016-11-11T04:56:39.295384+00:00 app[web.1]: verbose: RESPONSE from [POST] /parse/push: {
2016-11-11T04:56:39.295387+00:00 app[web.1]: "headers": {
2016-11-11T04:56:39.295388+00:00 app[web.1]: "X-Parse-Push-Status-Id": "fnMCrDfLVA"
2016-11-11T04:56:39.295388+00:00 app[web.1]: },
2016-11-11T04:56:39.295389+00:00 app[web.1]: "response": {
2016-11-11T04:56:39.295390+00:00 app[web.1]: "result": true
2016-11-11T04:56:39.295390+00:00 app[web.1]: }
2016-11-11T04:56:39.295391+00:00 app[web.1]: } X-Parse-Push-Status-Id=fnMCrDfLVA, result=true
2016-11-11T04:56:39.315141+00:00 app[web.1]: info: warning: error while sending push code=101, message=Object not found for update.
The text was updated successfully, but these errors were encountered: