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.

Source maps not being uploaded when hermes setting enabled

See original GitHub issue

Environment

"react-native": "0.67.4"
"@sentry/react-native": "3.4.0"

build.gradle

project.ext.react = [
    enableHermes: true, 
    bundleInBeta: true,
    devDisabledInBeta: true,
    bundleInProd: true,
    devDisabledInProd: true,
    bundleInDemo: true,
    devDisabledInDemo: true
]

apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/@sentry/react-native/sentry.gradle"

Expected Result

Should upload correctly the source maps having hermes setting enabled

Actual Result

Sentry upload source maps fails.

Processing react-native sourcemaps for Sentry upload.
index.android.bundle.map - error: No such file or directory (os error 2)

I checked on the folder and it is only there index.android.bundle.packager.map and not index.android.bundle.map as expected. Probably the compile to bytecode using hermes step and the merge of the two source maps using compose-source-maps to get the final source map didn’t happen.

According to the docs: If you do not need custom sourcemaps, the sentry.gradle build step fully supports Hermes source maps.

All works fine if I disable hermes.

Can you help me with this ?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
marandanetocommented, Apr 6, 2022

Thanks for the feedback, I will check what’s the issue with hermesFlagsForVariant

1reaction
marandanetocommented, Apr 5, 2022

@rafael-fecha I’ve just tried here, upload worked fine and the event got symbolicated as well (with flavors), it must be something related to your pipeline or flavors configuration? please provide a minimal reproducible example.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hermes for React Native | Sentry Documentation
Currently, there is an issue when bundling the hermes bundle and source maps manually. We recommend not bundling these manually until this is...
Read more >
Troubleshooting for JavaScript | Sentry Documentation
For uploaded source maps to be located and applied, the release needs to be created by the CLI or API (and the correct...
Read more >
How can I fix the "DevTools failed to load SourceMap: Could ...
Go to Inspect → Settings (Symbol) gear → Uncheck Enable JavaScript source maps and Enable CSS source map. Refresh. (Note: Deactivate Adblock if...
Read more >
Source maps are reported as errors in console in Safari ... - Jira
Source map files cannot be obtained through WRM because WRM does not handle that file type and also at the moment we do...
Read more >
Using Sentry - Expo Documentation
Native crash reporting is not available with the classic build system ( expo ... Next, you can use the Sentry CLI to upload...
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