Fixed
Status Update
Comments
yb...@google.com <yb...@google.com>
su...@google.com <su...@google.com> #2
Thanks for filing the issue.
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
Description
Version used: 1.0.0-alpha2
Devices/Android versions reproduced on: android 25
Psuedocode(Kotlin):
class TestWorker : Worker() {
companion object {
const val print = "pritn"
}
override fun doWork(): WorkerResult {
Thread.sleep(2000L + Random().nextInt(2000))
Timber.tag("TESTING").d("----------------${inputData.getString(print, "")}-----------------")
return WorkerResult.SUCCESS
}
}
fun build(msg: String): OneTimeWorkRequest {
return OneTimeWorkRequest
.Builder(TestWorker::class.java)
.addTag("TEST")
.setInputData(mapOf(TestWorker.print to msg).toWorkData())
.build()
}
val j1 = build("1")
val j2 = build("2")
val j3 = build("3")
wm.beginWith(j1).then(j2).enqueue()
wm.beginWith(j2).then(j3).enqueue()
Crashes with exception:
android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: WorkTag.tag, WorkTag.work_spec_id (code 1555)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:782)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
at android.arch.persistence.db.framework.FrameworkSQLiteStatement.executeInsert(FrameworkSQLiteStatement.java:79)
at android.arch.persistence.room.EntityInsertionAdapter.insert(EntityInsertionAdapter.java:64)
at androidx.work.impl.model.WorkTagDao_Impl.insert(WorkTagDao_Impl.java:46)
at androidx.work.impl.utils.EnqueueRunnable.enqueueWorkWithPrerequisites(EnqueueRunnable.java:273)
at androidx.work.impl.utils.EnqueueRunnable.enqueueContinuation(EnqueueRunnable.java:134)
at androidx.work.impl.utils.EnqueueRunnable.processContinuation(EnqueueRunnable.java:127)
at androidx.work.impl.utils.EnqueueRunnable.processContinuation(EnqueueRunnable.java:120)
at androidx.work.impl.utils.EnqueueRunnable.addToDatabase(EnqueueRunnable.java:95)
at androidx.work.impl.utils.EnqueueRunnable.run(EnqueueRunnable.java:79)
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:761)