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

Error: Tried to encode an invalid date. #1077

Closed
gimdongwoo opened this issue Mar 17, 2016 · 5 comments
Closed

Error: Tried to encode an invalid date. #1077

gimdongwoo opened this issue Mar 17, 2016 · 5 comments

Comments

@gimdongwoo
Copy link

For implementation related questions or technical support, please refer to the stackoverflow community.

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Environment Setup

local & heroku

Steps to reproduce

curl -X GET
-H "X-Parse-Application-Id: "
http://localhost:5000/parse/classes/Alarms

Logs/Trace

web.1 | Uncaught internal server error. [Error: Tried to encode an invalid date.] Error: Tried to encode an invalid date.
web.1 | es/parse-server/lib/transform.js:714:31)

@hramos
Copy link
Contributor

hramos commented Mar 18, 2016

Hi @gimdongwoo, the best way to illustrate an issue is with a failing test. Any chance you can pinpoint the specific object that causes Parse Server to respond with this error message?

@campers
Copy link

campers commented Mar 20, 2016

I'm getting the same with v2.1.6 error from a call to Parse.Query.lessThan()

My cloud code is
var birthdateTo = new Date()
birthdateTo.setFullYear(birthdateTo.getFullYear() - profile.ageFrom)
profileQuery.lessThan("birthdate", birthdateTo)

and the rest of my stack trace is:
parse-server-example/node_modules/parse-server/node_modules/parse/lib/node/encode.js:69:13)
parse-server-example/node_modules/parse-server/node_modules/parse/lib/node/encode.js:95:10)
parse-server-example/node_modules/parse-server/node_modules/parse/lib/node/ParseQuery.js:171:61)
parse-server-example/node_modules/parse-server/node_modules/parse/lib/node/ParseQuery.js:533:19)

@hramos
Copy link
Contributor

hramos commented Apr 2, 2016

Parse Cloud Code and parse-server Cloud Code are two different environments, and there are bound to be some small differences between the two.

We are closing this issue due to a lack of sufficient information. Note that we expect that some developers will need to update their Cloud Code when migrating to parse-server, and we are not considering minor differences between the two environments as actionable issues in parse-server.

Please refer to this issue for an example of a great bug report.

You may use Server Fault for questions about managing Parse Server.

For code-level and/or implementation-related questions or technical support, please refer to Stack Overflow.

@nodechefMatt
Copy link
Contributor

This pull request should fix this issue
#3389

@decider
Copy link

decider commented Feb 9, 2017

I found this issue to happen anytime we try to save a date with a UTC offset of +0000

This is even after updating to [email protected]

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

5 participants