C
C#10mo ago
realcanel

❔ AppCenter | Error: The database wasn't initialized.

Hello there, im pretty new to c# and i tried implementing AppCenter to my .NET WinForms Application. Well, it almost worked out but i get this error:
2023-09-09 22:57:19.494 [AppCenter] ERROR: An error occurred while initializing storage
System.Exception: You need to call SQLitePCL.raw.SetProvider(). If you are using a bundle package, this is done by calling SQLitePCL.Batteries.Init().
bei SQLitePCL.raw.get_Provider()
bei SQLitePCL.raw.sqlite3_open(utf8z filename, sqlite3& db)
bei SQLitePCL.raw.sqlite3_open(String filename, sqlite3& db)
bei Microsoft.AppCenter.Storage.StorageAdapter.Initialize(String databasePath)
bei Microsoft.AppCenter.Storage.Storage.InitializeDatabase()
2023-09-09 22:57:19.508 [AppCenter] ERROR: The storage operation failed
Microsoft.AppCenter.Storage.StorageException: The database wasn't initialized.
bei Microsoft.AppCenter.Storage.StorageAdapter.ExecuteSelectionSqlQuery(String query, IList`1 args)
bei Microsoft.AppCenter.Storage.StorageAdapter.Count(String tableName, String columnName, Object value)
bei Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass19_0.<CountLogsAsync>b__0()
bei Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass32_0`1.<AddTaskToQueue>b__0()
2023-09-09 22:57:19.512 [AppCenter] ERROR: Failed to initialize the log count: The database wasn't initialized.
2023-09-09 22:57:19.494 [AppCenter] ERROR: An error occurred while initializing storage
System.Exception: You need to call SQLitePCL.raw.SetProvider(). If you are using a bundle package, this is done by calling SQLitePCL.Batteries.Init().
bei SQLitePCL.raw.get_Provider()
bei SQLitePCL.raw.sqlite3_open(utf8z filename, sqlite3& db)
bei SQLitePCL.raw.sqlite3_open(String filename, sqlite3& db)
bei Microsoft.AppCenter.Storage.StorageAdapter.Initialize(String databasePath)
bei Microsoft.AppCenter.Storage.Storage.InitializeDatabase()
2023-09-09 22:57:19.508 [AppCenter] ERROR: The storage operation failed
Microsoft.AppCenter.Storage.StorageException: The database wasn't initialized.
bei Microsoft.AppCenter.Storage.StorageAdapter.ExecuteSelectionSqlQuery(String query, IList`1 args)
bei Microsoft.AppCenter.Storage.StorageAdapter.Count(String tableName, String columnName, Object value)
bei Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass19_0.<CountLogsAsync>b__0()
bei Microsoft.AppCenter.Storage.Storage.<>c__DisplayClass32_0`1.<AddTaskToQueue>b__0()
2023-09-09 22:57:19.512 [AppCenter] ERROR: Failed to initialize the log count: The database wasn't initialized.
The Key is set and everything but yea, still that error. Would be nice if someone would help. 👍
7 Replies
Mayor McCheese
Mayor McCheese10mo ago
realcanel
realcanel10mo ago
Yes, im new to C# and dont know how to do this to be honest.
Mayor McCheese
Mayor McCheese10mo ago
Stack Overflow
How do I call SQLitePCL.Batteries.Init().?
I am attempting to create an SQLite database for my application and have come across this error. System.Exception: 'You need to call SQLitePCL.raw.SetProvider(). If you are using a bundle pa...
realcanel
realcanel10mo ago
thank you 🙏 i will try
Mayor McCheese
Mayor McCheese10mo ago
I don't know much about what you're trying to accomplish I don't know what appcenter is
realcanel
realcanel10mo ago
its for analystics, Microsoft appcenter
Accord
Accord10mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.