Closed GOVINDDIXIT closed 4 years ago
Hi @GOVINDDIXIT
Are you using the Hermes JS engine on Android in your React Native app? If you're not using Hermes you can just follow our standard instructions here to upload via the API without bugsnag-sourcemaps
:
https://docs.bugsnag.com/platforms/react-native/react-native/showing-full-stacktraces/#uploading-source-maps-to-bugsnag
If Hermes is enabled then using bugsnag-sourcemaps
is currently the only upload method we support.
Where does you flavor build output the .bundle
and .bundle.map
files? Have you tried manually running the build and searching for the files? Is it just the path that's wrong in your upload command?
Hi @mattdyoung
Thanks for the quick response. Yes, I have got the correct path by building source maps locally and the issue is now solved. If possible I would suggest adding a specific section for the android flavor builds in official docs.
After adding flavors the updated path for minified file and source map is
--minifiedFile=android/app/build/generated/assets/react/play/release/app.bundle
--source-map=android/app/build/generated/sourcemaps/react/play/release/app.bundle.map
In general
--minifiedFile=android/app/build/generated/assets/react/{flavor_name}/release/app.bundle
--source-map=android/app/build/generated/sourcemaps/react/{flavor_name}/release/app.bundle.map
@GOVINDDIXIT Thanks for letting us know! We're looking into various docs improvements currently so we'll consider this clarification.
I have created flavor builds in the android side of the React Native app. Earlier there was no flavor builds So I was uploading the source map using CI like this
But now the app is divided into two flavor builds (
play
andfoss
) and Bugsnag is available only inplay
build. I am getting this error as the source map path needs to be updated.Can anyone help me in determining what will be the updated path of source map in case of multiple flavors in the app? Thanks in advance.
PS: I Have gone through the docs but didn't find anything related to this scenario.