Fixed
Status Update
Comments
au...@google.com <au...@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 ?
au...@google.com <au...@google.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.
bb...@gmail.com <bb...@gmail.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...
ga...@google.com <ga...@google.com>
bi...@google.com <bi...@google.com> #5
Re #2 getting logs... I have tried previously to get logs from the user, and on each occasion the logs started *after* the point of interest, as if the logs had been cleared just before (e.g. just after a problem), so they've not been of any use.
The way I'm getting logs is via a button in the widget configuration activity which runs the following:
Runtime.getRuntime().exec("logcat -f " + logFile + " *:V");
Is there a better way of getting logs from a user (where the user is not an advanced user and can only just about handle pressing a button and sending a text file)?
The way I'm getting logs is via a button in the widget configuration activity which runs the following:
Runtime.getRuntime().exec("logcat -f " + logFile + " *:V");
Is there a better way of getting logs from a user (where the user is not an advanced user and can only just about handle pressing a button and sending a text file)?
au...@google.com <au...@google.com> #6
Looks like this issue isn't specific to Unique**Periodic**Work ... with a network constraint applied to UniqueWork, if it is scheduled for a time when there is no network, it doesn't go off, even when network is restored. Again, on this user's Android 4.3 device... on the devices I've tested, it works fine.
Do I need to do anything special to make this work on Android 4.3?
Do I need to do anything special to make this work on Android 4.3?
au...@google.com <au...@google.com> #7
And periodic work is running just fine on the problem device without the network constraint applied... runs like clockwork.
bi...@google.com <bi...@google.com> #8
Can you send us a sample app?
jo...@google.com <jo...@google.com> #9
Does your app have verbose logging turned on for WorkManager. You will need to initialize WorkManager with a custom configuration for that.
* Remove the default WorkManager initializer using:
<provider
android:name="androidx.work.impl.WorkManagerInitializer"
android:authorities="${applicationId}.workmanager-init"
tools:node="remove"/>
* Initialize WorkManager in your own content provider or Application#onCreate() with a custom configuration
WorkManager.initialize(
applicationContext,
new Configuration.Builder().setMinimumLoggingLevel(Log.VERBOSE).build());
You will see a lot more WorkManager logs now.
* Remove the default WorkManager initializer using:
<provider
android:name="androidx.work.impl.WorkManagerInitializer"
android:authorities="${applicationId}.workmanager-init"
tools:node="remove"/>
* Initialize WorkManager in your own content provider or Application#onCreate() with a custom configuration
WorkManager.initialize(
applicationContext,
new Configuration.Builder().setMinimumLoggingLevel(Log.VERBOSE).build());
You will see a lot more WorkManager logs now.
au...@google.com <au...@google.com> #10
Typically when there are changes in constraints on API <=22 and you are using the AlarmManager implementation you should see logs with a log tag "WM-ConstraintsCmdHandler".
jo...@google.com <jo...@google.com> #11
Do you have any comment or suggestion regarding mine at #5? Is that an OK way to get logs from a user, particularly one that has a non-rooted device and where I don't particularly want to ask them to go to the trouble of install logcat apps etc... just a simple button in the app which will dump logs would be ideal.
au...@google.com <au...@google.com> #12
We don't really have any good advice for you there; it touches on potentially sensitive data so getting data directly from the user is between what you and the user deem acceptable.
What is the user's 4.3 device name/model?
What is the user's 4.3 device name/model?
sp...@google.com <sp...@google.com> #13
When I use:
WorkManager.initialize(
applicationContext,
new Configuration.Builder().setMinimumLoggingLevel(Log.VERBOSE).build());
The 'Builder' is highlighted in red with Cannot resolve symbol 'Builder'
WorkManager.initialize(
applicationContext,
new Configuration.Builder().setMinimumLoggingLevel(Log.VERBOSE).build());
The 'Builder' is highlighted in red with Cannot resolve symbol 'Builder'
bi...@google.com <bi...@google.com> #14
Sorry, hard to tell without a sample app. It sounds like you may have a missing import or something, but I can't diagnose that.
bi...@google.com <bi...@google.com> #15
OK I used androidx.work.Configuration.Builder() instead
jo...@google.com <jo...@google.com>
au...@google.com <au...@google.com> #16
User's device is a Samsung Galaxy S3
au...@google.com <au...@google.com> #17
Where can I send a logcat from the user? There isn't anything of any sensitive nature so far as I can tell, but best not to post it here.
au...@google.com <au...@google.com> #18
You can send the logs here; I just mean I can't advise you about collection.
jo...@google.com <jo...@google.com> #19
I'm attaching some logs which may be of interest. It includes the extra WorkManager logging you describe above, plus some random bits of logging from my own code (though I've removed quite a bit to avoid overkill here). I've added some annotations to note where the user did various actions (I'm guessing a little but fairly sure) to add some context.
The interest bit starts from "01-29 20:51:44.715"
The interest bit starts from "01-29 20:51:44.715"
jo...@google.com <jo...@google.com> #20
I looked at the logs, and there are a lot of Worker cancellations happening. Are you explicitly cancelling work or using Existing{Periodic}WorkPolicy.REPLACE ?
Can you send us a trimmed down sample of how Workers are being enqueued for your app ?
Can you send us a trimmed down sample of how Workers are being enqueued for your app ?
Description
DESCRIBE THE ISSUE IN DETAIL:
AGP cmake causes configuration cache invalidation.
STEPS TO REPRODUCE:
./gradlew zipTestConfigsWithApks
in the androidx project./gradlew zipTestConfigsWithApks
(second time)EXPECTED
Configuration cache is used the second time
ACTUAL
Configuration cache is not used the second time
It seems that AGP is checking for existence of this directory, thus making this an input to the configuration cache. As stuff is written to this directory, it invalidates the configuration cache.