Skip to content

App Center SDK cannot initialize dependencies in a desktop application #1798

Open

Description

Description

I saw that nothing is displayed in the web dashboard. When I started to figure it out, I saw errors in the logs of your libraries initialization.

Repro Steps

Please list the steps used to reproduce your issue.

  1. Install fresh libraries
  2. Make sure nothing appears in the dashboard
  3. Make sure there are initialization errors in the logs

Details

  1. What is your app platform (Xamarin.Android or Xamarin.iOS or UWP)?
    • WPF .NET Framework 4.8 desktop application
  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?
    • I don't use any of the above
  3. Which SDK version are you using?
    • Microsoft.AppCenter.Crashes 5.0.6
    • Microsoft.AppCenter.Analytics 5.0.6
  4. Which OS version did you experience the issue on?
    • Windows 10 Pro x64
  5. What device version did you see this error on? Were you using an emulator or a physical device?
    • Physical desktop
  6. What third party libraries are you using?

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="DotNetAES" version="1.0.2" targetFramework="net48" />
  <package id="Extended.Wpf.Toolkit" version="3.2.0" targetFramework="net46" />
  <package id="jacobslusser.ScintillaNET" version="3.6.3" targetFramework="net46" />
  <package id="MadMilkman.Ini" version="1.0.6.0" targetFramework="net46" />
  <package id="MahApps.Metro" version="1.1.2.0" targetFramework="net46" />
  <package id="MahApps.Metro.IconPacks.FontAwesome" version="1.6.0" targetFramework="net46" />
  <package id="Microsoft.AppCenter" version="5.0.6" targetFramework="net48" />
  <package id="Microsoft.AppCenter.Analytics" version="5.0.6" targetFramework="net48" />
  <package id="Microsoft.AppCenter.Crashes" version="5.0.6" targetFramework="net48" />
  <package id="Microsoft.Identity.Client" version="4.47.2" targetFramework="net48" />
  <package id="Microsoft.IdentityModel.Abstractions" version="6.22.0" targetFramework="net48" />
  <package id="Microsoft.WindowsAPICodePack-Core" version="1.1.0.2" targetFramework="net46" />
  <package id="Microsoft.WindowsAPICodePack-Shell" version="1.1.0.0" targetFramework="net46" />
  <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
  <package id="NLog" version="4.7.15" targetFramework="net48" />
  <package id="SQLitePCLRaw.bundle_green" version="2.1.7" targetFramework="net48" />
  <package id="SQLitePCLRaw.core" version="2.1.7" targetFramework="net48" />
  <package id="SQLitePCLRaw.lib.e_sqlite3" version="2.1.7" targetFramework="net48" />
  <package id="SQLitePCLRaw.provider.dynamic_cdecl" version="2.1.7" targetFramework="net48" />
  <package id="System.Buffers" version="4.4.0" targetFramework="net48" />
  <package id="System.Memory" version="4.5.3" targetFramework="net48" />
  <package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net48" />
  <package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net48" />
  <package id="XamlAnimatedGif" version="1.2.3" targetFramework="net48" />
  <package id="Yandex.Metrica" version="3.5.1" targetFramework="net46" />
</packages>
  1. Please enable verbose logging for your app using AppCenter.LogLevel = LogLevel.Verbose before your call to AppCenter.Start(...) and include the logs here:
'MyWpfProgram.exe' (CLR v4.0.30319: MyWpfProgram.exe): Loaded 'C:\Users\Admin\source\repos\MyWpfProgram\TMyWpfProgram\bin\Debug\Microsoft.AppCenter.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MyWpfProgram.exe' (CLR v4.0.30319: MyWpfProgram.exe): Loaded 'C:\Users\Admin\source\repos\MyWpfProgram\TMyWpfProgram\bin\Debug\Microsoft.AppCenter.Analytics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'MyWpfProgram.exe' (CLR v4.0.30319: MyWpfProgram.exe): Loaded 'C:\Users\Admin\source\repos\MyWpfProgram\TMyWpfProgram\bin\Debug\Microsoft.AppCenter.Crashes.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
2024-11-06 16:54:54.603 [AppCenter] DEBUG: Use lifecycle for desktop applications.
2024-11-06 16:54:54.662 [AppCenter] DEBUG: No named identifier found in appSecret; using as-is
2024-11-06 16:54:54.735 [AppCenter] ERROR: Failed to initialize sqlite3 provider.
   в Microsoft.AppCenter.Storage.StorageAdapter..cctor()
2024-11-06 16:54:54.736 [AppCenter] DEBUG: Creating database at: C:\Users\Admin\AppData\Local\Microsoft\AppCenter\df3ff21e-f500-4196-b64c-f293da7b1eaa\Logs.db
2024-11-06 16:54:54.736 [AppCenter] DEBUG: AddChannel(core)
2024-11-06 16:54:54.742 [AppCenter] INFO: App Center SDK configured successfully.
2024-11-06 16:54:54.744 [AppCenter] DEBUG: AddChannel(analytics)
2024-11-06 16:54:54.746 [AppCenterAnalytics] DEBUG: SessionTracker.Resume
2024-11-06 16:54:54.750 [AppCenter] DEBUG: Invoke EnqueuingLog event for channel 'analytics'
2024-11-06 16:54:54.752 [AppCenter] INFO: 'Analytics' service started.
2024-11-06 16:54:54.755 [AppCenter] DEBUG: AddChannel(crashes)
2024-11-06 16:54:54.758 [AppCenter] INFO: 'Crashes' service started.
2024-11-06 16:54:54.759 [AppCenter] DEBUG: Invoke EnqueuingLog event for channel 'core'
2024-11-06 16:54:54.761 [AppCenter] ERROR: An error occurred while initializing storage
   в Microsoft.AppCenter.Storage.StorageAdapter.Initialize(String databasePath)
   в Microsoft.AppCenter.Storage.Storage.InitializeDatabase()
2024-11-06 16:54:54.767 [AppCenter] ERROR: The storage operation failed
Microsoft.AppCenter.Storage.StorageException: The database wasn't initialized.
   в Microsoft.AppCenter.Storage.StorageAdapter.ExecuteSelectionSqlQuery(String query, IList`1 args)
   в Microsoft.AppCenter.Storage.StorageAdapter.Count(String tableName, String columnName, Object value)
   в Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass19_0.<CountLogsAsync>b__0()
   в Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass32_0`1.<AddTaskToQueue>b__0()
2024-11-06 16:54:54.769 [AppCenter] ERROR: Failed to initialize the log count: The database wasn't initialized.
2024-11-06 16:54:54.770 [AppCenter] DEBUG: CheckPendingLogsInternal(core) pending log count: 0
2024-11-06 16:54:54.771 [AppCenter] DEBUG: Set max storage size.
2024-11-06 16:54:54.773 [AppCenter] ERROR: The storage operation failed
Microsoft.AppCenter.Storage.StorageException: The storage operation failed ---> Microsoft.AppCenter.Storage.StorageException: The database wasn't initialized.
   в Microsoft.AppCenter.Storage.StorageAdapter.SetMaxStorageSize(Int64 sizeInBytes)
   в Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass23_0.<SetMaxStorageSizeAsync>b__0()
   в Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass23_0.<SetMaxStorageSizeAsync>b__0()
   в Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass32_0`1.<AddTaskToQueue>b__0()
2024-11-06 16:54:54.774 [AppCenter] ERROR: The storage operation failed
Microsoft.AppCenter.Storage.StorageException: The database wasn't initialized.
   в Microsoft.AppCenter.Storage.StorageAdapter.ExecuteSelectionSqlQuery(String query, IList`1 args)
   в Microsoft.AppCenter.Storage.StorageAdapter.Count(String tableName, String columnName, Object value)
   в Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass19_0.<CountLogsAsync>b__0()
   в Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass32_0`1.<AddTaskToQueue>b__0()
2024-11-06 16:54:54.775 [AppCenter] ERROR: Failed to initialize the log count: The database wasn't initialized.
2024-11-06 16:54:54.776 [AppCenter] DEBUG: CheckPendingLogsInternal(analytics) pending log count: 0
2024-11-06 16:54:54.782 [AppCenter] ERROR: The storage operation failed
Microsoft.AppCenter.Storage.StorageException: The database wasn't initialized.
   в Microsoft.AppCenter.Storage.StorageAdapter.ExecuteSelectionSqlQuery(String query, IList`1 args)
   в Microsoft.AppCenter.Storage.StorageAdapter.Count(String tableName, String columnName, Object value)
   в Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass19_0.<CountLogsAsync>b__0()
   в Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass32_0`1.<AddTaskToQueue>b__0()
2024-11-06 16:54:54.783 [AppCenter] ERROR: Failed to initialize the log count: The database wasn't initialized.
2024-11-06 16:54:54.784 [AppCenter] DEBUG: CheckPendingLogsInternal(crashes) pending log count: 0
2024-11-06 16:54:55.511 [AppCenter] DEBUG: Invoke FilteringLog event for channel 'core'
2024-11-06 16:54:55.512 [AppCenter] DEBUG: Invoke FilteringLog event for channel 'analytics'
2024-11-06 16:54:55.528 [AppCenter] ERROR: Could not get max storage size.
2024-11-06 16:54:55.529 [AppCenter] ERROR: Error persisting log
Microsoft.AppCenter.Storage.StorageException: Failed to store a log to the database.
   в Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass31_0.<AddTaskToQueue>b__0()
   в Microsoft.AppCenter.Channel.Channel.<PersistLogAsync>d__41.MoveNext()
2024-11-06 16:54:55.530 [AppCenter] ERROR: Could not get max storage size.
2024-11-06 16:54:55.530 [AppCenter] ERROR: Error persisting log
Microsoft.AppCenter.Storage.StorageException: Failed to store a log to the database.
   в Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass31_0.<AddTaskToQueue>b__0()
   в Microsoft.AppCenter.Channel.Channel.<PersistLogAsync>d__41.MoveNext()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions