I’m developing an app using Xamarin currently targeting Android devices but using Forms packages to target iOS devices as well. I’m using EntityFrameworkCore and Sqlite database to manage the app data. The problem I’ve being having is on Samsung Galaxy devices where this configuration fails raising the following exception. Unfortunately, it only happens on Samsung devices and on other devices the app works great. Do you have any ideas on how to fix that? Thank you very much for your time
Exception:
"SQLite Error 1294: 'unable to open database file'."
File path used: "/data/user/0/app.package.name/files/rr.db"
Stack trace:
" at Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseCreator.EnsureCreated () [0x00000] in <1ce4ae811dd94fe5a5e10e630f2f4c7a>:0 \n at Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade.EnsureCreated () [0x00006] in <2645c1c7345546f5b968e91de81e2b12>:0 \n at DataAccess.DataService.Sync (Framework.Dtos.SyncDataDto data) [0x00058] in /Users/JLC/Projects/RackAndRollApp/DataAccess/DataService.cs:44 \n at RackAndRollApp.Services.SyncService+<>c__DisplayClass4_0.<Sync>b__0 () [0x00001] in /Users/JLC/Desktop/Rack&Roll/code/svn/trunk/RackAndRollApp/RackAndRollApp/Services/SyncService.cs:34 \n at System.Threading.Tasks.AwaitTaskContinuation.InvokeAction (System.Object state) [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0 \n at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <3fd174ff54b146228c505f23cf75ce71>:0 \n at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0 \n at System.Threading.Tasks.AwaitTaskContinuation.RunCallback (System.Threading.ContextCallback callback, System.Object state, System.Threading.Tasks.Task& currentTask) [0x0001a] in <3fd174ff54b146228c505f23cf75ce71>:0 \n--- End of stack trace from previous location where exception was thrown ---\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <3fd174ff54b146228c505f23cf75ce71>:0 \n at System.Threading.Tasks.AwaitTaskContinuation+<>c.<ThrowAsyncIfNecessary>b__17_0 (System.Object s) [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0 \n at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x00007] in <3fd174ff54b146228c505f23cf75ce71>:0 \n at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <3fd174ff54b146228c505f23cf75ce71>:0 \n at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0 \n at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in <3fd174ff54b146228c505f23cf75ce71>:0 \n at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <3fd174ff54b146228c505f23cf75ce71>:0 \n at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0 "