Status Update
Comments
ke...@gmail.com <ke...@gmail.com> #2
I'm not sure how to edit the description. But forgot to add that this will work when the app is in the foreground. It just doesn't work when you lock your device. I test this by moving the app to the background and then locking my device and checking the logs in Android Studio.
rd...@linkedin.com <rd...@linkedin.com> #3
It would be great if you could prioritize a fix for this issue. Additionally, if there are any alternative ways we can address this from our side, please let us know. Thank you!
da...@google.com <da...@google.com>
f....@eyeo.com <f....@eyeo.com> #4
We also experienced issues with the new version 2.10.0. In our app a Job that is launched at start of the app is triggered and then immediatly cancelled because constraints are not meet anymore. I tried everything from putting it as a foreground job removing all constraints on the job but the behavior stay the same. I will rollback to 2.9.1 until it's fixed. You will find attached some logs of the WM in our app, take a look at job fec664f7-e40c-4df1-baca-3cbc7e1b1ff9.
Description
Version used: 2.10.0
Devices/Android versions reproduced on: Pixel 9 Pro Fold on Android 15
If this is a bug in the library, we would appreciate if you could attach:
- Sample project to trigger the issue. Is attached!
When using WorkManager with OneTimeWorkRequest and CoroutineWorker (see attached project), I'm getting not internet connection inside `doWork`. If I add a while loop until I get an internet connection, it usually takes around 10-20 seconds until I get a connection. I also see this log at the moment we have a working connection: `onStartJob for WorkGenerationalId(workSpecId=70557a3b-bfad-4378-a7c3-6ac175224f97, generation=0)` and before `doWork` is called this log: `Processor: processing WorkGenerationalId(workSpecId=70557a3b-bfad-4378-a7c3-6ac175224f97, generation=0)`. So it seems WorkManager does know when the internet connection is active, but invokes the function too soon.
If I revert the WorkManager back to 2.9.1 it is working as expected.
This issue gave me a lot of headaches, since it was the first time I used WorkManager and couldn't figure it out why it wasn't working for me.