badge increment stops working from rest/curl if a push +increment is sent from new (not parse.com) dashboard
Push + increment was working fine until I sent a push + increment from parse-dashboard.
Not only the badge number did not increase, any further REST/curl push + increment stopped working altogether (just push continued to work).
Current solution - either restart parse-server + remigrate parse database or do not use Parse dashboard for push.
env setup: parse-dashboard 1.0.5 running locally parse-server 2.2.4 (deployed parse-server-example on Heroku)
Check out this issue for an ideal bug report. The closer your issue report is to that one, the more likely we are to be able to help, and the more likely we will be to fix the issue quickly!
For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!
- [y] You've met the prerequisites.
- [y] You're running the latest version of Parse Server.
- [y] You've searched through existing issues. Chances are that your issue has been reported or resolved before.
Environment Setup
Steps to reproduce
Logs/Trace
If you just set a badge does it work? Can you dump the Schema table? Is the badge properly an int in the database?
This is an issue with the dashboard. I'm working on it. Possibly the "increment" checking code could do a better job of checking for invalid values though.
if (typeof badge == 'string' && badge.toLowerCase() === 'increment') {
op = { $inc: { badge: 1 } }
} else if (Number(badge)) {
op = { $set: { badge: badge } } // we possibly could du Number(badge)
} else {
throw "Invalid value for badge, expected number or 'Increment'";
}
this is pretty concise...
True. This issue should be fixed in version 1.0.7 of the dashboard.
Tried that - did not work.
After the last migration - field came through as Number (as it is/was in Parse.com). In mlab, as an example, one entry is: "badge": 12. In addition, this time the values were actually populated and when clicking on an entry, it did not show up as Boolean (as it did earlier).
The table is the default Parse installation table. I have not changed it whatsoever.
Will try 'breaking' it again tomorrow. So far, I managed to break REST badge increment twice using the steps I described in the issue.
It might be a point-in-time of the migration but in both cases I had the option to 'finalise' (I did not).
On 1 April 2016 at 00:44, Florent Vilmart [email protected] wrote:
If you just set a badge does it work? Can you dump the Schema table? Is the badge properly an int in the database?
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/ParsePlatform/parse-server/issues/1313#issuecomment-204176854
Sorry - replied out-of-order. Looks like you found the problem.
I look forward to 1.0.7 :)
Thanks!
On 1 April 2016 at 01:39, Yonni [email protected] wrote:
Tried that - did not work.
After the last migration - field came through as Number (as it is/was in Parse.com). In mlab, as an example, one entry is: "badge": 12. In addition, this time the values were actually populated and when clicking on an entry, it did not show up as Boolean (as it did earlier).
The table is the default Parse installation table. I have not changed it whatsoever.
Will try 'breaking' it again tomorrow. So far, I managed to break REST badge increment twice using the steps I described in the issue.
It might be a point-in-time of the migration but in both cases I had the option to 'finalise' (I did not).
On 1 April 2016 at 00:44, Florent Vilmart [email protected] wrote:
If you just set a badge does it work? Can you dump the Schema table? Is the badge properly an int in the database?
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/ParsePlatform/parse-server/issues/1313#issuecomment-204176854
btw, when are you going to add tags 1.0.6 and 1.0.7? github only shows 1.0.5...
On 1 April 2016 at 01:41, Yonni [email protected] wrote:
Sorry - replied out-of-order. Looks like you found the problem.
I look forward to 1.0.7 :)
Thanks!
On 1 April 2016 at 01:39, Yonni [email protected] wrote:
Tried that - did not work.
After the last migration - field came through as Number (as it is/was in Parse.com). In mlab, as an example, one entry is: "badge": 12. In addition, this time the values were actually populated and when clicking on an entry, it did not show up as Boolean (as it did earlier).
The table is the default Parse installation table. I have not changed it whatsoever.
Will try 'breaking' it again tomorrow. So far, I managed to break REST badge increment twice using the steps I described in the issue.
It might be a point-in-time of the migration but in both cases I had the option to 'finalise' (I did not).
On 1 April 2016 at 00:44, Florent Vilmart [email protected] wrote:
If you just set a badge does it work? Can you dump the Schema table? Is the badge properly an int in the database?
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/ParsePlatform/parse-server/issues/1313#issuecomment-204176854
Whoops! I changed my workflow to use my own fork, and just realized that I had only been pushing tags to my on fork, and not to parse-dashboard. Thanks for the heads up!