{"action":"created","issue":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2115","repository_url":"https://api.github.com/repos/ParsePlatform/parse-server","labels_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2115/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2115/comments","events_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2115/events","html_url":"https://github.com/ParsePlatform/parse-server/issues/2115","id":161347818,"number":2115,"title":"\"You cannot increment a non-number.\" when increment()","user":{"login":"iForests","id":307714,"avatar_url":"https://avatars.githubusercontent.com/u/307714?v=3","gravatar_id":"","url":"https://api.github.com/users/iForests","html_url":"https://github.com/iForests","followers_url":"https://api.github.com/users/iForests/followers","following_url":"https://api.github.com/users/iForests/following{/other_user}","gists_url":"https://api.github.com/users/iForests/gists{/gist_id}","starred_url":"https://api.github.com/users/iForests/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iForests/subscriptions","organizations_url":"https://api.github.com/users/iForests/orgs","repos_url":"https://api.github.com/users/iForests/repos","events_url":"https://api.github.com/users/iForests/events{/privacy}","received_events_url":"https://api.github.com/users/iForests/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ParsePlatform/parse-server/labels/troubleshooting","name":"troubleshooting","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-06-21T04:36:02Z","updated_at":"2016-06-29T15:49:34Z","closed_at":null,"body":"Hi, it might look like a Parse-Android-SDK issue, but I'm sure that this crash didn't happen when using `api.parse.com`, so I think it could be a parse-server issue. I can reproduce this issue by the following code (`myNum` is a Number field in User object):\r\n\r\n```\r\nParseUser parseUser = ParseUser.getCurrentUser();\r\n\r\nparseUser.increment(\"myNum\", 1);\r\nparseUser.saveInBackground();\r\n\r\nparseUser.increment(\"myNum\", -1);\r\nparseUser.saveInBackground();\r\n\r\nparseUser.increment(\"myNum\", 1);\r\n// ^^^^^ Crash here with java.lang.IllegalArgumentException: You cannot increment a non-number.\r\n```\r\n\r\nI'm using Parse-SDK-Android 1.13.1 & Parse-Server 2.2.12. \r\n\r\nI think the problem here is, when `myNum` becomes 0 after several increment() operations, the next increment() will fail. And it not only happens in ParseUser, but all ParseObject. Thanks."},"comment":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/comments/229399742","html_url":"https://github.com/ParsePlatform/parse-server/issues/2115#issuecomment-229399742","issue_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2115","id":229399742,"user":{"login":"flovilmart","id":364568,"avatar_url":"https://avatars.githubusercontent.com/u/364568?v=3","gravatar_id":"","url":"https://api.github.com/users/flovilmart","html_url":"https://github.com/flovilmart","followers_url":"https://api.github.com/users/flovilmart/followers","following_url":"https://api.github.com/users/flovilmart/following{/other_user}","gists_url":"https://api.github.com/users/flovilmart/gists{/gist_id}","starred_url":"https://api.github.com/users/flovilmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flovilmart/subscriptions","organizations_url":"https://api.github.com/users/flovilmart/orgs","repos_url":"https://api.github.com/users/flovilmart/repos","events_url":"https://api.github.com/users/flovilmart/events{/privacy}","received_events_url":"https://api.github.com/users/flovilmart/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T15:49:34Z","updated_at":"2016-06-29T15:49:34Z","body":"That's highly possible. The internal validation should let an internal incrément go. I would suspect the increment op is not removed from the original data object and gets forwarded as is"}}
{"actor":{"display_login":"flovilmart"}}