Skip to content
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

Incorrect error stack when throwing from generator function #16107

Closed
madox2 opened this issue Sep 26, 2017 · 1 comment
Closed

Incorrect error stack when throwing from generator function #16107

madox2 opened this issue Sep 26, 2017 · 1 comment
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@madox2
Copy link

madox2 commented Sep 26, 2017

Hi, usually when error is logged or thrown in react native I get stack trace like this:

function willLogError() {
  console.error(new Error())
}
willLogError()
Error
    at willLogError (index.android.js:54)
    at index.android.js:56
    at loadModuleImplementation (require.js:174)
    at guardedLoadModule (require.js:119)
    ...

However when I log error from inside generator:

function* willLogError() {
  console.error(new Error())
}
var gen = willLogError()
gen.next()
Error
    at willLogError$ (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:1343:25)
    at tryCatch (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:14373:40)
    at Generator.invoke [as _invoke] (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:14561:22)
    at Generator.prototype.(anonymous function) [as next] (http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:14398:21)
    ....

The filepaths in stacktrace contain whole url (http://localhost:8081/...). Chrome is unable to detect source maps for such errors which is giving me a hard time during debugging (for example redux sagas).

I am running it on real android device while remote js debugging.

$ node -v
v8.1.3
$ react-native -v
react-native-cli: 2.0.1
react-native: 0.48.4
@pull-bot
Copy link

pull-bot commented Oct 9, 2017

Hey, thanks for reporting this issue!

It looks like your description is missing some necessary information, or the list of reproduction steps is not complete. Can you please add all the details specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported.

I am going to close this, but feel free to open a new issue that meets the requirements set forth in the template. Thanks!

@hramos hramos closed this as completed Oct 9, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Oct 9, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants