Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Database is locked in Qml #923

Closed
krille-chan opened this issue Oct 16, 2018 · 1 comment
Closed

Database is locked in Qml #923

krille-chan opened this issue Oct 16, 2018 · 1 comment

Comments

@krille-chan
Copy link

  • Device: Nexus 5, Oneplus One but probably all devices
  • Channel: Stable
  • Build: Confirmed on OTA-3, OTA-4 and OTA-5

Steps to reproduce

Build a new app which is using sqlite with Qml storage. Then change the name of the database, the version of the database and the version of the app and update the app.

Expected behavior

App should restart without problems.

Actual behavior

The app crashes when trying to access the SQlite database. The problem is solved when you restart the app. Sometimes you need to reboot the device.
It is not a very critical bug but it happens sometimes on updates and confuses the user. You can catch this error with:

try {
            db.transaction(
                function(tx) {
                    var rs = tx.executeSql( transaction )
                }
            )
        }
        catch (e) {
            if ( e.code && e.code === 2 ) {
                console.log("Database locked!")
            }
        }

Logfiles and additional information

Database is locked

@krille-chan
Copy link
Author

This issue should be solved in the openstore by closing an app before start the upgrade. So I have talked with Brian about this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants