Skip to content
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

[Feature] Support Android Source Maps for React Native apps #75

Open
Eyesonly88 opened this issue Feb 15, 2019 · 56 comments
Open

[Feature] Support Android Source Maps for React Native apps #75

Eyesonly88 opened this issue Feb 15, 2019 · 56 comments
Assignees
Labels
diagnostics Related to App Center's Diagnostics service feature request New feature request keep Keeps an issue open if it's building interest

Comments

@Eyesonly88
Copy link

Eyesonly88 commented Feb 15, 2019

Describe the solution you'd like
Support source maps on Android for React Native apps. Currently only supported on iOS.
See microsoft/appcenter-sdk-react-native#208

Describe alternatives you've considered
Without the source maps on Android, we can't understand crash logs because the stack traces don't trace back to the JavaScript side.

Additional context
This feature works for iOS already and it is very useful to know which line of code and file is causing the crash. No idea how this is not done already.

@Eyesonly88
Copy link
Author

Hey @patniko @winnieli1208, can you please comment regarding this issue? all the other top voted requests have comments/follow-ups.

@winnie
Copy link

winnie commented Mar 6, 2019

Hi @Eyesonly88, thanks for submitting the feature request. We understand this is a crucial feature for React Native developers and it's definitely on our radar. I am actively monitoring community interest to help our team prioritize and will post here with any updates.

@gchiacchio
Copy link

Any chance to workaround this with a post build script? My client has a paid account and crash reports are not useful at all. I'm close to recommend him to switch to other service.

@winnie
Copy link

winnie commented May 10, 2019

@gchiacchio you might be able to use a build script to retrieve the source map file but our diagnostics service doesn't support uploading/processing these files so I'm not sure that would work.

Our team is busy working on the HockeyApp transition features which is why we haven't prioritized this yet. We do understand this is a major limitation and we hope to address this in the future but unfortunately, I don't have an ETA at this time.

@gchiacchio
Copy link

@winnieli1208 That would be an improvement.

  • Can you provide a way to retrieve the source map out of the server with a build script?

  • Please let me know what options you can think of... like email, ftp, dropbox, gdrive, or even the iOS upload symbols API here

@gchiacchio
Copy link

gchiacchio commented May 16, 2019

@winnieli1208 @Eyesonly88 after my last message, I've been trying to upload the generated mapping.txt file by using the upload symbols API, and found a way.

Hope this help others.

Snippet for the post build script...

    if [ "$AGENT_JOBSTATUS" == "Succeeded" ]; then

#Step1
        mappingData=$(curl -X POST "https://api.appcenter.ms/v0.1/apps/{owner_name}/{app_name}/symbol_uploads" \
            -H "accept: application/json" \
            -H "X-API-Token: $MY_APPCENTER_API_TOKEN" \
            -H "Content-Type: application/json" \
            --fail \
            -d '{
                    "symbol_type": "AndroidProguard",
                    "file_name": "mapping.txt",
                    "build": "'"$versionCode"'",
                    "version": "'"$versionName"'"
                }')

        if [[ $? == 0 ]]; then
#Step2
            mappingSymbolUploadId=$(echo ${mappingData} | python -c "import json,sys;obj=json.load(sys.stdin);print obj['symbol_upload_id'];")
            mappingUploadURL=$(echo ${mappingData} | python -c "import json,sys;obj=json.load(sys.stdin);print obj['upload_url'];")

            curl -X PUT \
            "$mappingUploadURL" \
            -H 'x-ms-blob-type: BlockBlob' \
            -T "$APPCENTER_SOURCE_DIRECTORY/app/build/outputs/mapping/{build_variant}/mapping.txt" \
            --silent \
            --show-error \
            --fail

            if [[ $? == 0 ]]; then
                mappingUploadStatus="committed"
            else
                mappingUploadStatus="aborted"
            fi
#Step 3
            curl -X PATCH "https://api.appcenter.ms/v0.1/apps/{owner_name}/{app_name}/symbol_uploads/$mappingSymbolUploadId" \
                -H "accept: application/json" \
                -H "X-API-Token: $MY_APPCENTER_API_TOKEN" \
                -H "Content-Type: application/json" \
                -d '{ "status": "'"$mappingUploadStatus"'"}'
        else
            echo "Couldn't upload mapping file"
        fi

    fi

Reference

Build scripts - post puild
Build scripts - variables
Acquiring an App Center - API token
Upload symbols with App Center API

@matthiaswenz
Copy link

@gchiacchio I think your latest comment refers to uploading Android ProGuard mappings. Thanks for providing a sample post build script which can achieve this. This is part of our June iteration plan #466 and while we can't promise any immediate availability date, we're excited to share more about this soon.

@hccoelho
Copy link

hccoelho commented Dec 4, 2019

Hi @winnie, did you guys have a chance to prioritize this one? This seems a big deal breaker for all os us who want to leverage appcenter for crashes. Since it has been several months since your last update, I was wondering if the team had the chance to look into it. Thanks

@winnie
Copy link

winnie commented Dec 10, 2019

Hey @hccoelho thanks for checking in. Unfortunately I don't have an ETA for you but this is on the top of our list after we finish the rest of the HockeyApp features on our roadmap, around early next year. I know this is a top requested feature and we hope to address this very soon. Thanks for the patience!

@barnabyc
Copy link

barnabyc commented Feb 5, 2020

Hello @winnie, it's been a couple months, just checking in again. Is it possible to understand how long the remaining HockeyApp roadmap is scheduled to run until? Any sense of timeframe will greatly help my team evaluate alternate solutions to resolving this situation. Thanks!

@Eyesonly88
Copy link
Author

One year later and more than 150 votes and still not even started 👏

@tdekoning
Copy link

I was hoping we could use AppCenter for our crash logging, then i ran into this issue...

Any idea when it will be added?

@wildseansy
Copy link

wildseansy commented Apr 10, 2020

@tdekoning FWIW I am likely going to just use bugsnag or Sentry. They seem to have much better support for RN traces.

@adammcarth
Copy link

adammcarth commented Apr 28, 2020

Just for anyone else who reads this... I just want to reiterate that Visual Studio App Center is effectively useless for reporting crashes on Android React Native apps at this time.

Speaking from experience, 90% of the crashes in your React Native app will be triggered by uncaught JavaScript exceptions. For example you might try and access a property on an undefined variable, or call a function which doesn't exist. All of these things will cause a complete crash, and you should expect that it'll happen from time to time.

Now compare an identical crash report on App Center for iOS vs. Android below:

iOS

iOS App Center Crash Report

Android

Android App Center Crash Report - Useless

You can see that iOS has a very clear set of information about what failed and which JavaScript file it happened in. Even line numbers and variable names. On the other hand, Android gives us virtually no information to go off. All we find out is that there was a crash... but good luck finding where or why it happened!

Note that while @gchiacchio's shell script above is a great help to anybody using Proguard in their release builds, it's still not going to provide you with any information about your JavaScript code. It will certainly help your diagnose Java/low level library crashes, but these are generally far less common in the kinds of apps I find people typically make with React Native.

So @winnie, @patniko, @elamalani (and of course!) @nilofer - it's been over a year in the backlog now. What I'd personally love to see is either one of yourselves or another engineer to join in this conversation to talk about specifically why this has turned out to be such a difficult feature to get out the door. I find it hard to believe that someone hasn't at least looked into what's involved. Are there challenges you're facing with figuring out how to associate Java errors against a Javascript sourcemap? Is this capability even possible? Why was iOS comparatively so much easier than Android has turned out to be? I can't stress how much of a deal breaker this is for App Center and React Native.

I'm also curious if there is there an interim solution that you recommend in the mean time? I note that there's a default JavaScript sourcemap file located at android/app/generated/sourcemaps/**/index.android.bundle.map, but I can find no obvious way to even manually use that in conjunction with an App Center crash report. It appears to be dramatically smaller in file size (< 80%) than the sourcemap that you folks generate automatically for iOS builds - so my gut feeling is that it doesn't have enough information inside it anyway.

What do we all reckon? 🤞

@NourAbdelAal
Copy link

@Eyesonly88 I totally get your point about supporting source map files on both iOS and Android for the react native platform, which in essence is the quality and stability of your app.

Aside from missing such a critical feature in AppCenter, for your app crashes to show up with a fully symbolicated/deobfuscated stack trace, at Instabug, we will automatically generate the source map files and upload them to your dashboard on release build in both Android and iOS sides for JavaScript crashes.

I recommend you have a look at this particular part in our docs through this link and please don’t hesitate to reach out to me on "nour.abdelaal@instabug.com" for further details. I’d be more than happy to accommodate a quick demo and show you this in action.

@zanechua
Copy link

First of all, sorry for everyone who's subscribed to this issue.

@NourAbdelAal

I'm not sure if you've used GitHub before so maybe there's some benefit of doubt to be given? But this is a ticket for AppCenter. I don't think it's appropriate coming onto a repo's ticket to start selling your service. If you have something to contribute to the particular ticket, I'm sure everyone wants to hear about it but otherwise it would be nice to keep the tickets relevant to the topic at hand.

@winnie
Copy link

winnie commented Apr 29, 2020

👋 Hey all! Sorry for the long delay. We have not been able to prioritize this in the last few months - after finishing the HockeyApp transition and feature gaps, we shifted our focus on some engineering improvements around stability and scalability. Unlike many other crash reporting products in the market, we offer a free service and need to make some hard prioritization decisions.

I hear you and know it can be extremely frustrating to see little movement on this after an entire year. I will avoid committing to a timeline but this is something our team is actively considering. You will all be the first to hear when I have good news to share!

adammcarth added a commit to adammcarth/appcenter-docs that referenced this issue Apr 30, 2020
There is a critical limitation for React Native crash reporting on the
Android platform that should be pointed out in the setup docs.
Essentially JavaScript stack traces are not available for Android crash
reports - meaning that most of the time crashes are undiagnosable on
this platform.

See:
microsoft/appcenter#75 (comment)
@ghost
Copy link

ghost commented Dec 5, 2021

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.

@Eyesonly88
Copy link
Author

The obligatory reply to keep this alive.

Is React Native really not important for Microsoft?

@ghost ghost removed the Stale label Dec 6, 2021
@tsdmrfth
Copy link

tsdmrfth commented Jan 3, 2022

Came this issue thread 2 years later and all I see is the feature is not finished yet!

@andac-ozcan
Copy link

andac-ozcan commented Jan 7, 2022

This could be a game changer since all Firebase, Datadog and Sentry don't have this feature for RN Android yet. I'm telling because I test all.

@liamjones
Copy link

Sorry, slightly OT since this isn't about App Center's lack of support:

This could be a game changer since [...] Sentry don't have this feature for RN yet.

@andac-ozcan are you talking about the JS sourcemaps? Because Sentry does support those on Android via RN - we make use of them daily. Sentry's gradle plugin uploads them automatically when you do a release build (if you have a standard RN project, it needs a bit of config if you have a non-standard project).

Is React Native really not important for Microsoft?

I don't think that's necessarily true. Microsoft, as an entity, invests in RN quite a lot. See all the work they do on react-native-windows and the stuff Microsoft employees commit back to the core RN project as well. Whether or not it's not important to the App Center team specifically is a different question.

@andac-ozcan
Copy link

Sorry, slightly OT since this isn't about App Center's lack of support:

This could be a game changer since [...] Sentry don't have this feature for RN yet.

@andac-ozcan are you talking about the JS sourcemaps? Because Sentry does support those on Android via RN - we make use of them daily. Sentry's gradle plugin uploads them automatically when you do a release build (if you have a standard RN project, it needs a bit of config if you have a non-standard project).

Is React Native really not important for Microsoft?

I don't think that's necessarily true. Microsoft, as an entity, invests in RN quite a lot. See all the work they do on react-native-windows and the stuff Microsoft employees commit back to the core RN project as well. Whether or not it's not important to the App Center team specifically is a different question.

Yeah my bad, did a mistake on Sentry configuration. Now source maps are uploading during build. Seems Sentry and BugSnag have the real support for React Native crash tracking. DataDog says it'll be available before the end of 2022, Firebase not giving any estimation at all.

@ghost ghost added the Stale label Mar 11, 2022
@ghost
Copy link

ghost commented Mar 11, 2022

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.

@zanechua
Copy link

obligatory bump

@ghost ghost removed the Stale label Mar 12, 2022
@ghost ghost added the Stale label May 11, 2022
@ghost
Copy link

ghost commented May 11, 2022

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.

@ghost
Copy link

ghost commented May 26, 2022

This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.

@ghost ghost closed this as completed May 26, 2022
@barnabyc
Copy link

Well this is frustrating but I suppose inevitable. 😞

@ghost ghost removed the Stale label May 26, 2022
@muhamedzeema
Copy link

any update on this

@AngeeelD
Copy link

is there any update on this?

@tpisto
Copy link

tpisto commented Aug 16, 2022

any update on this?

@AngeeelD
Copy link

AngeeelD commented Aug 29, 2022

Hi guys, I was testing a way to create the source maps using custom app center scripts and upload them to a separated server or put them in the output folder, and I just noted this new option on my iOS pipelines:
image
"Download symbols & source map" download zipped file with an index.ios.map file.

@TripleSpeeder
Copy link

bump Just to let you know people are still waiting for this feature...

@tpisto
Copy link

tpisto commented Nov 22, 2022

What is the best alternative for AppCenter? Seems MS has pretty much abandoned it, or there is some summer intern working on it occasionally. AppCircle?

@mickey35vn
Copy link

plz tell me about the status of this feature...

@sjarvela89
Copy link

Hi all! I ran into this on the hard way as I have tried to create mapping files and bundles for few days. I would say it is still an open case.

@daniel-parlapan
Copy link

@winnie Not sure why this item was closed. May be just people losing hope and moving to other tools.

We still have this Note: At this time, App Center doesn't support source maps to unminify JavaScript stack traces for Android React Native apps.

What are your thoughts after more than 3 years?
Can you at least reopen the issue and track it?

@unstoo
Copy link

unstoo commented Oct 13, 2023

Honourable App Center team!

Thank you for the great product. Many of us still do believe that the source maps would be a great improvement.

@ls-barnaby-claydon
Copy link

Sadly at this point I think it's pretty clear Microsoft has abandoned AppCenter. The last commit to master was over a year ago: Aug 17, 2022.

I'd suggest everyone switch to a different product. I've been looking at Google Firebase's Crashlytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diagnostics Related to App Center's Diagnostics service feature request New feature request keep Keeps an issue open if it's building interest
Projects
None yet
Development

No branches or pull requests