GRDB.DatabaseError: SQLite error 1: no such table: {table name} - while executing `SELECT ... #294
-
|
Through test flight, debug builds, and general testing, I am able to use SQLiteData and it works beautifully. In the production app, we see errors like: This is not isolated to our "sessions" table. We have so far been unable to reproduce the issue. We are also leveraging swift dependencies and start the app like: Where the error is then logged after bootstrapping our monitors. No error has been logged here. Has anyone seen this issue? It seems to happen at a rate of about 0.5% of our users and seem to generally work itself out on subsequent launches. sqlite-data version 1.3.0 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
|
What does Are the devices logging errors low on memory or disk space, or are there other logged attributes that stand out? We don't really do much in SQLiteData as far as the database connection is concerned than call down to GRDB's APIs, so I wonder if there are related discussions on GRDB that may help you? |
Beta Was this translation helpful? Give feedback.
-
|
Perhaps not my best work, but I was able to modify the database initialize function to pass 1000 simultaneous calling tasks. Without the locking I fail at about 5 consistently |
Beta Was this translation helpful? Give feedback.
-
|
Quick follow up here. As Brandon pointed out, the root issue was absolutely sharing the database file in an app group and accessing it directly from multiple processes. This is discussed in GRDBs documentation. The root issue has been about 99% mitigated with a locking structure similar to the one I posted above, but it highlights the need to move this storage location and rethink / prioritize our data sharing strategy. In the meantime, we have traded runtime usage failures for a slight uptick in ANR. Not debilitating, but also clearly needs fixing. Thank you Brandon and Stephen for the timely responses, help, and resources. I urge anyone else who is starting a project and using SQLiteData to not put the sqlite file in a shared container folder |
Beta Was this translation helpful? Give feedback.
Quick follow up here.
As Brandon pointed out, the root issue was absolutely sharing the database file in an app group and accessing it directly from multiple processes. This is discussed in GRDBs documentation.
The root issue has been about 99% mitigated with a locking structure similar to the one I posted above, but it highlights the need to move this storage location and rethink / prioritize our data sharing strategy. In the meantime, we have traded runtime usage failures for a slight uptick in ANR. Not debilitating, but also clearly needs fixing.
Thank you Brandon and Stephen for the timely responses, help, and resources. I urge anyone else who is starting a project and using SQLiteDat…