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

missing filenames vs right line #102

Open
hoschi opened this issue Jun 15, 2017 · 12 comments
Open

missing filenames vs right line #102

hoschi opened this issue Jun 15, 2017 · 12 comments

Comments

@hoschi
Copy link

hoschi commented Jun 15, 2017

After PR #94 I now have wrong line numbers when using eval, but filen ames for every step in the trace:
2017-06-15-090031_581x570_scrot

with cheap-module-source-map I get right line numbers, but no file names for npm dependencies:
2017-06-15-091450_828x456_scrot

on place 6: "NewsStreamListWidget" the error is in line 16. I tried also some other devtools, with the same result.

I tried version 1.4.1 and 1.4.2

@davidpfahler
Copy link
Member

@hoschi Thanks for reporting! It seems to be actually pretty difficult to get this right. @borela As this was your PR, would you please have a look at this?

@borela
Copy link
Contributor

borela commented Jun 15, 2017

@hoschi eval will always generate the "wrong line numbers" because it is showing the lines in relation to the generated code not the original source. You can see in this table, the quality column shows which methods targets the original source file.

Can you create a minimal repo so that I can do some tests with mixed stacks? For now, try to use the options eval-source-map or source-map and see if it stops generating mixed stacks.

@davidpfahler The option cheap-module-source-map in his case is generating a mixed stack trace with links and file names which I talked about in this pull. I can give it a shot to try to support them.

@davidpfahler
Copy link
Member

@borela If we haven't supported this before, it's not a regression. In that case, there is not rush, although it would be cool, of course, to support mixed stacks.

@hoschi
Copy link
Author

hoschi commented Jun 17, 2017

@borela I'll try the other devtools and report back. Minimal repo is hard to do, because I don't know/have an idea whats the cause for this and what parts of the original project I should put in the minimal repo. The original project is a really big and complex customer closed source project, so I can't point you to that directly :(

@hoschi
Copy link
Author

hoschi commented Jun 19, 2017

@borela with source-map it is the same as for cheap-module-source-map for eval-source-map it shows no filename and no line numbers at all:
2017-06-19-131255_660x417_scrot
Unfortunately I don't know where I put created an error last time, that way the method names are other ones that in my first screenshot.

@borela
Copy link
Contributor

borela commented Jun 19, 2017

@hoschi
Copy link
Author

hoschi commented Jun 22, 2017

@borela here it is

eval
TypeError: Cannot read property 'bar' of undefined
    at new NewsStreamListWidget (NewsStreamListWidget.js:32)
    at eval (createClassProxy.js:95)
    at instantiate (createClassProxy.js:103)
    at NewsStreamListWidget (eval at proxyClass (createClassProxy.js:NaN), <anonymous>:4:17)
    at eval (ReactCompositeComponent.js:306)
    at measureLifeCyclePerf (ReactCompositeComponent.js:75)
    at ReactCompositeComponentWrapper._constructComponentWithoutOwner (ReactCompositeComponent.js:305)
    at ReactCompositeComponentWrapper._constructComponent (ReactCompositeComponent.js:280)
    at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:188)
    at Object.mountComponent (ReactReconciler.js:46)


cheap-eval-source-map
TypeError: Cannot read property 'bar' of undefined
    at new NewsStreamListWidget (eval at 3154 (0.0.0a13794….chunk.js:814), <anonymous>:32:21)
    at eval (eval at <anonymous> (main.9086c96….js:13224), <anonymous>:95:24)
    at instantiate (eval at <anonymous> (main.9086c96….js:13224), <anonymous>:103:9)
    at NewsStreamListWidget (eval at proxyClass (eval at <anonymous> (main.9086c96….js:13224)), <anonymous>:4:17)
    at eval (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:306:16)
    at measureLifeCyclePerf (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:75:12)
    at ReactCompositeComponentWrapper._constructComponentWithoutOwner (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:305:14)
    at ReactCompositeComponentWrapper._constructComponent (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:280:21)
    at ReactCompositeComponentWrapper.mountComponent (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:188:21)
    at Object.mountComponent (eval at <anonymous> (main.9086c96….js:2009), <anonymous>:46:35)


cheap-source-map
TypeError: Cannot read property 'bar' of undefined
    at new NewsStreamListWidget (NewsStreamListWidget.js:22)
    at createClassProxy.js:95
    at instantiate (createClassProxy.js:103)
    at NewsStreamListWidget (eval at proxyClass (createClassProxy.js:110), <anonymous>:4:17)
    at ReactCompositeComponent.js:306
    at measureLifeCyclePerf (ReactCompositeComponent.js:75)
    at ReactCompositeComponentWrapper._constructComponentWithoutOwner (ReactCompositeComponent.js:305)
    at ReactCompositeComponentWrapper._constructComponent (ReactCompositeComponent.js:280)
    at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:188)
    at Object.mountComponent (ReactReconciler.js:46)


cheap-module-eval-source-map
TypeError: Cannot read property 'bar' of undefined
    at new NewsStreamListWidget (eval at 3154 (0.0.0a13794….chunk.js:814), <anonymous>:32:21)
    at eval (eval at <anonymous> (main.9086c96….js:13224), <anonymous>:95:24)
    at instantiate (eval at <anonymous> (main.9086c96….js:13224), <anonymous>:103:9)
    at NewsStreamListWidget (eval at proxyClass (eval at <anonymous> (main.9086c96….js:13224)), <anonymous>:4:17)
    at eval (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:306:16)
    at measureLifeCyclePerf (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:75:12)
    at ReactCompositeComponentWrapper._constructComponentWithoutOwner (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:305:14)
    at ReactCompositeComponentWrapper._constructComponent (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:280:21)
    at ReactCompositeComponentWrapper.mountComponent (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:188:21)
    at Object.mountComponent (eval at <anonymous> (main.9086c96….js:2009), <anonymous>:46:35)


cheap-module-source-map
TypeError: Cannot read property 'bar' of undefined
    at new NewsStreamListWidget (NewsStreamListWidget.js:21)
    at createClassProxy.js:95
    at instantiate (createClassProxy.js:103)
    at NewsStreamListWidget (eval at proxyClass (createClassProxy.js:110), <anonymous>:4:17)
    at ReactCompositeComponent.js:306
    at measureLifeCyclePerf (ReactCompositeComponent.js:75)
    at ReactCompositeComponentWrapper._constructComponentWithoutOwner (ReactCompositeComponent.js:305)
    at ReactCompositeComponentWrapper._constructComponent (ReactCompositeComponent.js:280)
    at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:188)
    at Object.mountComponent (ReactReconciler.js:46)


eval-source-map
TypeError: Cannot read property 'bar' of undefined
    at new NewsStreamListWidget (eval at 3154 (0.0.0a13794….chunk.js:814), <anonymous>:32:21)
    at eval (eval at <anonymous> (main.9086c96….js:13224), <anonymous>:95:24)
    at instantiate (eval at <anonymous> (main.9086c96….js:13224), <anonymous>:103:9)
    at NewsStreamListWidget (eval at proxyClass (eval at <anonymous> (main.9086c96….js:13224)), <anonymous>:4:17)
    at eval (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:306:16)
    at measureLifeCyclePerf (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:75:12)
    at ReactCompositeComponentWrapper._constructComponentWithoutOwner (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:305:14)
    at ReactCompositeComponentWrapper._constructComponent (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:280:21)
    at ReactCompositeComponentWrapper.mountComponent (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:188:21)
    at Object.mountComponent (eval at <anonymous> (main.9086c96….js:2009), <anonymous>:46:35)


eval-source-map
TypeError: Cannot read property 'bar' of undefined
    at new NewsStreamListWidget (eval at 3154 (0.0.0a13794….chunk.js:814), <anonymous>:32:21)
    at eval (eval at <anonymous> (main.9086c96….js:13224), <anonymous>:95:24)
    at instantiate (eval at <anonymous> (main.9086c96….js:13224), <anonymous>:103:9)
    at NewsStreamListWidget (eval at proxyClass (eval at <anonymous> (main.9086c96….js:13224)), <anonymous>:4:17)
    at eval (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:306:16)
    at measureLifeCyclePerf (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:75:12)
    at ReactCompositeComponentWrapper._constructComponentWithoutOwner (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:305:14)
    at ReactCompositeComponentWrapper._constructComponent (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:280:21)
    at ReactCompositeComponentWrapper.mountComponent (eval at <anonymous> (main.9086c96….js:12743), <anonymous>:188:21)
    at Object.mountComponent (eval at <anonymous> (main.9086c96….js:2009), <anonymous>:46:35)


source-map
TypeError: Cannot read property 'bar' of undefined
    at new NewsStreamListWidget (NewsStreamListWidget.js:21)
    at createClassProxy.js:95
    at instantiate (createClassProxy.js:103)
    at NewsStreamListWidget (eval at proxyClass (createClassProxy.js:110), <anonymous>:4:17)
    at ReactCompositeComponent.js:306
    at measureLifeCyclePerf (ReactCompositeComponent.js:75)
    at ReactCompositeComponentWrapper._constructComponentWithoutOwner (ReactCompositeComponent.js:305)
    at ReactCompositeComponentWrapper._constructComponent (ReactCompositeComponent.js:280)
    at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:188)
    at Object.mountComponent (ReactReconciler.js:46)

@borela
Copy link
Contributor

borela commented Jun 22, 2017

@hoschi Thank you! In this line:
at NewsStreamListWidget (eval at proxyClass (eval at <anonymous> (main.9086c96….js:13224)), <anonymous>:4:17)

Is the file main.9086c96….js available in Chrome? I am not sure how to load that one. The ellipsis is giving me the impression that the stack is not receiving the full file name.

@hoschi
Copy link
Author

hoschi commented Jun 27, 2017

@borela it can be downloaded, here a screenshot for cheap-module-source-map
2017-06-27-115747_785x116_scrot

@hoschi
Copy link
Author

hoschi commented Jun 27, 2017

I thought the ellipsis came just form the formatted stacktrace output of console.log?! I saved the error instance in a variable and accessing this in chrome gives another version of printed text. This is with cheap-module-eval-source-map as it has the ellipsed file name:
2017-06-27-121005_1011x1384_scrot

EDIT: When I hover over the file name it shows me the full text

@hoschi
Copy link
Author

hoschi commented Jun 27, 2017

Here is the code and the error logged right before passing it to RedBox, see big comment block for details where the previous error was taken from.

2017-06-27-121810_1011x1384_scrot
2017-06-27-121818_1186x933_scrot

@borela
Copy link
Contributor

borela commented Jun 30, 2017

@hoschi Can you create a minimal repo? I wasn't able to recreate mixed stacks like you have in cheap-source-map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants