question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong source map is generated

See original GitHub issue

We 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:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
anandprabhucommented, Apr 3, 2018

@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

4reactions
rafecacommented, Apr 10, 2018

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):

onPress@303:987
...

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found