Closed njacobson-hrp closed 6 months ago
My guess is that this is related to when the app is performing a scan,
Yes, this can happen when a scan is running. And since the scan runs periodically, this effect can also occur periodically. SQLite is not a multiuser database. If the devices are being edited extensively, it is advisable to deactivate the scan for the duration of the editing process. The normal case is that mostly Pi.Alert writes to the database and not the user via the web interface. This usually has mostly read access.
Update released with https://github.com/leiweibau/Pi.Alert/commit/770ae74b5fbbc2f970ee10b660edb325b4043c76
I have added or reworded the text on the Help/FAQ page.
Sometimes when I try to save a device (although it probably happens with any action that writes to the database) I get an error. On my laptop, the error message starts with the failed SQL query but is truncated before I can see the actual error text. On my phone, I can see the full error which says it is trying to write to a read-only database. Not directly related to the issue, but I would recommend not including the SQL code in the error message for the user especially since it is truncated on some devices.
If I wait about a minute or so, I can eventually save the record successfully and make any other database changes for a period of time. My guess is that this is related to when the app is performing a scan, but I haven't investigated enough yet to know. I tried to see if other people are experiencing this issue, but the only references were to database permission errors which is unlikely to be my issue since it is transient.