Wrong source map is generated
See original GitHub issueWe came from this discussion on react-native
repo where @hramos recommend us to move the issue here: https://github.com/facebook/react-native/issues/6946
You can find all the detailed information in there. Tho, to summarize: the packager generates the sourcemap with wrong lines more times that I’d like to recon.
Problem is still raising in latests versions. Thank you 😃
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Wrong SourceMap genrated · Issue #434 - GitHub
If a pre-generated source map has an absolute URL in its sources , then that's how it was meant to be by the...
Read more >4 Reasons Why Your Source Maps are Broken - Sentry Blog
Missing or incorrect source map directive ... But generating a source map isn't worth diddly if the browser can't find it.
Read more >What is wrong with SOURCE MAPS and how not to mess with ...
Hello, my name is Dmitriy Karlovskiy and I have... post-traumatic stress disorder after generating sourcemaps. And today, with your help, ...
Read more >Webpack sass-loader generating wrong / broken source maps
I'm trying to generate correct source maps for an large project (using monorepo, aliases for loading files from other sibling project, ...
Read more >Source map errors — Firefox Source Docs documentation
The error tells us that the source map is not JSON data — so we're serving the wrong file. There are a few...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rafeca and @sospedra Here is a simple test repository to reproduce the issue along with the steps i have followed. https://github.com/anandprabhu/HelloRN
Hey @anandprabhu , I’ve spent some time debugging the issue. First of all, thanks for the test repository and the repro instructions, it makes it so much easier to debug these kind of issues 👍
After reproducing it, I think that the issue comes from React Native itself (not sure if it’s from some native layer of from the JS interpreter).
What makes me think that is that the first line that gets reported by
pidcat
is already wrong (before even being symbolicated using the sourcemaps):To check that, you can open the actual minified bundle from
android/app/build/intermediates/assets/release/index.android.bundle
and go to line 303, column 987 and you’ll see that it does not point indeed to the place where the error is thrown.From this point, metro sourcemaps are working fine, since they translate that position to its corresponding source position.
I think that with this additional information, the discussion can be moved back to https://github.com/facebook/react-native/issues/6946