parse-community / ParseReact

Seamlessly bring Parse data into your React applications.
https://parseplatform.org
Other
1.3k stars 209 forks source link

Cannot Call currentUser() when using a platform with asynch storage system. #172

Closed mrbrackins closed 8 years ago

mrbrackins commented 8 years ago

Receiving this error when including ParseReact in React Native. screen shot 2016-03-28 at 1 22 14 pm

I'm just creating the Comment Block component on the ParseReact NPM page: https://www.npmjs.com/package/parse-react

andrewimm commented 8 years ago

Can you provide the version of the parse module that you have installed?

andrewimm commented 8 years ago

Nevermind, I see the Live Query stuff in the stack trace. As I mentioned in the other post, and as it says at the top of the README, Parse+React is only compatible with the Parse SDK up to v1.6.14

mrbrackins commented 8 years ago

I actually have that version installed: "parse": "^1.6.14",

mrbrackins commented 8 years ago

screen shot 2016-03-28 at 1 33 36 pm

andrewimm commented 8 years ago

The lines including LiveQuery in your stack trace are code that only exists since version 1.8.0. I'd take a look at the package.json in your node_modules/parse folder, or try logging require('parse').CoreManager.get('VERSION')

mrbrackins commented 8 years ago

ah, gotcha. Thx for bearing w/ me!

oyvindvol commented 7 years ago

I am using parse 1.6.14, and still get that error in the simulator.

Cannot call currentUser() when using a platform with an async storage system. Call currentUserAsync() instead.