ignite icon indicating copy to clipboard operation
ignite copied to clipboard

How to get useful stack traces for promises?

Open 1mike12 opened this issue 3 years ago • 2 comments

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

  1. throw any error in a promise

npx ignite-cli doctor results:

1mike12 avatar Oct 01 '21 18:10 1mike12

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.

jamonholmgren avatar Oct 22 '21 18:10 jamonholmgren

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.

1mike12 avatar Oct 25 '21 13:10 1mike12

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.

joshuayoes avatar Oct 04 '22 17:10 joshuayoes