storesafe / cordova-sqlite-evcore-extbuild-free

Cordova sqlite plugin with Android performance enhancements for PhoneGap Build, GPL v3 or commercial license options
Other
24 stars 13 forks source link

"Could not open database" when TargetSDKVersion is set to 30. #60

Open henkkelder opened 2 years ago

henkkelder commented 2 years ago

I have an IONIC / Cordova / Angular app. Recently I set the android-targetSDKVersion to 30. After that I get reports from users that they ran into "Could not open database" on several Android devices.

Not on my Galaxy 20S, but on a S21 I does occur. Switching back to targetSDK 29 solves the problem... for now, since Google will make 30 mandatory soon.

Version 0.15.1 still shows the error.

Logging shows:

08-11 15:16:21.031 D/PluginManager(30370): getPlugin - put: SQLitePlugin 08-11 15:16:21.038 E/SQLitePlugin(30370): unexpected error, stopping db thread 08-11 15:16:21.038 E/SQLitePlugin(30370): java.sql.SQLException: open error 08-11 15:16:21.038 E/SQLitePlugin(30370): at io.sqlc.SQLitePlugin$SQLiteNativeDatabase.open(SQLitePlugin.java:420) 08-11 15:16:21.038 E/SQLitePlugin(30370): at io.sqlc.SQLitePlugin.openDatabase(SQLitePlugin.java:284) 08-11 15:16:21.038 E/SQLitePlugin(30370): at io.sqlc.SQLitePlugin.access$000(SQLitePlugin.java:37) 08-11 15:16:21.038 E/SQLitePlugin(30370): at io.sqlc.SQLitePlugin$DBRunner.run(SQLitePlugin.java:491) 08-11 15:16:21.038 E/SQLitePlugin(30370): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 08-11 15:16:21.038 E/SQLitePlugin(30370): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 08-11 15:16:21.038 E/SQLitePlugin(30370): at java.lang.Thread.run(Thread.java:923)

henkkelder commented 2 years ago

I must have done something wrong while upgrading the plugin. After reading that vs 0.14.1 should have solved it I tried again to update and now the problem seems solved.