{"action":"created","issue":{"url":"https://api.github.com/repos/parse-community/parse-server/issues/4966","repository_url":"https://api.github.com/repos/parse-community/parse-server","labels_url":"https://api.github.com/repos/parse-community/parse-server/issues/4966/labels{/name}","comments_url":"https://api.github.com/repos/parse-community/parse-server/issues/4966/comments","events_url":"https://api.github.com/repos/parse-community/parse-server/issues/4966/events","html_url":"https://github.com/parse-community/parse-server/issues/4966","id":350704265,"node_id":"MDU6SXNzdWUzNTA3MDQyNjU=","number":4966,"title":"Bad value in mongoObjectToParseObject when query order by Date descending","user":{"login":"andj207","id":3950215,"node_id":"MDQ6VXNlcjM5NTAyMTU=","avatar_url":"https://avatars3.githubusercontent.com/u/3950215?v=4","gravatar_id":"","url":"https://api.github.com/users/andj207","html_url":"https://github.com/andj207","followers_url":"https://api.github.com/users/andj207/followers","following_url":"https://api.github.com/users/andj207/following{/other_user}","gists_url":"https://api.github.com/users/andj207/gists{/gist_id}","starred_url":"https://api.github.com/users/andj207/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andj207/subscriptions","organizations_url":"https://api.github.com/users/andj207/orgs","repos_url":"https://api.github.com/users/andj207/repos","events_url":"https://api.github.com/users/andj207/events{/privacy}","received_events_url":"https://api.github.com/users/andj207/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-15T06:49:31Z","updated_at":"2018-08-15T13:14:48Z","closed_at":null,"author_association":"NONE","body":"### Issue Description &\r\n### Steps to reproduce\r\nI use a self host ParseServer and my database currently grows more than 80k objects in a collection. I use parse-dashboard to view and manage them. The problem happens when I browse that collection sorted by \"publishedDate\" field descending. The error is below:\r\n`ParseError { code: 1, message: 'bad value in mongoObjectToParseObject' } `\r\n\r\nIt only happens with that field ordered by descending, works well by ascending. Other fields in that collection and other collections work well too. I've checked on my mobile apps, the data cannot be loaded because of that error.\r\nI've tried many ways to overcome the error:\r\n(1) set all null values to a Date value;\r\n(2) copied all that field's values to a new field and copied them back;\r\n(3) converted that field's date values to Number and stored in other field and converted them back (using mongo language)\r\n\r\n\r\n    object.time = object.publishedDate.getTime(); \r\n\r\n    object.publishedDate = new ISODate(object.time); // this works but the value is wrong (for example Jan 31, 9998 while expected is Sep 3, 2001) or\r\n\r\n    object.publishedDate = new ISODate(new Date(object.time).toISOString()) //or\r\n\r\n    object.publishedDate = new Date(object.time);\r\n\r\nNone of them help to solve the error. My local database work well with the same data.\r\n\r\n### Environment Setup\r\n- **Server**\r\n  - parse-server version: 2.8.1\r\n  - Operating System:     Ubuntu 16.04\r\n  - Hardware:             1GB Ram, 25GB Disk space.\r\n  - Localhost or remote server?: Digital Ocean\r\n\r\n- **Database**\r\n  - MongoDB version: 3.0.8\r\n  - Storage engine:  MongoRocks\r\n  - Hardware:         1GB Ram, 25GB Disk space.\r\n  - Localhost or remote server?: Digital Ocean\r\n\r\n### Logs/Trace\r\nError generating response. ParseError { code: 1, message: 'bad value in mongoObjectToParseObject'}\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/parse-community/parse-server/issues/comments/413193641","html_url":"https://github.com/parse-community/parse-server/issues/4966#issuecomment-413193641","issue_url":"https://api.github.com/repos/parse-community/parse-server/issues/4966","id":413193641,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzE5MzY0MQ==","user":{"login":"flovilmart","id":364568,"node_id":"MDQ6VXNlcjM2NDU2OA==","avatar_url":"https://avatars3.githubusercontent.com/u/364568?v=4","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":"2018-08-15T13:14:48Z","updated_at":"2018-08-15T13:14:48Z","author_association":"MEMBER","body":"Do you have a sample of the objects that don’t work? It’s possible that a single bad value may cause the error.\r\n\r\nIf you have the objects as stored in the DB (right from mongo) and one after transformation, that would help.\r\n"}}
{"actor":{"display_login":"flovilmart"}}