android / android/codelab-android-workmanager
crash column 'id' does not exist
- Dominant language
- Kotlin
- Stars
- 557
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
Back traces starts.
java.lang.IllegalArgumentException: column 'id' does not exist. Available columns: [required_network_type, requires_charging, requires_device_idle, requires_battery_not_low, requires_storage_not_low, trigger_content_update_delay, trigger_max_content_delay, content_uri_triggers, , state, worker_class_name, input_merger_class_name, input, output, initial_delay, interval_duration, flex_duration, run_attempt_count, backoff_policy, backoff_delay_duration, period_start_time, minimum_retention_duration, schedule_requested_at, run_in_foreground, out_of_quota_policy]
at androidx.room.util.CursorUtil.getColumnIndexOrThrow(CursorUtil.java:123)
at androidx.work.impl.model.WorkSpecDao_Impl.getAllEligibleWorkSpecsForScheduling(WorkSpecDao_Impl.java:1683)
at androidx.work.impl.Schedulers.schedule(Schedulers.java:78)
at androidx.work.impl.WorkerWrapper.onWorkFinished(WorkerWrapper.java:375)
at androidx.work.impl.WorkerWrapper$2.run(WorkerWrapper.java:331)
at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Back traces ends.
Device: SM-G610F、SM-T585、Redmi 8、SM-J410F
Version: 8.0.0、8.1.0、9.0
Contributor guide
Research direction
Start by tracing the reported call from androidx.work.impl.model.WorkSpecDao_Impl.getAllEligibleWorkSpecsForScheduling through Schedulers.schedule and the listed CursorUtil failure. Compare the reported available columns with the query's expected columns and reproduce it on the listed device or version combinations. Done means the scheduling path no longer crashes with the reported missing-id error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100