Fixed
Status Update
Comments
ra...@google.com <ra...@google.com> #2
Which device is issue being reported on? Can you get any logs from the device for us after you turn on verbose logging ?
ca...@careem.com <ca...@careem.com> #3
A few things in addition to the questions in #2:
1. Can you verify that this problem still occurs in beta03? This is available now.
2. Can you check your merged manifest has a network permission (ACCESS_NETWORK_STATE)? It should get merged in automatically.
1. Can you verify that this problem still occurs in beta03? This is available now.
2. Can you check your merged manifest has a network permission (ACCESS_NETWORK_STATE)? It should get merged in automatically.
ra...@google.com <ra...@google.com> #4
#3: have now tried beta03 and it's the same behaviour... periodic work schedule breaks down when network constraint is applied (after a period of time with no network). And yes, ACCESS_NETWORK_STATE is in the merged manifest... it's actually in the main manifest anyway.
#2: I'll try...
#2: I'll try...
Description
I have created a Worker and a test class running it, but the doWork method is not called.
I have tried to debug the issue and the work is not executed as the constructor of `TestWorkManagerImpl` creates a list of Schedulers with one `null` Scheduler. due to this the Schedulers.schedule method throws a null pointer exception.
Here is the stacktrace from the exception:
androidx.work.impl.Schedulers.schedule(Schedulers.java:91)
androidx.work.impl.utils.EnqueueRunnable.scheduleWorkInBackground(EnqueueRunnable.java:131)
androidx.work.impl.utils.EnqueueRunnable.run(EnqueueRunnable.java:92)
androidx.work.testing.TestWorkManagerImpl$1.executeOnBackgroundThread(TestWorkManagerImpl.java:63)
androidx.work.impl.WorkContinuationImpl.enqueue(WorkContinuationImpl.java:185)
androidx.work.impl.WorkManagerImpl.enqueue(WorkManagerImpl.java:305)
androidx.work.WorkManager.enqueue(WorkManager.java:180)
com.example.carlo.myapplication.testWorker() <--- where WorkManager.getInstance().enqueue(request) is called
I have also created a project with one failing test.
I am using WorkManager 1.0.0-beta01
Please let me know if you need more information