Status Update
Comments
ru...@gmail.com <ru...@gmail.com> #3
Ignore.
an...@google.com <an...@google.com> #4
It seems like we can repro the issue with embedded emulator. I used a stopwatch to record how long it takes for Google Sign-In page to load for the first time.
1, stand-alone emulator version (31.3.10): 4 seconds
2, embedded emulator (31.3.10): 15 seconds.
I am using Windows 10 with Intel Core i7-11850H@ 2.50GHz with 32GB RAM.
ru...@gmail.com <ru...@gmail.com> #5
Ranjit is also able to repro the issue on Windows with Intel CPU. The problem is essentially in the first network connection. I asked Ranjit to help me with bisection mentioned in #3.
ra...@google.com <ra...@google.com> #6
Time taken to show the Gmail Sign In page when AVD launched in embedded mode (Used Pixel_4a_API_31)
- Emulator Version : 31.3.9-8716652 about 17 seconds
- Emulator Version : 31.3.10-8779787 about 18 seconds
- Emulator Version : 31.3.10-8803787 about 20 seconds
ru...@gmail.com <ru...@gmail.com> #7
RE#6 Thanks Ranjit for helping out with bisecting. I think the issue probably existed before I checked in the network related CLs. We will keep bisecting.
Description
Version used: 2.1.0
Devices/Android versions reproduced on: 6.0
We're getting this crash on multiple devices:
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.util.ArrayMap.containsKey(java.lang.Object)' on a null object reference
at android.os.BaseBundle.containsKey + 277(BaseBundle.java:277)
at androidx.work.impl.background.systemjob.SystemJobScheduler.getPendingJobIds + 331(SystemJobScheduler.java:331)
at androidx.work.impl.background.systemjob.SystemJobScheduler.schedule + 138(SystemJobScheduler.java:138)
at androidx.work.impl.Schedulers.schedule + 93(Schedulers.java:93)
at androidx.work.impl.WorkManagerImpl.rescheduleEligibleWork + 587(WorkManagerImpl.java:587)
at androidx.work.impl.utils.ForceStopRunnable.run + 82(ForceStopRunnable.java:82)
at androidx.work.impl.utils.SerialExecutor$Task.run + 75(SerialExecutor.java:75)
at java.util.concurrent.ThreadPoolExecutor.runWorker + 1113(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run + 588(ThreadPoolExecutor.java:588)
at java.lang.Thread.run + 833(Thread.java:833)
For some reason, the mMap in BaseBundle is null and getPendingJobIds doesn't catch that:
for (JobInfo jobInfo : jobs) {
PersistableBundle extras = jobInfo.getExtras();
// The map inside extras can be null, so extras.containsKey can cause a NPE
if (extras != null && extras.containsKey(EXTRA_WORK_SPEC_ID)) {
if (workSpecId.equals(extras.getString(EXTRA_WORK_SPEC_ID))) {
jobIds.add(jobInfo.getId());
}
}
}