Running into crash in auth-spa library: TypeError: Cannot read properties of null (reading 'location')

Please include the following information in your post:

  • Which SDK this is regarding:@auth0/auth0-spa-js”: { “version”: “1.19.1”,
  • SDK Version: 1.19.1
  • Platform Version: e.g. Node v14.17.6
  • Code Snippets/Error Messages/Supporting Details/Screenshots:

I am just calling await auth.loginWithPopup(); in a scenario where getTokenSilently() has failed with a “login required” error.

Rather than see the login popup appear, I just get a crash: “TypeError: Cannot read properties of null (reading ‘location’)”

Any ideas what I am doing wrong here? Screenshot shows where in the library, the error is being thrown.

Is this a feature request or bug report? If so, please create an issue directly in the corresponding GitHub repo. The Community SDK category is for general discussion and support.

Hey there!

The most effective way to handle that would be to raise it as a GitHub issue so we can get that addressed directly by the repo maintainers. Once you have a link to it you can share it here so we can ping them. Thank you!