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

React Error Logging Pattern & Auth0 Lock Error #25

Open
JakeIwen opened this issue Nov 9, 2017 · 2 comments
Open

React Error Logging Pattern & Auth0 Lock Error #25

JakeIwen opened this issue Nov 9, 2017 · 2 comments
Labels

Comments

@JakeIwen
Copy link
Collaborator

JakeIwen commented Nov 9, 2017

The first two errors have been a constant issue since I started with this project. I gather that something is looking for the login screen's Auth0 element that has the id 'lock' assigned to it. I believe this error sometimes occurs after successful login.
Any tips on where I should look to track this down?

The last error is an example of how sometimes react errors do not provide the source file name in the stack trace. Do you know why this is or how to get better error logging?

@carlpeaslee

main.e3dcb109.js:38 Uncaught Error: Can’t find element with id lock
    at t.ensure (main.e3dcb109.js:38)
    at t.render (main.e3dcb109.js:38)
    at t.render (main.e3dcb109.js:38)
    at main.e3dcb109.js:37
    at Object.render-1 (main.e3dcb109.js:4)
    at main.e3dcb109.js:39
    at Array.forEach (<anonymous>)
    at e._change (main.e3dcb109.js:39)
    at e.swap (main.e3dcb109.js:39)
    at s (main.e3dcb109.js:4)
load.js:1 51

main.e3dcb109.js:38 Uncaught Error: Can’t find element with id lock
    at t.ensure (main.e3dcb109.js:38)
    at t.render (main.e3dcb109.js:38)
    at t.render (main.e3dcb109.js:38)
    at main.e3dcb109.js:37
    at Object.render-1 (main.e3dcb109.js:4)
    at main.e3dcb109.js:39
    at Array.forEach (<anonymous>)
    at e._change (main.e3dcb109.js:39)
    at e.swap (main.e3dcb109.js:39)
    at s (main.e3dcb109.js:4)

main.e3dcb109.js:9 Uncaught TypeError: Cannot read property ‘genres’ of null
    at t.<anonymous> (main.e3dcb109.js:42)
    at d._processPendingState (main.e3dcb109.js:61)
    at d.performInitialMount (main.e3dcb109.js:61)
    at d.mountComponent (main.e3dcb109.js:61)
    at Object.mountComponent (main.e3dcb109.js:9)
    at d.performInitialMount (main.e3dcb109.js:61)
    at d.mountComponent (main.e3dcb109.js:61)
    at Object.mountComponent (main.e3dcb109.js:9)
    at d._updateRenderedComponent (main.e3dcb109.js:61)
    at d._performComponentUpdate (main.e3dcb109.js:61)
@carlpeaslee
Copy link
Contributor

The error logging thing is a bit of a conundrum for me. And I agree that its annoying.

So the pretty errors comes from Webpack which comes from ejected create-react-app scripts. I think that error logging could be improved by going into the scripts and possibly adding new webpack plugins or babel configurations. You could look to see what the current create-react-app currently does to make pretty errors and then add those packages to our app?

@carlpeaslee
Copy link
Contributor

That specific error about can't find element with id lock probably has something to do with the code that tries to create the Auth0Lock running before the actual div with id 'lock' gets mounted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants