You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
🐞Workmanager().registerOneOffTask no more runs the task immediately and now cancelling tasks as failed after 30 seconds #738
Please reopen #732 since it's not fixed, rather the 30 seconds watch dog is cancelling even recurring tasks. Same is the case with expedited and foreground service tasks. It looks like an issue on dart side, since experiencing the same issue on iOS.
The issue still remains after upgrading to workmanager 0.10.9 and workmanager_android 0.10.8
Reproduction steps remain the same as in #732
The only difference is now the log contains one additional entry which suggests somehow the job is auto cancelled. Note the app is in the foreground. If you cant reproduce the issue, press the Register OneOff Task button again:
W/JobInfo ( 8750): Requested important-while-foreground flag for job20 is ignored and takes no effectD/WM-SystemJobScheduler( 8750): Scheduling work ID af669ab4-ab24-41ac-aa04-562427276d19Job ID 20D/WM-GreedyScheduler( 8750): Starting work for af669ab4-ab24-41ac-aa04-562427276d19D/WM-Processor( 8750): Processor: processing WorkGenerationalId(workSpecId=af669ab4-ab24-41ac-aa04-562427276d19, generation=0)D/WM-WorkerWrapper( 8750): Starting work for dev.fluttercommunity.workmanager.BackgroundWorkerD/WM-SystemJobService( 8750): onStartJob for WorkGenerationalId(workSpecId=af669ab4-ab24-41ac-aa04-562427276d19, generation=0)I/om.abc.xyz( 8750): AssetManager2(0x7e01c5c23e38) locale list changing from [] to [en-US]D/WM-Processor( 8750): Work WorkGenerationalId(workSpecId=af669ab4-ab24-41ac-aa04-562427276d19, generation=0) is already enqueued for processing
After a few seconds this log appears but the job does not run the callback:
I/WM-WorkerWrapper( 8750): Worker result FAILURE for Work [ id=af669ab4-ab24-41ac-aa04-562427276d19, tags={ dev.fluttercommunity.workmanager.BackgroundWorker } ]D/WM-Processor( 8750): Processor af669ab4-ab24-41ac-aa04-562427276d19 executed; reschedule = falseD/WM-SystemJobService( 8750): af669ab4-ab24-41ac-aa04-562427276d19 executed on JobSchedulerD/WM-GreedyScheduler( 8750): Cancelling work ID af669ab4-ab24-41ac-aa04-562427276d19D/WM-SystemJobService( 8750): onStopJob for WorkGenerationalId(workSpecId=af669ab4-ab24-41ac-aa04-562427276d19, generation=0)
Root cause found and fixed in #739: the Pigeon migration inverted the handshake, so the task could be sent to Dart before the isolate was ready — the callback never ran and the watchdog then failed the worker. The fix re-inverts it (Dart-initiated). Shipping in 0.10.10 — please retest when it's out.
Hi @ened retested using v0.10.10, issue is still not fixed:
Before closing the issue could we please run the example app to check whether the fix is working preferably on an Android 16+ devices or emulator, since just the unit tests might not be enough for real device/emulator issues.
W/JobInfo ( 7318): Requested important-while-foreground flag for job1 is ignored and takes no effect
D/WM-SystemJobScheduler( 7318): Scheduling work ID 53748bde-74ff-49b2-8632-2616eba8a592Job ID 1
D/WM-GreedyScheduler( 7318): Starting work for 53748bde-74ff-49b2-8632-2616eba8a592
D/WM-Processor( 7318): Processor: processing WorkGenerationalId(workSpecId=53748bde-74ff-49b2-8632-2616eba8a592, generation=0)
D/WM-WorkerWrapper( 7318): Starting work for dev.fluttercommunity.workmanager.BackgroundWorker
D/WM-SystemJobService( 7318): onStartJob for WorkGenerationalId(workSpecId=53748bde-74ff-49b2-8632-2616eba8a592, generation=0)
D/WM-Processor( 7318): Work WorkGenerationalId(workSpecId=53748bde-74ff-49b2-8632-2616eba8a592, generation=0) is already enqueued for processing
After a few seconds the task gets cancelled without even running the callback:
I/WM-WorkerWrapper( 7318): Worker result FAILURE for Work [ id=53748bde-74ff-49b2-8632-2616eba8a592, tags={ dev.fluttercommunity.workmanager.BackgroundWorker } ]
D/WM-Processor( 7318): Processor 53748bde-74ff-49b2-8632-2616eba8a592 executed; reschedule = false
D/WM-SystemJobService( 7318): 53748bde-74ff-49b2-8632-2616eba8a592 executed on JobScheduler
D/WM-GreedyScheduler( 7318): Cancelling work ID 53748bde-74ff-49b2-8632-2616eba8a592
D/WM-SystemJobService( 7318): onStopJob for WorkGenerationalId(workSpecId=53748bde-74ff-49b2-8632-2616eba8a592, generation=0)
D/WindowOnBackDispatcher( 7318): setTopOnBackInvokedCallback (unwrapped): android.app.Activity$$ExternalSyntheticLambda0@5628e2
Activity
fix(android): re-invert background channel handshake to Dart-initiated (
ened commentedon Sep 7, 2026
Root cause found and fixed in #739: the Pigeon migration inverted the handshake, so the task could be sent to Dart before the isolate was ready — the callback never ran and the watchdog then failed the worker. The fix re-inverts it (Dart-initiated). Shipping in 0.10.10 — please retest when it's out.
fix(android): re-invert background channel handshake to Dart-initiated (
absar commentedon Sep 9, 2026
Hi @ened retested using v0.10.10, issue is still not fixed:
Before closing the issue could we please run the example app to check whether the fix is working preferably on an Android 16+ devices or emulator, since just the unit tests might not be enough for real device/emulator issues.
W/JobInfo ( 7318): Requested important-while-foreground flag for job1 is ignored and takes no effect
D/WM-SystemJobScheduler( 7318): Scheduling work ID 53748bde-74ff-49b2-8632-2616eba8a592Job ID 1
D/WM-GreedyScheduler( 7318): Starting work for 53748bde-74ff-49b2-8632-2616eba8a592
D/WM-Processor( 7318): Processor: processing WorkGenerationalId(workSpecId=53748bde-74ff-49b2-8632-2616eba8a592, generation=0)
D/WM-WorkerWrapper( 7318): Starting work for dev.fluttercommunity.workmanager.BackgroundWorker
D/WM-SystemJobService( 7318): onStartJob for WorkGenerationalId(workSpecId=53748bde-74ff-49b2-8632-2616eba8a592, generation=0)
D/WM-Processor( 7318): Work WorkGenerationalId(workSpecId=53748bde-74ff-49b2-8632-2616eba8a592, generation=0) is already enqueued for processing
After a few seconds the task gets cancelled without even running the callback:
I/WM-WorkerWrapper( 7318): Worker result FAILURE for Work [ id=53748bde-74ff-49b2-8632-2616eba8a592, tags={ dev.fluttercommunity.workmanager.BackgroundWorker } ]
D/WM-Processor( 7318): Processor 53748bde-74ff-49b2-8632-2616eba8a592 executed; reschedule = false
D/WM-SystemJobService( 7318): 53748bde-74ff-49b2-8632-2616eba8a592 executed on JobScheduler
D/WM-GreedyScheduler( 7318): Cancelling work ID 53748bde-74ff-49b2-8632-2616eba8a592
D/WM-SystemJobService( 7318): onStopJob for WorkGenerationalId(workSpecId=53748bde-74ff-49b2-8632-2616eba8a592, generation=0)
D/WindowOnBackDispatcher( 7318): setTopOnBackInvokedCallback (unwrapped): android.app.Activity$$ExternalSyntheticLambda0@5628e2