Database has no tables after reinstalling via ADB
After reinstalling Briar via ADB, I saw the startup failure notification and the log showed that the settings table didn't exist:
org.briarproject.bramble.api.db.DbException: org.h2.jdbc.JdbcSQLException: Table "SETTINGS" not found; SQL statement: SELECT settingKey, value FROM settings WHERE namespace = ? [42102-192] at org.briarproject.bramble.db.JdbcDatabase.getSettings(JdbcDatabase.java:2169) at org.briarproject.bramble.db.JdbcDatabase.open(JdbcDatabase.java:355) at org.briarproject.bramble.db.H2Database.open(H2Database.java:65) at org.briarproject.bramble.db.DatabaseComponentImpl.open(DatabaseComponentImpl.java:112) at org.briarproject.bramble.lifecycle.LifecycleManagerImpl.startServices(LifecycleManagerImpl.java:108) at org.briarproject.briar.android.BriarService.lambda$onCreate$0(BriarService.java:132) at org.briarproject.briar.android.-$$Lambda$BriarService$Ihm6XxaER2EMRlAKzUA1GpEtxZU.run(Unknown Source:4) at java.lang.Thread.run(Thread.java:764)
A similar problem was previously mentioned here, but most of that discussion referred to a different problem that's now been fixed.
The problem occurred after installing a debug build (0f614e84) on the Nexus 5X via ADB, launching the build, performing some actions such as adding and removing a contact, signing out, and installing a new build (d40cfd30) via ADB. When I launched the new build, the startup failure notification was shown.
Subsequent lauches showed the same error. The db.mv.db file exists, with a size of 28672 bytes, and Briar can open it, but the DB contains no tables ("SHOW TABLES" returns the expected table names on an unaffected device, but no table names on this device). It seems like nothing was written to the DB file during the first session, after the point where the DB file was created.
Two other devices (Moto G 4G and Moto E3) that were used for testing the same builds didn't show the bug, so I don't think it's caused by these particular builds.