No data-related code is used in the project Most happened on Android 7.0 Most Samsung phones
The SDK that integrated a database before, I have deleted all and noted the references
Fatal Exception: android.database.sqlite.SQLiteException: cannot rollback - no transaction is active (code 1)
#################################################################
Error Code : 1 (SQLITE_ERROR)
Caused By : SQL(query) error or missing database.
(cannot rollback - no transaction is active (code 1))
#################################################################
at android.database.sqlite.SQLiteConnection.nativeExecute(SQLiteConnection.java)
at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:629)
at android.database.sqlite.SQLiteSession.endTransactionUnchecked(SQLiteSession.java:439)
at android.database.sqlite.SQLiteSession.endTransaction(SQLiteSession.java:401)
at android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:646)
at androidx.sqlite.db.framework.FrameworkSQLiteDatabase.endTransaction
at androidx.work.impl.WorkDatabase$1.onOpen(WorkDatabase.java:131)
at androidx.work.impl.WorkDatabase_Impl$1.onOpen(WorkDatabase_Impl.java:91)
at androidx.room.RoomOpenHelper.onOpen(RoomOpenHelper.java:120)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.onOpen
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:266)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase
at androidx.room.RoomDatabase.beginTransaction(RoomDatabase.java:328)
at androidx.work.impl.utils.ForceStopRunnable.cleanUp(ForceStopRunnable.java:135)
at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:79)
at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:762)
Related
I'm Facing the following issue after when I upload build in google play store. in debug mode, it was working fine. but in LIVE when I open my app it getting crashed. any one have an idea about this issue how to resolve it?
here is my Android Studio Logcat Error,
E/SQLiteDatabase: Error inserting period=18000 preferred_charging_state=1 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService required_network_type=0 runtime=1593181242118 required_idleness_state=0 source=16 service_kind=0 target_package=com.google.android.gms persistence_level=1 source_version=202117000 last_runtime=0 user_id=0 job_id=-1 requires_charging=0 tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG flex_time=8000 task_type=0 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}}
android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: pending_ops.tag, pending_ops.target_class, pending_ops.target_package, pending_ops.user_id (code 2067 SQLITE_CONSTRAINT_UNIQUE)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:830)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1564)
at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1433)
at aqfz.a(:com.google.android.gms#202117030#20.21.17 (100408-316502805):146)
at aqfj.a(:com.google.android.gms#202117030#20.21.17 (100408-316502805):190)
at aqfj.a(:com.google.android.gms#202117030#20.21.17 (100408-316502805):23)
at aqfj.a(:com.google.android.gms#202117030#20.21.17 (100408-316502805):185)
at aqbt.run(:com.google.android.gms#202117030#20.21.17 (100408-316502805):9)
at skp.b(:com.google.android.gms#202117030#20.21.17 (100408-316502805):12)
at skp.run(:com.google.android.gms#202117030#20.21.17 (100408-316502805):8)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at sql.run(:com.google.android.gms#202117030#20.21.17 (100408-316502805):0)
at java.lang.Thread.run(Thread.java:764)
Thanks in advance!
I have Html stored in sqllite db class, I need to update text of that html. When I make that change and run my application , I get the following exception. Not sure why the file is not getting created
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
2020-04-06 07:09:41.540 2082-3288/system_process E/SQLiteDatabase: DB wipe detected: package=com.exceed reason=corruption file=/storage/emulated/0/Android/data/com.exceed/files/DataModel3.sqlite ctime=2020-04-06T03:09:41Z mtime=2020-04-06T03:09:41Z atime=2020-04-06T03:09:41Z checkfile [unable to obtain timestamp]
2020-04-06 07:09:41.540 2082-3288/system_process E/SQLiteDatabase: at java.lang.Throwable: STACKTRACE
at android.database.sqlite.SQLiteDatabase.wipeDetected(SQLiteDatabase.java:2741)
at android.database.DefaultDatabaseErrorHandler.onCorruption(DefaultDatabaseErrorHandler.java:55)
at android.database.sqlite.SQLiteDatabase.onCorruption(SQLiteDatabase.java:399)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:899)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:786)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:733)
at com.readystatesoftware.sqliteasset.SQLiteAssetHelper.returnDatabase(SQLiteAssetHelper.java:408)
at com.readystatesoftware.sqliteasset.SQLiteAssetHelper.createOrOpenDatabase(SQLiteAssetHelper.java:401)
at com.readystatesoftware.sqliteasset.SQLiteAssetHelper.getWritableDatabase(SQLiteAssetHelper.java:176)
at com.exceed.uae.new_build.database.OpenHelper.<init>(OpenHelper.java:23)
at com.exceed.uae.new_build.database.OpenHelper.getDatabase(OpenHelper.java:28)
at com.exceed.uae.new_build.FcaApplication.onCreate(FcaApplication.java:92)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1182)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460)
at android.app.ActivityThread.access$1300(ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
2020-04-06 07:09:41.540 2082-3288/system_process E/SQLiteDatabase: DB wipe detected: package=com.exceed reason=corruption file=/storage/emulated/0/Android/data/com.exceed/files/DataModel3.sqlite ctime=2020-04-06T03:09:41Z mtime=2020-04-06T03:09:41Z atime=2020-04-06T03:09:41Z checkfile [unable to obtain timestamp]
2020-04-06 07:09:41.541 18613-18613/com.exceed E/DefaultDatabaseErrorHandler: deleting the database file: /storage/emulated/0/Android/data/com.exceed/files/DataModel3.sqlite
2020-04-06 07:09:41.542 18613-18613/com.exceed E/SQLiteLog: (14) cannot open file at line 36683 of [c255889bd9]
2020-04-06 07:09:41.542 18613-18613/com.exceed E/SQLiteLog: (14) os_unix.c:36683: (2) open(/storage/emulated/0/Android/data/com.exceed/files/DataModel3.sqlite) -
2020-04-06 07:09:41.544 18613-18613/com.exceed E/SQLiteDatabase: Failed to open database '/storage/emulated/0/Android/data/com.exceed./files/DataModel3.sqlite'.
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14 SQLITE_CANTOPEN): Could not open database
at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:215)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:197)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:505)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:206)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:198)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:915)
at android.database
In order to make any changes to sqllite file in ios or android, we cant just directly change the sqllite file, it will give error. We need to download sqllite for db and then we can change the data by firing sql query.
I am testing my android app using the android studio also I am using a lot of libraries from GitHub and my problem is when I check LogCat, it showing the unknown message from my phone there is no related app has installed to get this type of message.
What is the problem is my app is hacked?
0-23 12:41:56.486 19337-19379/? E/SQLiteDatabase: Error inserting imdata={"sender":"1007787459425466","is_video":true,"filesize":4229475,"alias":"aswin ps","original_id":".8HGNxeIGQGYKGdwELDentPbijFS","public_level":1,"sim_iso":"IN","type":"video"} is_public=1 buid=fof:fof object_id=.8HGNxeIGQGYKGdwELDentPbijFS original_id=.8HGNxeIGQGYKGdwELDentPbijFS view_type=1 timestamp=1540262393 group_num=0 message_read=0
android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: stories.buid, stories.object_id (code 2067)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:780)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1471)
at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1341)
at com.imo.android.imoim.util.v.a(SourceFile:79)
at com.imo.android.imoim.util.h.doInBackground(SourceFile:1026)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
I'm getting this crash on few devices, but only on Android 4.
I'm on Firebase Android SDK 10.2.1 11.0.2. Deferring updating to the latest version because it forces update of Google Play Services as well, and many users continue to remain on older GPS versions.
Is anybody else seeing this problem?
Update: This was working earlier. Crashes started after I upgraded from Firebase SDK 9.4.0 to 10.2.1, and compileSdkVersion 23 to 25. Crash only happens on Android 4.4 (Kitkat 19)
Updated Exception:
Fatal Exception: java.lang.RuntimeException
at com.google.android.gms.internal.mz.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5292)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by o.kD: Failed to gain exclusive lock to Firebase Database's offline persistence. This generally means you are using Firebase Database from multiple processes in your app. Keep in mind that multi-process Android apps execute the code in your Application class in all processes, so you may need to avoid initializing FirebaseDatabase in your Application class. If you are intentionally using Firebase Database from multiple processes, you can only enable offline persistence (i.e. call setPersistenceEnabled(true)) in one of them.
at com.google.android.gms.internal.nb.zzN(Unknown Source)
at com.google.android.gms.internal.nb.(Unknown Source)
at com.google.android.gms.internal.mx.zza(Unknown Source)
at com.google.android.gms.internal.qd.zzgQ(Unknown Source)
at com.google.android.gms.internal.qu.zzHg(Unknown Source)
at com.google.android.gms.internal.qu.zza(Unknown Source)
at com.google.android.gms.internal.qv.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5): , while compiling: PRAGMA journal_mode
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(SQLiteConnection.java)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:893)
at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:638)
at android.database.sqlite.SQLiteConnection.setJournalMode(SQLiteConnection.java:320)
at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration(SQLiteConnection.java:294)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:215)
at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:193)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:463)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:185)
at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:177)
at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:829)
at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:814)
at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:709)
at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:1039)
at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:256)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:224)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)
at com.google.android.gms.internal.nb.zzN(Unknown Source)
at com.google.android.gms.internal.nb.(Unknown Source)
at com.google.android.gms.internal.mx.zza(Unknown Source)
at com.google.android.gms.internal.qd.zzgQ(Unknown Source)
at com.google.android.gms.internal.qu.zzHg(Unknown Source)
at com.google.android.gms.internal.qu.zza(Unknown Source)
at com.google.android.gms.internal.qv.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
I do have multiple processes in the app, but using the following code to abort Application.onCreate for sub processes.
#Override
public void onCreate() {
super.onCreate();
if (FirebaseApp.getApps(this).isEmpty()) {
// No firebase apps; we are in a non-main process
return;
}
// Firebase init and other custom logic
FirebaseDatabase.getInstance().setPersistenceEnabled(true);
}
There is no SQLiteDatabaseLockedException in Firebase. This SQLiteDatabaseLockedException is thrown when you are using a SQLite database with Android and the database engine is unable to acquire a database lock that is needs to do its job.
If the statement is a [COMMIT] or occurs outside of an explicit transaction, then you can retry the statement. If the statement is not a [COMMIT] and occurs within a explicit transaction then you should rollback the transaction before continuing.
Edit: With the new edit of your detailed stack trace, i see what the error is. The error is occuring when you are setting setPersistenceEnabled(true). This must be done before doing anything else with your firebaseDatabase object. So, i recomand you using the following code:
public class HelperClass {
private static FirebaseDatabase firebaseDatabase;
public static FirebaseDatabase getDatabase() {
if (firebaseDatabase == null) {
firebaseDatabase = FirebaseDatabase.getInstance();
firebaseDatabase.setPersistenceEnabled(true);
}
return firebaseDatabase;
}
}
I am facing an question that I don't know how to solve it.I guess it may relate to then webView.Can some one help me? Thanks very much.
android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 1802)
at android.database.sqlite.SQLiteConnection.nativeExecuteForCursorWindow(Native Method)
at android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:845)
at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:836)
at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)
at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:144)
at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:133)
at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:197)
at android.database.AbstractCursor.moveToFirst(AbstractCursor.java:237)
at android.webkit.WebViewDatabaseClassic.getUsernamePassword(WebViewDatabaseClassic.java:388)
at android.webkit.BrowserFrame.handleMessage(BrowserFrame.java:516)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:973)
at java.lang.Thread.run(Thread.java:841)