Fix path to Hermes build source map on RN 62.2#823
Fix path to Hermes build source map on RN 62.2#823iagormoraes wants to merge 1 commit intogetsentry:masterfrom
Conversation
|
Also here @marandaneto can we do a check if this file exists and then fall back to the old version to keep backward compatibility? |
I don't see any changes about that on the react-native repo: That doesn't mean we don't have a bug though. The I'd really double-check this before merging it, even if this is the right fix, we might need to add some extra code for keeping retro compatibility. Afaik the tasks are executed at different times, when the path is gotten, the files don't exist yet, for this to be possible, it'd require bigger changes, refactoring. |
|
Sounds like this shouldn't be merged? Maybe @jennmueng has some input here too? |
Yeah I think we should leave it out for now. As @marandaneto said we might need to add something to ensure it works on prior versions. |
|
any update on this situation? |
we believe this is not the right fix based on the previous comments, this change breaks other versions. |
Without the patch, the build fails: Even using the latest version 1.5.0 I see in releases the errors the source map is there, but the stack trace it seems to not be working well: Also all APK with distribution of 4xxxxxx handles all bundles and sourcemap from the others distributions: See distribution 1xxxxxx, it doesn't have the sourcemap attached to it: |
|
hey @iagormoraes what's about using the latest RN version? I meant, doing this (merging this PR), would break when using older RN version, RN itself and not our SDK. could you enable This is a Java/Kotlin exception and source maps have nothing to do with it. source maps are only for Javascript code.
what do you mean here? stack traces look good to me, they are not minified, you probably don't have proguard enabled. |
Hey @marandaneto, we are using RN 0.62.2 is the latest if I'm not mistaken, with hermes enabled, please follow below the debug log: Even with that patch, the sourcemap is not added to the correct distribution in releases as you can see below, if you think I have to open another issue let me know. |
|
Atleast compiles fine for me with react-native 0.62.2, android, hermes enabled |
|
🤔 Been following this issue, quite weird because we use "@sentry/react-native": "1.4.5" with React native 0.62.2 and Hermes enabled without any problem. How do you apply the the gradle sentry plugin? Client side, you must set the |
I am closing this PR, as @fabiendem said his setup works fine, maybe my project is with some configuration missing on the migration. |
|
Doing some tests on build settings of hermes, I figured that when you override the hermesFlags it erases the option to output source map, to keep the source map output option add the following: The expected file will be there: This will solve the issue. |
|
@iagormoraes good finding, thanks for sharing. |
|
Thanks for sharing! This needs to be put up in the docs |
|
@iagormoraes a more recent solution is : if hermesFlagsRelease and hermesFlagsDebug do not work. |







This PR fixes the build that is failing with Hermes enabled on RN 62.2 due to the source map file was renamed and also the generated path.
Issue Related:
#822