microsoft / appcenter-sdk-dotnet

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

3.4.3 to 4.1.0 migration - crash logs retrying and backing off #1495

Closed RobbiewOnline closed 3 years ago

RobbiewOnline commented 3 years ago

Description

After upgrading from 3.4.3 to 4.1.0 I'm seeing AppCenter logging that it's backing off and retrying, yet I have internet and the error implied it was a permanent error.

Repro Steps

I created a stack overflow just before I discovered this GitHub repo for Xamarin, in effect forcing the app to crash then re-starting the app my app gets prompted whether to send the logs or not. I select yes and then the backing off errors are seen.

Stack-overflow

Details

1.This is a Xamarin Forms app targeting iOS, Android and UWP. This was seen on Android on a physical device (not tested elsewhere yet)

  1. I am using a shared .NET core project.
  2. I'm using App Center 4.1.0
  3. Testing on Android 6 device (no others to test with at the moment)
  4. Physical device tested
  5. What third party libraries are you using?

Xamarin.Forms 4.8.0.1821 Xamarin.AndroidX.AppCompat 1.2.0.6 Xamarin.AndroidX.CardView 1.0.0.6 Xamarin.AndroidX.Legacy.Support.Core.Utils 1.0.0.6 Xamarin.AndroidX.Lifecycle.LiveData 2.2.0.4 Xamarin.AndroidX.Browser 1.3.0.4 Xamarin.Google.Android.Material 1.0.0.1 Xamarin.AndroidX.Legacy.Support.V4 1.0.0.6 Xamarin.AndroidX.MediaRouter 1.2.1 Xamarin.AndroidX.Palette 1.0.0.6 Xamarin.Essentials 1.6.1 Xamarin.AndroidX.Migration 1.0.8 Xamarin.AndroidX.AppCompat.Resources 1.1.0 Microsoft.AppCenter.Crashes 4.1.0 Microsoft.AppCenter 4.1.0 Microsoft.AppCenter.Analytics 4.1.0 Newtonsoft.Json 12.0.3 OxyPlot.Xamarin.Forms 1.0.0 OxyPlot.Core 1.0.0 OxyPlot.Xamarin.Android 1.0.0 AndHUD 1.4.2 PCLStorage 1.0.2 Plugin.CurrentActivity 2.1.0.4 Plugin.Permissions 6.0.1 Plugin.Share 7.1.1 Portable.Ninject 3.3.1 PubSub 3.1.0 Rg.Plugins.Popup 2.0.0.10 Xam.Plugin.Connectivity 3.2.0 Xam.Plugin.DeviceInfo 4.1.1 Xam.Plugin.Media 5.0.1 Xam.Plugin.Version 1.0.0 Xamarin.Build.Download 0.10.0 Microsoft.Net.Http 2.2.29 Xamarin.FFImageLoading.Forms 2.4.11.982 Xamarin.FFImageLoading 2.4.11.982 Xamarin.Forms.AppLinks 4.6.0.847 PlayCore 1.8.0 Syncfusion.Xamarin.SfPullToRefresh 17.4.0.55 Syncfusion.Xamarin.SfNavigationDrawer 17.4.0.55 Syncfusion.Xamarin.SfListView 17.4.0.55 Syncfusion.Xamarin.GridCommon 17.4.0.55 Syncfusion.Xamarin.DataSource 17.4.0.55 Syncfusion.Xamarin.Core 17.4.0.55 Syncfusion.Licensing 17.4.0.55 Plugin.InAppBilling 2.1.0.187-beta Xamarin.Forms.PancakeView 2.3.0.759 Xamarin.Firebase.Messaging 120.2.4

Only referenced in shared project for some reason...

Microsoft.Bcl.Async 1.0.168 Microsoft.Bcl 1.1.10 NodaTime 3.0.0

  1. I've added Verbose logging and will update this issue once captured
AnastasiaKubova commented 3 years ago

Hi! Thanks for getting in touch with us! Could you please share the verbose logs? Does this issue happen regularly? If yes then it can relate to the cache issue. Could you please try to perform the next steps:

RobbiewOnline commented 3 years ago
  • git clean -dfx

Many thanks @AnastasiaKubova... could you explain what the -dfx options do? I do manually delete the bin+obj folders and when re-opening Visual Studio it automatically performs a restore, so I'm wondering what the Git clean does in addition?

I'm doing some testing but no crashes yet, so it's hard to re-create - I might add an unhandled exception to force the issue.

AnastasiaKubova commented 3 years ago

-dfx - remove all new files, empty directories and files in .gitignore. This is needed just to make sure that all cache files were deleted. But if you are sure that you manually removed all cache files then you can skip this step.

RobbiewOnline commented 3 years ago

@AnastasiaKubova, I've enabled verbose logging, but so far I haven't seen the issue (but I'm crashing less anyhow 😏).

I did find some hand-written notes that show it was HTTP 502 response - Bad Gateway that was being logged, could this have been a temporary issue that's expected behaviour from the App Center client? Maybe it was over quota at the time?

AnastasiaKubova commented 3 years ago

Not sure, we didn't receive the same issues before. Unfortunately without additional information (logs or reproducing steps) resolving the issue will be difficult.

RobbiewOnline commented 3 years ago

I've recently had a crash and when I looked in AppCenter it was showing up, so I suspect the 502 response was temporary and this isn't an issue with the latest 4.1.0 kit. Thank you.