ignite
ignite copied to clipboard
How to get useful stack traces for promises?
What's going on?
Out of the box any errors in promises gives absolutely no information as to what is happening and doesn't really contain a useful stack trace. I've seen this issue posted a lot including in reactotron https://github.com/infinitered/reactotron/issues/646 but what is the recommended way to do this in ignite? Is there something I need to enable?
Steps to reproduce
- throw any error in a promise
npx ignite-cli doctor
results:
This is something that has been very annoying for me as well. We need to dig into why these are happening and see if there's anything we can do on Ignite or if it's a React Native problem.
I've read certain solutions not specific to RN that suggest we replace the native Promise library with bluebird by do something like __dev__ ? global.Promise = require("bluebird") : global.promise
although I have not tried that yet.
There has been a lot of changes since this issue last had activity. This is going to be closed for now, but please re-open if this still needs attention.