MoralisWeb3 / react-moralis

Hooks and components to use Moralis in a React app
MIT License
623 stars 167 forks source link

× Error: You need to call Parse.initialize before using Parse. #3

Closed n37r09u3 closed 3 years ago

n37r09u3 commented 3 years ago
thomasender commented 3 years ago

Can you provide a little more info about how to reproduce this? Often, this error comes up for me when Moralis has not been initialized yet.

ErnoW commented 3 years ago
  • I'm submitting a ... [x ] bug report
  • Summary lost APPLICATION_ID when refresh page and raise error in file moralis/lib/browser/Storage.js
  if (!_CoreManager.default.get('APPLICATION_ID')) {
      throw new Error('You need to call Parse.initialize before using Parse.');
    }
  • Other information use react router

Make sure to wrap your app in the <MoralisProvider> and only call functionalities once Moralis has been initialized. You can check const { isInitialized } = useMoralis() for this.

I hope this helps. Otherwise please provide details and code on how to reproduce this error at forum.moralis.io and we will help you to solve this issue.