appcenter-sdk-dotnet icon indicating copy to clipboard operation
appcenter-sdk-dotnet copied to clipboard

Make Crashes.GetErrorAttachments async

Open imuller opened this issue 7 years ago • 9 comments

Is it possible to make Crashes.GetErrorAttachments async? I got a scenario where i need to retrieve some user data from my app database async.

imuller avatar Jun 04 '17 16:06 imuller

Good idea but I cannot answer about any ETA for this.

We need to discuss it for iOS as it needs to be done on underlying SDK side. For Android, that should not be an issue as this is called from a background thread already, it's safe to block there.

guperrot avatar Jun 05 '17 19:06 guperrot

A workaround in iOS is to use the confirmation feature. Return true in Crashes.ShouldAwaitUserConfirmation, then call Crashes.NotifyUserConfirmation(UserConfirmation.Send) from a background thread that you spawn from that callback for example, this will resume the workflow and call get error attachments from same thread as Crashes.NotifyUserConfirmation(UserConfirmation.Send).

guperrot avatar Jun 05 '17 19:06 guperrot

Note that the workarounds mentioned is not to use async but to block in a thread that is guaranteed not to be the UI one, we keep the issue opened for providing a real async mechanism.

guperrot avatar Jun 06 '17 01:06 guperrot

Hi @imuller , I would like to refresh the status of this feature request. Could you please confirm that you are still interested in this feature?

DmitriyKirakosyan avatar Jan 20 '22 17:01 DmitriyKirakosyan

Since there were no activity for a while I'm closing this issue. Please leave a message if you are still interested in it and we will reopen the issue.

DmitriyKirakosyan avatar Feb 22 '22 11:02 DmitriyKirakosyan

I'm still interested in having the call async.

Like the initial commenter I have some interaction with the database layer in order for it to included as an attachment.

For the moment I'm using a .Wait on the await-able method call but as this is typically frown upon as it will tie up an additional thread it would be preferable to support async methods.

afk013 avatar Feb 22 '22 22:02 afk013

Thank you for bumping, @afk013 ! Ropened.

DmitriyKirakosyan avatar Feb 23 '22 12:02 DmitriyKirakosyan

Can't quite believe we are in 2023 and this is no further forward. Oof, that's 6 years.

This is a useful feature for most callback methods to be fair. I don't see adding it here as an exception. Easpecially when you might need to read/write asyncronously from/to file storage assuming you want to create an all up logging/reporting service.

JoeTomkinson avatar Dec 31 '23 13:12 JoeTomkinson

Can't quite believe we are in 2023 and this is no further forward. Oof, that's 6 years.

It took about that long for them to support all platforms that Xamarin.Insights supported despite promising "feature parity on launch" when Insights was canned in favour for this product. Don't lose hope just yet.

projectgoav avatar Jan 03 '24 08:01 projectgoav

As we do not have plans to add support for this feature in the next year, I'm closing the issue. However, contributions are still welcome.

DmitriyKirakosyan avatar Mar 27 '24 08:03 DmitriyKirakosyan