Appcenter: [Feature] Add REST API function for uploading custom crashes

Created on 5 Feb 2019  路  55Comments  路  Source: microsoft/appcenter

What App Center service does this feature apply to?
AppCenterCrashes

Describe the solution you'd like
API for uploading custom crashes similar to HockeyApp: https://support.hockeyapp.net/kb/api/api-crashes#post-custom-crashes

diagnostics feature request hockeyapp

Most helpful comment

For the App Center team - I wanted to confirm that the roadmap item "API to upload custom crashes [#31]" will include support to upload Attachments to a custom crash, as was supported in Hockey? This is very critical for us migrating to App Center.

All 55 comments

@winnieli1208 @blparr We are waiting for the response. I saw this was assigned 20 days ago, is there any updates on this?

Hi @s-shestakov @TLiu2121999 - apologies for the delay. We don't have this on our immediate roadmap but our team is looking into it. I will monitor this feature request for us to prioritize in the future.

Can you both elaborate a bit more on your scenario and which app platform/OS you would like to use this API for? I'd like to understand your use case so we can better meet your needs. Thanks!

Hi
We use it on both iOS and Android. Generally, we use it to be informed about serious problems in our applications. For example, when our app finds that some important file is corrupted and it doesn't know what to do, it sends us a "custom crash". Later we analyze our app's logs and other attached information about OS and device, and try to understand, what happened. In fact, it's not a real crash.

Thanks @winnieli1208 , what @s-shestakov described above is basically what we need too. We allow users to upload App logs to hockeyApp (even when there is no actual crash happened) by calling https://support.hockeyapp.net/kb/api/api-crashes#post-custom-crashes API. It's very import for us to analysis bugs and customer cases.

I see, thanks for the explanation. I'm investigating what our team would need to do to support this API and will circle back when we have updates. Thanks for your patience!

@winnieli1208 Hi, just want to follow up about this issue, are there any updates with this issue?
(This is considered as blocker for us while migration);
We are currently still manually uploading logs to Hockey even we've created apps on AppCenter. But if I understand it right, after Nov 16th, we won't be able to do this any more since HockeyApp will go away.

So could you let us know if there is an estimate date for this feature? Thanks.

Hi @TLiu2121999,

Unfortunately, I don't have an estimated date for this feature. We already planned our work for this month and since this isn't a trivial work item, we won't be able to add this to our March plan.

I understand this is an important feature for many HockeyApp users and I apologize for not having a better answer for you. Our team is actively working on other HockeyApp transition features and in the meantime, I'm looking into the technical requirements and amount of work this would take so our team can better prioritize this in the future.

I encourage you to follow our roadmap and iteration plan for updates and I will also post here if I have more details.

Very important feature. I need it.

Thanks @winnieli1208 , what @s-shestakov described above is basically what we need too. We allow users to upload App logs to hockeyApp (even when there is no actual crash happened) by calling https://support.hockeyapp.net/kb/api/api-crashes#post-custom-crashes API. It's very import for us to analysis bugs and customer cases.

We also use this and would like to know more about when this will be migrated over, or even if this is being considered at all.

@LAguido it's definitely being considered! I'll keep everyone posted when I have more details. Please give the original comment a 馃憤 so we can keep track of total interest and better prioritize this. Thanks!

This is also a blocker for many of our apps.

Without it we will have to consider other solutions than App Center for replacing the great flexibility of HockeyApp.

Are there any updates on this?

Hi there, no updates yet. Our team is busy working on other items for this month but this API is on our roadmap and we do plan to support this in the upcoming months. I apologize for not having any further details but will definitely keep everyone updated. Thanks for your patience!

Hi @winnieli1208 ,

Any update on this?

Is there any other alternative in App center for uploading custom crashes similar to HockeyApp: https://support.hockeyapp.net/kb/api/api-crashes#post-custom-crashes.
Or the only way is to use AppCenter-SDK-Apple for uploading the crash reports.

Thanks and Regards
Shyam

I see this has made it into the July and now the August iterations. However, we're getting really close to the deadline for moving away from the HockeyApp API and our current in-house diagnostics system uses the HTTP API for HockeyApp to upload crash reports .

We'd like to consider AppCenter for our future work, but without this feature, we can't make use of it.

@gaige for all the HockeyApp features on the roadmap, we won't shutdown HockeyApp until they're complete.

I hope this will also come for WPF!

I am Ping-Yen from Puffin Browser development team.

This is also the blocker of our migration.

We use Custom Crashes API in our Windows version.

Hi @winnieli1 @derpixeldan do we have an ETA on this?

I understand some in this thread instead want to upload arbitrary text helpful for diagnosing issues. I think that could be useful and seems to be the focus of this thread.

But if you want to upload actual crash logs for crash symbolication, you can use the below API:

https://openapi.appcenter.ms/#/crash/textError_upload

I'm using that API now in testing. But I'd like to see that match Hockey's API which also allowed you to also upload a description log with the crash report -- an attachment in App Center's lingo.

Hi @gestrich
Could you help me please.
I couldn't get how to use .
I had successfully execute this request but I couldn't find it anywhere in App Center.
It only appears in "Log Flow"
Is the uploaded file should have special format or it could be anything?

@gestrich If I see this correct, the /errors/upload API requires authorisations, while the hockey crashes/upload just required the app secret?

@catlan I used authentication for the App Center errors/upload API so that seems accurate.

@crazycoderx2 I've only uploaded iOS crash reports which are a special format (I use the PLCrashReport library to create these reports). They then show up under the diagnostics section of App Center for the relevant version/build. I'm not sure if you can send arbitrary text.

For the App Center team - I wanted to confirm that the roadmap item "API to upload custom crashes [#31]" will include support to upload Attachments to a custom crash, as was supported in Hockey? This is very critical for us migrating to App Center.

@crazycoderx2 I've only uploaded iOS crash reports which are a special format (I use the PLCrashReport library to create these reports). They then show up under the diagnostics section of App Center for the relevant version/build. I'm not sure if you can send arbitrary text.

Did you have any luck with symbolication on modern devices? We also relay our PLCrashReporter output to the HockeyApp endpoint and crashes symbolicate fine there. However, it appears that's due to some finagling on the HockeyApp part, as the RAW crash reports contain seemingly random bits in the top 28 bits of the instruction pointer. This doesn't appear to be compensated for by the AppCenter symbolication process (either that or I'm doing something wrong when I upload the same crash report)

Agree with @gestrich. This API https://openapi.appcenter.ms/#/crash/textError_upload is NOT for this request. It only support the specific format of stacktrace; But we are requesting "Uploading attachment". We need to upload device log in a .txt file even when there is NO crash happening, but the user needs to provide us their device log to help us debug.

@gaige What you're observing in the 28 higher order bits is the pointer authentication signature that was introduced with last year's devices and their arm64e architecture.
We _should_ be correctly normalizing/stripping that signature in our symbolication pipeline - in addition to some client-side work we do in out SDK - but it's possible that that doesn't work correctly.
@winnieli1 Can we make sure to check this as part of this work?

@gaige for all the HockeyApp features on the roadmap, we won't shutdown HockeyApp until they're complete.

@derpixeldan: Xamarin Insights was shutdown before all platforms were supported despite promising feature parity. We're still waiting for Xamarin.Mac support.

Hello - glad to see this is being included in the migration. I do have a question that I'm not clear on from the docs here though. Will the endpoint need to be changed on the application that hits the endpoint, or will there be some kind of redirect?

I.e. we currently use https://rink.hockeyapp.net/api/2/apps/.../crashes/upload, will that endpoint continue to work or will there be a new endpoint here: https://openapi.appcenter.ms/#/ ?

Hi all - we just published the documentation for uploading logs (crashes, errors, and attachments) to App Center here: https://docs.microsoft.com/en-us/appcenter/diagnostics/features#upload-reports-to-app-center

We recognize the format is a bit different than HockeyApp's but this endpoint will allow you to upload custom logs and view them in App Center's UI.

Thanks for everyone's patience while we worked on this feature! Closing this issue for now but feel free to reach out or start a support ticket if you run into any issues or have any questions.

@josullivankobo we have no plans to redirect the HockeyApp endpoint so you'll need to use the new one documented above.

Hello
@winnieli1 trying to use API you provide with sample from https://docs.microsoft.com/en-us/appcenter/diagnostics/features#upload-reports-to-app-center faced with an issue server responses with success but no data appears on UI dashboard (Diagnostic -> Issues (all filters set "All").
I have just replaced app-secret to mine and trying entire sample.
Getting response from server:
CorrelationId: _______-_______-____-___-____ ReasonCode: Success
Isn't enough to replace app-secret to test your samples?

I had a similar message trying the samples but eventually was able to upload attachments. I had to change the timestamp value that was included in the request to something more recent.

@winnieli1

Thanks for the update. I just tried the error example (type = "handledError") on the docs website but fixed the timestamp to be the current date. I received a 200 response response with
CorrelationId: xxxxxxxx-6018-45db-9280-740222387146 ReasonCode: Success
message. I'm not seeing any data showing up on the UI dashboard either. Is there a lag time between when the error is uploaded and it showing up on the dashboard?

I also noticed that my dashboard is a bit different from the screenshot on the doc, it does not have the Errors tab

Screen Shot 2019-10-29 at 10 03 10 PM

Thank you for your help.

@gestrich @gekas due to our retention policy, the timestamp needs to be within the last 90 days. I'll update the docs to be more clear.

@tindn hmm there shouldn't be a lag time - can you start a support ticket so our team can take a closer look? The reason you're not seeing the Errors tab is because we only support handled errors for certain app platforms (Xamarin, Unity, WPF/WinForms and UWP).

Thanks!

@winnieli1 Thanks for the quick reply.

  • Is there any plans for adding handled errors support for React Native? I looked through the planning and roadmap but didn't see anything.
  • I tried uploading "managedError" and still not able to see them coming up in the Crash dashboard.

@winnieli1 Thanks for quick reply!
Also have a question about backward compatibility.
For mobile applications that used this endpoint not updated versions will continue send crash reports to the old end point. We need to know what behavior of this clients expect.
What will happen after 16 of November with previous endpoint of HockeyApp custom crash sender:
https://sdk.hockeyapp.net/api/2/apps/{0}/crashes/

What status code will we get? What changes in response should we expect?

Thank you!

@tindn we'd love to add support for React Native but no immediate plans. Feel free to give this this feature request #358 a +1. Can you start a support ticket with your issue so our team can better troubleshoot? thanks!

@gekas the endpoint will still be available after Nov 16th. Thanks!

Hi. I am a little confused about App Center's implmentation of the upload API. We use the hockeyapp API ( /api/2/apps/APP_ID/crashes/upload) to upload an Apple generated crash report created by PLCrashReporter to HockeyApp. Our customers are Healthcare organizations and they do not want us automatically uploading to a third party. HockeyApp symbolicates the crash report after uploading. Minimal parsing is required on our side. We just upload the report with an App Id.

Reading the App Center docs here: https://docs.microsoft.com/en-us/appcenter/diagnostics/upload-custom-crashes#upload-an-apple-crash-log. It appears that work is needed to parse the raw Apple crash report into JSON. Can I just upload the unsymbolicated crash report as is through the API or do I need to convert to JSON format? If I have to convert to JSON format, is there a way to do that easily? Will the report be symbolicated on the App Center site if the symbols are available?

Is the HockeyApp API going away November 16th?

Thanks.

@stationary-heartbeat as long as you are uploading from your servers and not from the App directly, it appears you can use the /errors/upload API endpoint. This will take a log in the PLCrashReporter format (based on our own experimentation, and comments by others here). It seems to be working fine for us. We too cannot upload the crash logs directly to a third party, hence our need to sit in the middle and upload to the /errors/upload API endpoint when appropriate.

@gaige Thank you for the quick response. I tried the errors/upload API and the API call reported success. I see the crash in the list now under that app, but the Threads and Stack Trace sections are not populated. I did upload the DSYMs for that version manually before uploading. Any ideas? Attached is a sample crash report. Is your format similar?

aa5_7D981CAF-7161-4048-A62A-88BF6F7A29F4_2019-10-30_095615.txt

The format looks identical to what we're uploading.

I did find that the overview crash report is really spare if you crashed without one of your routines on the crashed thread. Did you try clicking on the Reports tab at the top and then drilling in to the individual report that you uploaded?

In there, there's a "Raw" button that shows what appears to be the symbolicated version (in my case at least; I know we uploaded the raw version, but there are symbols in here).

It's a reasonable double-check.

Also, if there are symbols missing, it should still show up, but you should have a warning in the Diagnostics area that enumerates which symbols are missing (including UUIDs so you can upload them if you have them).

Hope this helps.

In https://docs.microsoft.com/en-us/appcenter/transition/moving/data, I saw:

"Crashes uploaded with the custom crashes API are not currently forwarded to App Center."

Does it mean that if I move our apps now, all HockeyApps custom crash logs will be gone?

Are you working on forwarding HockeyApps custom crash logs to App Center?

Hello
@winnieli1
I am trying to send an error with an attachment. In response "ReasonCode: Success", but in dashboard -> diagnostics i do not see these errors.
Such behavior has been at @tindn therefore, I can assume that this is some kind of problem in api or inaccuracy in the documentation.
I would be grateful for any help.

@KorolkovAnton163 hopefully you'll get a proper response, but in the meantime, I can offer my experience, as it can be really difficult to debug. Are you uploading to an iOS app? If so, you have to use "appleError", and make sure you add "binaries" properties to your upload, this wasn't specified at all in the docs, I just figured it out trying properties one by one.

@tindn no, I'm loading a macOS application using the "managedError" type as in the sample documentation https://docs.microsoft.com/en-us/appcenter/diagnostics/upload-custom-crashes

What is the "binaries" property and where can I see where exactly it needs to be added?

@KorolkovAnton163 I'm not as sure about macOS app, didn't try that myself. But you can find the example payload in this section https://docs.microsoft.com/en-us/appcenter/diagnostics/upload-custom-crashes#upload-an-apple-crash-log , all the way at the bottom of the payload.

I no longer see the API call https://openapi.appcenter.ms/#/crash/textError_upload in the Swagger documentation. Has it been removed or maybe moved somewhere else?

Same here. The "../errors/upload" endpoint appears to be gone from the docs although it is still functional.

App Center: Please do not remove the underlying API. We use this on a regular basis for customer submitted reports.

@stationary-heartbeat @gestrich we recommend using this API to upload crash logs. The one you're using is only intended for uploading single crash logs. The option to do so via UI will be available soon.

The API you linked to seems significantly more complex than what we are using with AppCenter now. With Hockey, there was an API to upload crash files and the server would process the file -- the same as the AppCenter API we are using. The suggested replacement API you linked appears the client needs to decompose an Apple text crash report into a JSON format (into threads and frames). We can do that but I'm not sure why we would want to invest such effort when the existing API just accepts the text report unprocessed. If you are decommissioning the other API, please advise so we can make a transition plan and scope engineering resources for this effort.

Hi @derpixeldan, I agree with @gestrich. I am trying to upload Apple Crash reports as is. It is not trivial to convert an Apple Crash report to that format and may not be possible. We were able to do this through an API in HockeyApp so I consider this required for feature parity. In addition, back in October there was an API that did do that. However, now it is gone now.

@gestrich @stationary-heartbeat the API to upload Apple crash logs is not supposed to be used for uploading many reports at once which is why it was removed from the public definition so there are no misunderstandings. You can keep using it as it's the same API used to upload Apple crash logs via UI.

@dipree HockeyApp provided an API to upload multiple Apple Crash reports at the same time in an automated fashion. If AppCenter is suppose to have feature parity with HockeyApp where is the same API for AppCenter?

@stationary-heartbeat the HockeyApp endpoint that could accept multiple Apple crash logs wasn't documented. The official App Center custom crash upload API is documented here for the case of Apple. Yes, it requires re-formatting. An alternative is to upload via UI (or that API) or the SDK.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

muhammaddadu picture muhammaddadu  路  3Comments

egorikftp picture egorikftp  路  3Comments

patrickdoodyIRL picture patrickdoodyIRL  路  3Comments

DouglasMarq picture DouglasMarq  路  4Comments

busterlaursen picture busterlaursen  路  4Comments