microsoft / appcenter

Central repository for App Center open source resources and planning.
https://appcenter.ms
Creative Commons Attribution 4.0 International
1.01k stars 223 forks source link

[Feature] Add REST API function for uploading custom crashes #31

Closed s-shestakov closed 5 years ago

s-shestakov commented 5 years ago

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

TLiu2121999 commented 5 years ago

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

winnie commented 5 years ago

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!

s-shestakov commented 5 years ago

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.

TLiu2121999 commented 5 years ago

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.

winnie commented 5 years ago

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!

TLiu2121999 commented 5 years ago

@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.

winnie commented 5 years ago

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.

ivanarh commented 5 years ago

Very important feature. I need it.

OolasLindon commented 5 years ago

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.

winnie commented 5 years ago

@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!

CitronMobile commented 5 years ago

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.

TLiu2121999 commented 5 years ago

Are there any updates on this?

winnie commented 5 years ago

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!

shyamjimishra1993 commented 5 years ago

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

gaige commented 5 years ago

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.

dipree commented 5 years ago

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

laurentkempe commented 5 years ago

I hope this will also come for WPF!

pingyen commented 5 years ago

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.

lamathe commented 5 years ago

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

gestrich commented 5 years ago

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.

crazycoderx2 commented 5 years ago

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?

catlan commented 5 years ago

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

gestrich commented 5 years ago

@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.

gestrich commented 5 years ago

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.

gaige commented 5 years ago

@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)

TLiu2121999 commented 5 years ago

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.

lumaxis commented 5 years ago

@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?

projectgoav commented 5 years ago

@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.

josullivankobo commented 5 years ago

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/#/ ?

winnie commented 5 years ago

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.

winnie commented 5 years ago

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

gekas commented 5 years ago

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?

gestrich commented 5 years ago

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.

tindn commented 5 years ago

@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.

winnie commented 5 years ago

@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!

tindn commented 5 years ago

@winnieli1 Thanks for the quick reply.

gekas commented 5 years ago

@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!

winnie commented 5 years ago

@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!

stationary-heartbeat commented 4 years ago

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.

gaige commented 4 years ago

@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.

stationary-heartbeat commented 4 years ago

@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

gaige commented 4 years ago

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.

pingyen commented 4 years ago

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?

KorolkovAnton163 commented 4 years ago

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.

tindn commented 4 years ago

@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.

KorolkovAnton163 commented 4 years ago

@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?

tindn commented 4 years ago

@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.

stationary-heartbeat commented 4 years ago

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?

gestrich commented 4 years ago

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.

dipree commented 4 years ago

@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.