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

Can't parse dates from cloud code using JS SDK 1.6.+ #157

Closed
d370urn3ur opened this issue Sep 28, 2015 · 2 comments
Closed

Can't parse dates from cloud code using JS SDK 1.6.+ #157

d370urn3ur opened this issue Sep 28, 2015 · 2 comments
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@d370urn3ur
Copy link

In reference to #130. Every time I call cloud code built with JS SDK 1.6.+ I get an error: "java.lang.NullPointerException: Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference". The issue was closed but this is still not working for me. I am on JS SDK 1.6.2 and Android SDK 1.10.2. Response format hasn't changed from #130's original post: "createdAt":{"__type":"Date","iso":"2015-09-24T09:39:21.972Z"}, seems like Android SDK is expecting "createdAt":"2015-09-24T09:39:21.972Z". So it fails to parse the format and results in the Date object being null, then calling getTime() throws the error.

@wangmengyan95 wangmengyan95 added the type:bug Impaired feature or lacking behavior that is likely assumed label Sep 29, 2015
@andrewimm
Copy link

@d370urn3ur can you verify that you are using the JS SDK 1.6.2? The relevant changes were checked into 1.6.1, but we have an issue where specifying "latest" in cloud code reverts back to 1.6.0. We plan to have this solved in cloud code by tomorrow, but until then can you make sure you're hard-coding your JS version into config/global.json?

@d370urn3ur
Copy link
Author

It's weird, I thought I had explicitly set it as 1.6.2 but apparently I was using "latest". Didn't know about the "latest" bug, I can confirm that 1.6.2 is sending updatedAt in the correct format. Thanks for the quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

3 participants