-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Error stops components from rendering, without error message or console feedback #10117
Comments
Never mind, I misread. You’re saying it doesn’t reproduce there. |
@achobanov this kind of issue is almost always caused by some other code swallowing the error. I suggest using the "Pause on caught exceptions" option in Chrome devtools to try and locate the source. |
One common example of how this happens: promise.then(() => {
this.setState(...);
// or store.dispatch(...);
}).catch(() => {
this.setState(...);
// or store.dispatch(...);
}); Note how in code like this errors from the first |
I could not reproduce it, but you can observe it in home. Two images should appear, but they don't. I think that code execution stops when trying to render Post element for the first time, because of the phantom error. @gaearon I understand your example, but that that's not what's happening here, because I don't use any form of catch. @aweary I will try that. |
@aweary You were right, it does pause with that option selected, but the error thrown is a jQuery one, not the one I know is causing the issue, so something is a miss here. Error message: |
Have you tried fixing the jQuery error? |
I have no idea what is this |
@achobanov it's very likely that the error is being caught and unhandled somewhere in your code path. We get reports like this frequently (errors being swallowed) and it's almost always due to some user or third-party code mishandling errors. You can try to debug it pausing on uncaught exceptions and walking the call stack, looking for any functions calls that may be wrapped in |
For what it’s worth we just released React 16 Beta which logs any errors inside React to the console in development. Even if the application code swallows them. So I think we can close this, and I hope this helps you find the issue! |
This feels like a bug.
I had a faulty code - trying to bind undefined function (I forgot to pass it down from parent). However there was no
Cannot read propery bind of undefined
error thrown and noconsole errors
as well. It took me a while to figure out what the problem was.For the past 30 minutes I have tried reproducing the error with different data, without any luck. I even copied the minimal amount of source files into another project and the error was thrown. I don't know what else to do. If you want to investigate: I setup this branch. The described behavior can be observed in home / root. I cannot provide more information, since I don't have any. I really spent some time trying to replicate it, but to no success.
Expected behavior would be throwing an error, obviously.
I have no idea about previous versions of React, because I only now encounter it. I haven't updated React in the meantime. Version is 15.6.1, as shown in
package.json
. I am using latest Chrome and Windows 10.The text was updated successfully, but these errors were encountered: