eclipse / paho.mqtt.android

MQTT Android
Other
2.89k stars 865 forks source link

android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14) #413

Open kwende opened 4 years ago

kwende commented 4 years ago

Please fill out the form below before submitting, thank you!

Android API Version Bug Seen on: 22 Android Version Bug Seen on: 5.1

Please also check that if you have found the bug in the Release version (1.1.1) that you check that it also exists in the Snapshot (1.1.2-SNAPSHOT) before raising a bug.

It does

Description of Bug:

E.g. Steps to re-create, how often does this happen etc..

We have a Xamarin-based application that's using the MQTT library to periodically check-in with a server. This application runs on phones. Periodically the application will crash, and upon immediately examining logcat we see the following exception every time:

02 14:47:26.399 14844 14844 E AndroidRuntime: FATAL EXCEPTION: main
06-02 14:47:26.399 14844 14844 E AndroidRuntime: Process: [app name hidden], PID: 14844
06-02 14:47:26.399 14844 14844 E AndroidRuntime: android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at android.database.sqlite.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at android.database.sqlite.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:735)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at android.database.sqlite.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:754)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:64)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at android.database.sqlite.SQLiteDatabase.delete(SQLiteDatabase.java:1576)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at org.eclipse.paho.android.service.DatabaseMessageStore.clearArrivedMessages(DatabaseMessageStore.java:397)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at org.eclipse.paho.android.service.MqttConnection.connect(MqttConnection.java:202)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at org.eclipse.paho.android.service.MqttService.connect(MqttService.java:329)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at org.eclipse.paho.android.service.MqttAndroidClient.doConnect(MqttAndroidClient.java:467)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at org.eclipse.paho.android.service.MqttAndroidClient.access$200(MqttAndroidClient.java:76)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at org.eclipse.paho.android.service.MqttAndroidClient$MyServiceConnection.onServiceConnected(MqttAndroidClient.java:115)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1662)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1691)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:790)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:99)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:164)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6640)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
06-02 14:47:26.399 14844 14844 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)

This exception happens approximately 3-5 times a day, and at seemingly random times.

Console Log output (if available):

rakathal commented 3 years ago

I am also facing the same issue. Can anyone please help here ?

subhadeepchakraborty commented 3 years ago

same for me. can anyone help me?