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

Minified React error #37 on Production only #1859

Closed
kbariotis opened this issue Aug 19, 2017 · 14 comments
Closed

Minified React error #37 on Production only #1859

kbariotis opened this issue Aug 19, 2017 · 14 comments

Comments

@kbariotis
Copy link
Contributor

kbariotis commented Aug 19, 2017

I am getting this error on production build only and I am having trouble debugging it. Do you have any idea what my causing it or how to debug?

The error is completely random and on random pages on my site. I cant find common components that may be causing it.

Thank you

Uncaught Error: Minified React error #37; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=37 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at n (reactProdInvariant.js:31)
    at Object._renderNewRootComponent (ReactMount.js:310)
    at Object._renderSubtreeIntoContainer (ReactMount.js:401)
    at Object.render (ReactMount.js:422)
    at production-app.js:198
    at r (loader.js:318)
    at loader.js:337
    at loader.js:112
    at loader.js:95
    at index.json?832c:11
@jsardev
Copy link

jsardev commented Aug 19, 2017

What version of Gatsby are you using? I think this issue has been resolved few days ago: #1712

@kbariotis
Copy link
Contributor Author

@sarneeh aha! Indeed I was using an older version of Gatsby. Switched to the latest. I will let you know if that fixed the issue cause its really random. Thanks :)

@kbariotis
Copy link
Contributor Author

@sarneeh it seems like the issue is still there, even with the latest Gatsby release. Any other idea?

@jsardev
Copy link

jsardev commented Aug 20, 2017

@kbariotis Ok, so two questions:

  1. Show me your HTML component
  2. How do you know that the issue is still there. Do you replicate it yourself from time to time?

I'm not a Gatsby contributor and I don't know what could cause the problem but I've got this issue myself and bumping the version has fixed it for me :)

@kbariotis
Copy link
Contributor Author

@sarneeh you can find everything on my repo. I am replicating from time to time. Try to load the site, navigate around and hit the refresh button on every navigation. Watch the console log.

@KyleAMathews
Copy link
Contributor

What is the actual error? I.e. if you visit the react site?

@kbariotis
Copy link
Contributor Author

@KyleAMathews are you referring to this?

The error is:

Error Decoder

In the minified production build of React, we avoid sending down full error messages in order to reduce the number of bytes sent over the wire.

We highly recommend using the development build locally when debugging your app since it tracks additional debug info and provides helpful warnings about potential problems in your apps, but if you encounter an exception while using the production build, this page will reassemble the original text of the error.

The full text of the error you just encountered is:

_registerComponent(...): Target container is not a DOM element.

@KyleAMathews
Copy link
Contributor

Yes that one :-)

If you search for that error then https://github.com/gatsbyjs/gatsby/issues?utf8=✓&q=is%3Aissue%20target%20container

@kbariotis
Copy link
Contributor Author

@KyleAMathews I see but all of these issues seem to have been resolved, so I was expecting the latest version of Gatsby to not have this issue. I am still investigating though.

@KyleAMathews
Copy link
Contributor

Hmm yeah the intermittent error sounds like #1712

@KyleAMathews
Copy link
Contributor

You don't have a service worker by chance? Perhaps you're seeing old code.

@kbariotis
Copy link
Contributor Author

Nop, no service worker. :)

@kbariotis
Copy link
Contributor Author

Take a look on this: notice how the same error message is coming from two different traces. The highlighted line is from the second message that I clicked on production-app.js:198.

screen shot 2017-08-20 at 16 36 31

@KyleAMathews
Copy link
Contributor

Closing out old issues. Please open a new issue if you're still seeing trouble!

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

No branches or pull requests

3 participants