Fixed
Status Update
Comments
su...@twofortyfouram.com <su...@twofortyfouram.com> #2
Thank you for reporting this issue. For us to further investigate this issue, please provide the following additional information:
Android build
Which Android build are you using? (e.g. OPP1.170223.012)
Please provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
Android bug report capturing (kindly share complete bugreport)
After reproducing the issue, press the volume up, volume down, and power button simultaneously. This will capture a bug report on your device in the “bug reports” directory.
Alternate method
After reproducing the issue, navigate to “developer settings”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Screen capture of the issue
Press the volume down and power buttons simultaneously. The image will appear in your gallery. Attach the screenshot file to this issue.
Note: Please upload the files to google drive and share the folder to android-bugreport@google.com, then share the link here.
Android build
Which Android build are you using? (e.g. OPP1.170223.012)
Please provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
Android bug report capturing (kindly share complete bugreport)
After reproducing the issue, press the volume up, volume down, and power button simultaneously. This will capture a bug report on your device in the “bug reports” directory.
Alternate method
After reproducing the issue, navigate to “developer settings”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Screen capture of the issue
Press the volume down and power buttons simultaneously. The image will appear in your gallery. Attach the screenshot file to this issue.
Note: Please upload the files to google drive and share the folder to android-bugreport@google.com, then share the link here.
pa...@google.com <pa...@google.com> #3
Android build: N/A - firebase crashlytics doesn't provide that information. It happens on both Android 9 and Android 10.
Sample: N/A - it's a race condition can't reproduce it consistently
Frequency: ~1 %
Android bug report capturing: N/A - firebase crashlytics doesn't provide that information
Problem:
In BiometricFragment the mBundle is not always set - so when isDeviceCredentialAllowed is called the mBundle.getBoolean(BiometricPrompt.KEY_ALLOW_DEVICE_CREDENTIAL, false) throws the NullPointerException.
Sample: N/A - it's a race condition can't reproduce it consistently
Frequency: ~1 %
Android bug report capturing: N/A - firebase crashlytics doesn't provide that information
Problem:
In BiometricFragment the mBundle is not always set - so when isDeviceCredentialAllowed is called the mBundle.getBoolean(BiometricPrompt.KEY_ALLOW_DEVICE_CREDENTIAL, false) throws the NullPointerException.
su...@twofortyfouram.com <su...@twofortyfouram.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 0b2dee89f68e9ed41c9552a93fee72364253af41
Author: Curtis Belmonte <curtislb@google.com>
Date: Wed Nov 06 10:00:17 2019
Fix possible NPE with BiometricFragment method
The current implementation of
BiometricFragment#setDeviceCredentialAllowed() tries to get a boolean
from mBundle without first checking to see if mBundle is null,
potentially resulting in a NullPointerException. This commit adds in the
null check in order to make calling this method safer. It also adds a
unit test case to exercise this behavior.
Test: ./gradlew biometric:connectedAndroidTest
Fixes: 142599311
Change-Id: I18e03f926ff03c53f8cf1812fbad46ea75db6a32
M biometric/src/androidTest/java/androidx/biometric/BiometricFragmentTest.java
M biometric/src/main/java/androidx/biometric/BiometricFragment.java
https://android-review.googlesource.com/1159943
Branch: androidx-master-dev
commit 0b2dee89f68e9ed41c9552a93fee72364253af41
Author: Curtis Belmonte <curtislb@google.com>
Date: Wed Nov 06 10:00:17 2019
Fix possible NPE with BiometricFragment method
The current implementation of
BiometricFragment#setDeviceCredentialAllowed() tries to get a boolean
from mBundle without first checking to see if mBundle is null,
potentially resulting in a NullPointerException. This commit adds in the
null check in order to make calling this method safer. It also adds a
unit test case to exercise this behavior.
Test: ./gradlew biometric:connectedAndroidTest
Fixes: 142599311
Change-Id: I18e03f926ff03c53f8cf1812fbad46ea75db6a32
M biometric/src/androidTest/java/androidx/biometric/BiometricFragmentTest.java
M biometric/src/main/java/androidx/biometric/BiometricFragment.java
pa...@google.com <pa...@google.com> #5
ar...@gmail.com <ar...@gmail.com> #6
pa@google.com, another issue closed as duplicate https://issuetracker.google.com/issues/64094195 has logs attached as well as this issue (in the description).
Btw, the workaround for that is to limit scope of the search for the test runner — pass package that contains only tests:
- Either by specifying package by passing instrumentation arguments -e package com.example.tests
- Or by subclassing AndroidJUnitRunner and overriding onCreate and adding package parameter there
Btw, the workaround for that is to limit scope of the search for the test runner — pass package that contains only tests:
- Either by specifying package by passing instrumentation arguments -e package com.example.tests
- Or by subclassing AndroidJUnitRunner and overriding onCreate and adding package parameter there
pa...@google.com <pa...@google.com> #7
The bug referenced in #6 only contains a stacktrace not a full log. Working around it by using package name filtering makes sense because that will remove the name of the unloadable class before it is tried to be loaded.
su...@twofortyfouram.com <su...@twofortyfouram.com>
nk...@google.com <nk...@google.com>
nk...@google.com <nk...@google.com> #9
Pleas give runner:1.0.1-alpha-1 a try and report back if you can still see this issue.
su...@twofortyfouram.com <su...@twofortyfouram.com> #10
After updating to alpha-1, the issue no longer reproduces.
az...@lyft.com <az...@lyft.com> #11
Confirming, Runner 1.0.1-alpha-1 fixes issue, thanks!
Description
Version used: Espresso 3.0.0
What steps will reproduce the problem?
1. Create a class that subclasses something from a newer API level, e.g. MyTileService extends android.service.quicksettings.TileService
2. Create a test case that exercises something different (not the code from step 1).
3. Run the tests on a device running an older version of Android, for example API 19
How are you running your tests (via Android Studio, Gradle, adb, etc.)?
adb
What is the expected output? What do you see instead?
Expected the test from step 2 to run.
Actually the tests fail with this exception
java.lang.ClassNotFoundException: com.twofortyfouram.ui.service.RuleEngineToggleTileService
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:251)
at android.support.test.internal.runner.TestLoader.doCreateRunner(TestLoader.java:76)
at android.support.test.internal.runner.TestLoader.getRunnersFor(TestLoader.java:104)
at android.support.test.internal.runner.TestRequestBuilder.build(TestRequestBuilder.java:808)
at android.support.test.runner.AndroidJUnitRunner.buildRequest(AndroidJUnitRunner.java:481)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:367)
I see the same problem with pulling in Google Play Services, which implements a JobService.
java.lang.ClassNotFoundException: com.google.android.gms.measurement.AppMeasurementJobService
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:251)
at android.support.test.internal.runner.TestLoader.doCreateRunner(TestLoader.java:76)
at android.support.test.internal.runner.TestLoader.getRunnersFor(TestLoader.java:104)
at android.support.test.internal.runner.TestRequestBuilder.build(TestRequestBuilder.java:808)
at android.support.test.runner.AndroidJUnitRunner.buildRequest(AndroidJUnitRunner.java:481)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:367)
at com.twofortyfouram.test.runner.ImprovedRunner.onStart(ImprovedRunner.java:45)