Reputation: 1274
My MAUI app uses SQLite with Linq2DB inherited from our base libraries that target MSSQL. Everything works fine and I can publish an app using AppCenter onto my Android phone. If I compile the APKs directly and sign them locally. The SQLite is bundled as an Embedded Resource
I set up a GitHub actions workflow to deliver the APK to AppCenter and the release from that path seems to ignore the existence of the SQLite database.
No issues with debug. I only saw this using Logcat
Does anyone know what's going on, or seen this happen before?
FATAL EXCEPTION: main
Process: com.*****.*****, PID: 29187
android.runtime.JavaProxyThrowable: Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 26: 'file is not a database'.
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements()+MoveNext()
at Microsoft.Data.Sqlite.SqliteCommand.GetStatements()+MoveNext()
at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior )
at LinqToDB.Data.DataConnection.ExecuteReader(CommandBehavior commandBehavior)
at LinqToDB.Data.DataConnection.ExecuteDataReader(CommandBehavior commandBehavior)
at LinqToDB.Data.DataConnection.ExecuteReader()
at LinqToDB.Data.DataConnection.QueryRunner.ExecuteReader()
at LinqToDB.Linq.QueryRunner.<ExecuteQuery>d__12`1[[*****.DataModels.Entities.Tag, *****.DataModels, Version=1.0.21.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at System.Linq.Enumerable.TryGetFirst[Tag](IEnumerable`1 , Boolean& )
at System.Linq.Enumerable.First[Tag](IEnumerable`1 source)
Found this other titbit in the logcat that might be relevant
monodroid-assembly: Assembly 'en-GB/Microsoft.Data.Sqlite.resources' (hash 0x2b74424bca641f6e) not found
01-31 17:29:17.052 3862 3862 W monodroid-assembly: open_from_bundles: failed to load assembly en-GB/Microsoft.Data.Sqlite.resources
Upvotes: 0
Views: 182