TypeError: Cannot read properties of null (reading 'loginWithRedirect')

Please include the following information in your post:

  • Which SDK this is regarding: : auth0-spa-js
  • SDK Version: 1.18
  • Platform Version: e.g. Node 12.19.0
  • Code Snippets/Error Messages/Supporting Details/Screenshots:

Hi guys,

I am experiencing some issues with the auth0-spa-js package. I am assuming this is happening from my fault :D. and I would want to get your opinion instead of posting directly on the GitHub repo, please.
So, I am using the version 1.18 of auth0-spa-js package in a Vue application and after following the first steps of implementing and using the library and I am often getting the following error: "Cannot read properties of null (reading loginWithRedirect).


Due to this error I can’t login it and i have to clear the cookies.

I am seeing that isAuthenticated is set to true and i am guessing this is the problem but I wonder why is that?
I know this has been already discussed in other topics and I am not trying to be an ignorant but I am not able to understand what exactly I did wrong.
Could you please help? I appreciate you are taking the time to read this!

Thank you again!

Best regards,

The same issue for me. Issue appeared after page reloaded. The same SDK.

Hey there everyone!

Have you tried raising it as a GitHub issue in the SDK to have that directly addressed with repo maintainers?