microsoft / appcenter-sdk-dotnet

Development repository for the App Center SDK for .NET platforms, including Xamarin
Other
308 stars 141 forks source link

Xamarin.iOS crashes aren't sent when application takes longer to start #583

Closed helsq closed 6 years ago

helsq commented 6 years ago

Crashes.HasCrashedInLastSessionAsync is true, but reports aren't send, events SendingErrorReport, SentErrorReport, FailedToSendErrorReport aren't call.

Analytics works well.

Symbols are loaded.

Console output

console.txt

gnola14 commented 6 years ago

I'm having the exact same issue.

jstawski commented 6 years ago

We have the same problem. Analytics work well for both iOS and Android. Android does report crashes. We tried a brand new app with File - New Project reporting to the same App Center app and it does show the crashes then.

We had a similar problem sometime ago with Xamarin Insights when we switched the HttpClient Implementation from Managed to NSUrlSession, which was eventually fixed by the SDK team. That is one difference that we noticed between our app (NSUrlSession) and the test app (Managed) that works. We also removed Google Analytics and Facebook Analytics completely just in case.

Furthermore, we are registering to the FailedToSendErrorReport event and it is not being called.

A piece of our verbose output below:

2018-01-26 12:21:57.386 FishAngleriOS[28171:4347712] [AppCenter] VERBOSE: -[MSIngestionSender createRequest:]/72 URL: https://in.appcenter.ms/logs?api-version=1.0.0 2018-01-26 12:21:57.386 FishAngleriOS[28171:4347712] [AppCenter] VERBOSE: -[MSIngestionSender createRequest:]/73 Headers: Install-ID = AF1DC61A-23F0-4291-9FBF-33D8CE13900B, Content-Type = application/json, App-Secret = ****f89dc21a 2018-01-26 12:21:58.440 FishAngleriOS[28171:4347712] [AppCenter] VERBOSE: -[MSHttpSender sendCallAsync:]_block_invoke/241 HTTP response received with status code=200 and payload=CorrelationId: 47759e85-b693-43f3-89e2-9bb8b0ec3348 ReasonCode: Success 2018-01-26 12:21:58.441 FishAngleriOS[28171:4347712] [AppCenter] INFO: -[MSHttpSender call:completedWithFatalError:]/266 Removed call id:129777D4-166E-4A3A-99AE-C0426F6EA4D8 from pending calls:{ "9376C2AC-72D6-4E7D-8E46-444DE0AF9F02" = "<MSSenderCall: 0x60400008ccb0>"; } 2018-01-26 12:21:58.441 FishAngleriOS[28171:4347692] [AppCenter] DEBUG: -[MSChannelDefault flushQueue]_block_invoke/171 Log(s) sent with success, batch Id:129777D4-166E-4A3A-99AE-C0426F6EA4D8. 2018-01-26 12:21:58.443 FishAngleriOS[28171:4347692] [AppCenter] VERBOSE: -[MSLogDBStorage deleteLogsFromDBWithColumnValues:columnName:]/237 Deletion of log(s) by id with value(s) '40' succeeded. 2018-01-26 12:21:59.187 FishAngleriOS[28171:4347692] [AppCenter] VERBOSE: -[MSHttpSender sendCallAsync:]_block_invoke/241 HTTP response received with status code=200 and payload=CorrelationId: 76c7e15e-c116-41f7-90a8-513a7761e91d ReasonCode: Success 2018-01-26 12:21:59.187 FishAngleriOS[28171:4347692] [AppCenter] INFO: -[MSHttpSender call:completedWithFatalError:]/266 Removed call id:9376C2AC-72D6-4E7D-8E46-444DE0AF9F02 from pending calls:{ } 2018-01-26 12:21:59.187 FishAngleriOS[28171:4347905] [AppCenter] DEBUG: -[MSChannelDefault flushQueue]_block_invoke/171 Log(s) sent with success, batch Id:9376C2AC-72D6-4E7D-8E46-444DE0AF9F02.

achocron commented 6 years ago

Hi all - we've seen this in some other users and are working on a fix. We see this problem in apps that take a bit longer to launch. I'll let you know when we have a fix.

ElektrojungeAtWork commented 6 years ago

Hey folks,

we have a fix for the underlying native SDK in the works and will update our DotNet SDK right away. The release will be available early this week.

Sorry for the inconvenience! Benjamin

guperrot commented 6 years ago

A bug was fixed in 1.3.0 that hopefully solves the problem.

Please try it out.

Please comment on this issue if and only if your issue involved having Crashes.HasCrashedInLastSessionAsync was true but no log was sent, that's the bug that was fixed.

For any other issue of type "I don't see crashes in my dashboard", please create separate issues or contact us using the chat button on https://appcenter.ms.

helsq commented 6 years ago

Thanks! Crash reports are send

guperrot commented 6 years ago

Thanks for the feedback. I got another report on support also saying the problem is fixed so I'll go ahead and close this issue.

jstawski commented 6 years ago

It works! Thanks!