-
Notifications
You must be signed in to change notification settings - Fork 30.2k
[camera] Permissions request are not well-awaiting on iOS #97199
Copy link
Copy link
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: regressionIt was better in the past than it is nowIt was better in the past than it is nowhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: cameraThe camera pluginThe camera pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listc: regressionIt was better in the past than it is nowIt was better in the past than it is nowhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: cameraThe camera pluginThe camera pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.
Related to #96429. It's a serious bug that breaks lifecycle control flow on iOS. This issue could be introduced by flutter/plugins#4140.
Steps to Reproduce
cameraplugin like the first install (uninstall first if it's installed).Details
From the screenshot, we can recognize that the

initializemethod completes before permissions requests are done. This could be affected by the thread model changing of implementations on iOS.Once the new controller has been given to the field, the lifecycle listener is triggered a bit later, which will dispose the controller in a short time, causing a race condition issue.
And after the app is resumed, the controller will initialize again.
Environment
camera: 0.9.4+6