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

badge increment stops working from rest/curl if a push +increment is sent from new (not parse.com) dashboard #1313

Closed
goggelj opened this issue Mar 31, 2016 · 8 comments

Comments

@goggelj
Copy link

goggelj commented Mar 31, 2016

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!

Environment Setup

Steps to reproduce

Logs/Trace

@flovilmart
Copy link
Contributor

If you just set a badge does it work?
Can you dump the Schema table?
Is the badge properly an int in the database?

@drew-gross
Copy link
Contributor

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.

@flovilmart
Copy link
Contributor

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

@drew-gross
Copy link
Contributor

True. This issue should be fixed in version 1.0.7 of the dashboard.

@goggelj
Copy link
Author

goggelj commented Apr 1, 2016

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
#1313 (comment)

@goggelj
Copy link
Author

goggelj commented Apr 1, 2016

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
#1313 (comment)

@goggelj
Copy link
Author

goggelj commented Apr 1, 2016

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
#1313 (comment)

@drew-gross
Copy link
Contributor

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!

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