Appcenter-sdk-dotnet: FlushQueueAsync System.NullReferenceException

Created on 2 Dec 2019  路  3Comments  路  Source: microsoft/appcenter-sdk-dotnet

Description

InnerException
HResult:-2147467261
Name:System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.AppCenter.Storage.StorageAdapter.CountAsync[T](Expression`1) + 0x2a
   at Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass14_0.<CountLogsAsync>b__0() + 0x16f
   at System.Func`1.Invoke() + 0x28
   at System.Threading.Tasks.Task`1.InnerInvoke() + 0x25
   at System.Threading.Tasks.Task.Execute() + 0x1c
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult() + 0xb
   at Microsoft.AppCenter.Storage.Storage.<FlushQueueAsync>d__27.MoveNext() + 0x1da

Message:Object reference not set to an instance of an object.
   at Microsoft.AppCenter.Storage.StorageAdapter.CountAsync[T](Expression`1) + 0x2a
   at Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass14_0.<CountLogsAsync>b__0() + 0x16f
   at System.Func`1.Invoke() + 0x28
   at System.Threading.Tasks.Task`1.InnerInvoke() + 0x25
   at System.Threading.Tasks.Task.Execute() + 0x1c
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult() + 0xb
   at Microsoft.AppCenter.Storage.Storage.<FlushQueueAsync>d__27.MoveNext() + 0x1da


Repro Steps

I use AppCenter 2.5.0 version, I receive crash log.
But I don't know how to repeat steps to happens it.

Details

  1. What is your app platform (Xamarin.Android or Xamarin.iOS or UWP)?

    • UWP

  2. If using Xamarin.Forms or if using portable/shared code to call our SDK APIs, are you using shared project, PCL code or .NET standard code for the application? Which .NET standard version or which PCL profile?

    • e.g. .NET standard 2.0.

  3. Which SDK version are you using?

    • 2.5.0

  4. Which OS version did you experience the issue on?

    • Windows 10.0.18362.476

  5. What device version did you see this error on? Were you using an emulator or a physical device?

    • MS-7B07

bug

All 3 comments

Hi there! Thank you for reporting this. We will take a look and try to reproduce.

Hi,

It looks like there was some error during database initialization, so the SDK doesn't have a valid connection.
We'll fix the crash, so it will be just a readable error log.

This issue has been fixed in version 3.0.0.

Was this page helpful?
0 / 5 - 0 ratings