Source map line number is shifted
See original GitHub issueThis produces at least on Android
I am generating source maps but adding extra packager args in my build.gradle
like this
project.ext.react = [
extraPackagerArgs: isCiBuilding
? ["--sourcemap-output", "pathtoMyFolder/index.android.bundle.map"]
: []
]
After that I just upload that source map file to Bugsnag which is my crashreporter. The crash gives me right file .tsx extension but the line is wrong.
Can you help me to solve this? How to start debugging this? Do I have to pass some arguments to transformer or something?
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (5 by maintainers)
Top Results From Across the Web
Shift the offset during eval (using sourcemap) - Stack Overflow
The problem is when I put a breakpoint or debugger inside the code, it stops two lines after the correct one because of...
Read more >Source map line numbers mismatch (Angular) - Elastic Discuss
I am using Angular 9 and elastic/apm-rum-angular version 1.1.6. I uploaded the source maps generated by running "ng build --source-map".
Read more >source-map - NPM Package Compare versions - Socket.dev
Start using Socket to analyze source-map and its 0 dependencies to secure your app from supply ... originalLine: The line number in the...
Read more >What Are Source Maps and How to Properly Use Them
How to use javascript source map to debug compiled code. ... at the original source code including the original line numbers, column numbers...
Read more >Source Maps - Rollbar Docs
Benefits of providing your source maps to Rollbar include: Stack traces will contain the original source filename, line number, method name, and code ......
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
Sorry I haven’t looked into this issue
I have put this comment on other issue (https://github.com/ds300/react-native-typescript-transformer/issues/11) but seems that one is closed. Since this one is related so putting it here.
I have tried to test this issue with new version of React Native and I am still able to reproduce it on both android and iOS. I have forked https://github.com/hffmnn/react-native-typescript-starter which is itself a fork of https://github.com/cbrevik/react-native-typescript-starter.
My changes just include changing various versions of dependencies in package.json
So here are the steps
Once you get the bundle generated using above commands, you run the respective android and iOS projects.
For Android project
You will get the following exception which is right
When you try
./symbolicate.js android/main.jsbundle.map 346 460
it will give you
/react_native/react-native-typescript-starter/src/index.tsx:20:10
However this is wrong. The correct result should be
/react_native/react-native-typescript-starter/src/index.tsx:22:10
For iPhone
When you run the app on iPhone you will get the following
When you try
./symbolicate.js ios/main.jsbundle.map 349 437
you get the following
/react_native/react-native-typescript-starter/src/index.tsx:18:0
However this is wrong. The correct result should be
/react_native/react-native-typescript-starter/src/index.tsx:22:10
Its worth mentioning here that the results generated with bundle using --dev true are correct. The issue reproduces only with --dev false.
From the other comments, it looks like this issue is resolved. Could somebody point to me where am I going wrong? Thanks for the help.