Hello,
Our app asks users to log in to ArcGIS Online and uses OAuth access tokens to access content. Among other things, users can sync changes from a local geodatabase to a sync-enabled feature service hosted on ArcGis Online.
We're trying to support a use case where the user can log out and log in again, perhaps with a new identity. In this flow,
After implementing the code to do this, sync does NOT work with the new geodatabase file until a new app session is started after force-killing the old app session (I mention "force killing" to make it clear that backing out of the app all the way does not do it – you have to start a new app process).
The error message we get is
SQLite read only.: SQLite: 8
Attempt to write a readonly database
What this indicates to the best of our knowledge is that the previous geodatabase that we deleted is in use somewhere within the ArcGIS SDK and stays so until the app process is killed. We make sure to close out any map views that may be using the feature service layers before we delete the geodatabase file so we're not sure why this would be the case.
We've created a minimal patch to reproduce the issue based on the edit-and-sync-features example. Please see the patch zip attached to this ticket.
Hello, we're wondering if anyone has any advice on the way forward here. Is this a flow that is just not feasible without killing the app process?
If there is any more information we can provide, please let us know.
Did you ever get a solution to this issue? I am also running into the exact same problem on the Android runtime.