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
Logbox warnings/errors raised during component render don't have useful content #29424
Comments
This issue continues to irritate my team. I'm sure this isn't how LogBox was intended to operate but the above linked reproduction shows that this happens on a fresh empty project. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Can confirm, this keeps happening. |
I've just updated my app to latest react-native (0.65.1) and it still happens. |
Same problem here. |
I keep coming back to this ticket every year or so. It's amazing it hasn't made more noise, the logbox is pretty core functionality for developers and it's been useless since its inception! |
I had forgotten I even reported this ticket years ago. Agreed, logbox is and has been useless since it was introduced. Unfortunately I don't think anybody from the react-native team actively looks at issues on this repo. To me it seems they want to benefit from community contributions but don't want to assign manpower to community maintenance. Issues just go without attention unless they impact facebook or a community member fixes them 🤷 |
With as big of an issue this is for me, but with as little attention this gets, I wonder if it has something to do with the overall structure of our app (functional components vs class components?). Maybe if I stop using functional components and switch to class components? The stack trace has SO much garbage. I wish it would filter down to only local components. Perhaps this just shows how much overhead react native has, and I should switch to native android |
Evan Bacon (expo developer) commented on the issue a couple of months ago:
|
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Description
If a Logbox error or warning is raised during component render there is no information about which component raised the error, its stack, or its position in the view hierarchy. Information printed is just a stack of the call to
addLog(log: LogData)
insideLogBoxData.js:197
instead of information about the component that logged the warn/error.Screenshots illustrate better from a fresh react-native-init with a console.warn added to a function component:
It's all internal info, nothing very useful.
React Native version:
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
react-native init TestProject
console.warn("something")
anywhere in App.jsExpected Results
Expected to see information about the component where the error or warning was logged.
Snack, code example, screenshot, or link to a repository:
Repo created with exactly the above steps:
https://github.com/AndrewMorsillo/LogBoxStackError
The text was updated successfully, but these errors were encountered: