Closed newsiberian closed 7 years ago
+1 Yea I also just noticed that my errors were swallowed so we don't know where the error is coming from
I made a repo of what the issue. I've been using your boilerplate (Love it btw! Appreciate all the work you've been doing).
https://github.com/kennethtruong/react-universally/blob/master/src/shared/components/DemoApp/Home/Home.js#L6
Usually if the error isn't swallowed by the catch in https://github.com/ctrlplusb/react-async-component/blob/master/src/asyncComponent.js#L134
It would say Uncaught (in promise) TypeError: Cannot read property 'error' of null
at Line 12 of HomeRoute.js.
But right now it just throws an Error somewhere in the React components rendering stack and it'll be hard to trace where the issue came from.
I'm not too familiar with the reasoning with catching the error instead of letting it propagate but maybe you can log the error?
Sorry chaps, this was a total messup by me. I accidentally commented out the respective logging section. Fix will be released today.
I did notice that theres a check for node for logging but will your fix account for when SSR is disabled?
Yep, already added || env === 'browser'
Thanks for following up :)
Oh great! Thanks for the quick responses!
No problem :)
I have just released a new package. I also noticed my react-async-bootstrapper
/ react-tree-walker
were swallowing errors, so I have updated them accordingly too.
Hey guys, for me it swallows errors with TypeError: null is not an object (evaluating 'oldNode.parentNode.replaceChild')
. Is this related/expected behaviour or not?
Hi,
I'm build a route with with
asyncComponent
and got an unrelated error, but then component wrapped withasyncComponent
, there is no any errors in browser console, just clean screen. I can catch it only via React dev tool:but, if I use component without wrapping in
asyncComponent
, then I got an error in browser console, like this: