-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
Highlighted line is off by one line on non existing property #3239
Comments
Hey @the-skins-app, thanks for reporting and the details - we'll investigate. Please let us know if you see something similar in other parts of your code. |
Hi, It looks like there is a difference between Sentry symbolication and Does this happen only with CodePush updates or also with full app releases? Does this still happen, when you send a new error? |
I've reproduced the error with our sample app. https://sentry-sdks.sentry.io/issues/4453310672/events/62307475e6814589bfbc249c5f6e91c0/ Minified stack trace
Sentry
Metro Symbolicate
stacktrace.txt
source-mapconst fs = require('fs');
const sourceMap = require('source-map');
var smc = new sourceMap.SourceMapConsumer(fs.readFileSync('./sample-new-architecture/index.map', 'utf8'));
console.log(smc.originalPositionFor({ line: 1, column: 985288 })); {
source: 'src/Screens/HomeScreen.tsx',
line: 82,
column: 12,
name: 'thisVariableDoesNotExist'
} |
The off-by-one seems to be here somewhere:
The first token is the one we find, while the second token is the right one. We are doing a So we are internally actually looking for |
Okay, @mitsuhiko cleared up the confusion. While the JS/SourceMap ecosystem may agree that columns are 0-based, Sentry itself uses 1-based column in its event payloads and the UI. So possibly the SDK fails to adjust the column before it sends it over to Sentry? |
@krystofwoldrich it only occurs with CodePush, not with Native builds. Yes, new errors are still one line off, but I did notice one that happened to be correct a while ago. I'm not sure why. @Swatinem thank you for looking into this. You seem to be on the scent. |
@the-skins-app Thank you for the update. We reproduce it even with a native build. It should not make a difference. Do you have the same error where one if from Code Push one line off and one is from Native build and correct? |
Differs based on the engine JSC/Hermes. |
OS:
Platform:
SDK:
@sentry/react-native
(>= 1.0.0)react-native-sentry
(<= 0.43.2)SDK version: 0.0.0
react-native
version: 0.0.0Are you using Expo?
Are you using sentry.io or on-premise?
If you are using sentry.io, please post a link to your issue so we can take a look:
[Link to issue]
Configuration:
(
@sentry/react-native
)I have following issue:
The sourcemap is one line off. In the following screenshot, line 43 should be highlighted, not line 42:
The android version of my app does not have this issue.
Steps to reproduce:
I'm using these scripts to generate the source maps:
Actual result:
highlighted line is 42
Expected result:
highlighted line is 43
The text was updated successfully, but these errors were encountered: