Search Issue Tracker
Fixed in 5.0.0-pre.12
Votes
0
Found in [Package]
5.0.0-pre.7
Issue ID
1387507
Regression
No
[ARFoundation] Camera request permission window is not shown when app is minimized and opened again on Android device
Reproduction steps:
1. Open the attached Unity project "1387507.zip"
2. In the Editor, open the Android Logcat window
3. Go to Build Settings and Build and run on an Android device
4. Open the application on a device
5. Press the "Request" button in the application to see a dialog asking for camera permission
6. When permission dialog shows up, minimize the application and open it again
7. Press the "Request" button in the application again
8. Observe error appear in the logs
Expected result: Permission dialog is shown to request camera permission, no errors in logs
Actual result: Permission dialog is not shown to request camera permission, the error is thrown in the logs:
"Error Unity InvalidOperationException: Cannot start a new permissions request before the current one finishes.
Error Unity at UnityEngine.XR.ARCore.ARCorePermissionManager.RequestPermission (System.String permissionName, System.Action`2[T1,T2] callback) [0x00000] in <00000000000000000000000000000000>:0
Error Unity at PermissionChecker.PermissionRequest () [0x00000] in <00000000000000000000000000000000>:0"
Reproducible with: 4.2.2, 5.0.0-pre.7 (2021.2.11f1, 2022.1.0b6, 2022.2.0a3)
Could not test with: 2.1.19 (2019.4.35f1 (Build errors)), 4.1.9 (2020.3.27f1 (A camera request permission window does not pop-up when following the steps))
Reproduces with these devices:
VLNQA00121 - Samsung Galaxy S9 (SM-G960F), OS: 9.0.0, CPU: Exynos 9 Series 9810, GPU: Mali-G72
VLNQA00219 - Samsung Galaxy Note9 USA (SM-N960U), OS: 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno 630
VLNQA00404 - Galaxy Z Flip3 5G (SM-F711B), OS: 11, CPU: Snapdragon 888, GPU: Adreno 660
VLNQA00410 - Galaxy Z Fold3 5G (SM-F926U), OS: 11, CPU: Snapdragon 888, GPU: Adreno 660
VLNQA00147 - Razer Phone (Cheryl), OS: 8.1.0, CPU: Snapdragon 835 MSM8998, GPU: Adreno 540
VLNQA00006 - Samsung Galaxy S7 (SM-G930F), OS: 8.0.0, CPU: Exynos 8 Octa (8890), GPU: Mali-T880
VLNQA00263 - Google Pixel 3 (Pixel 3), OS: 12.0.0, CPU: Snapdragon 845, GPU: Adreno 630
VLNQA00109 - Xiaomi Mi Note Pro (MI NOTE Pro), OS: 7.0.0, CPU: Snapdragon 810 MSM8994, GPU: Adreno 430
Could not be reproducible with these devices:
VLNQA00277 - Asus ROG Phone (ASUS_Z01QD), OS: 9.0.0, CPU: Snapdragon 845 SDM845, GPU: Adreno 630 (The application closes automatically when minimizing it)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (fix version 5.0.0-pre.12):
Fixed in 5.0.0-pre.12
To address this issue, we have added API that cancels existing requests, so that re-requests can be made which will be shipped with 5.0.0 of ARFoundation.
If users wanted to handle permission requesting on their own. Canceling permissions could be handled the following way:
void OnApplicationPause(bool pauseStatus)
{
if(pauseStatus)
{
//Logic while paused.
}
else
{
ARCorePermissionManager.CancelPermissionRequest();
}
}