You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[flutter_tools] PathNotFoundException in IOSCoreDeviceControl and Xcode Build temp directory cleanup #186954
While PR #140842 successfully fixed PathNotFoundException in IOSCoreDeviceControl._listCoreDevices by introducing ErrorHandlingFileSystem.deleteIfExists, several other methods in the same class still rely on synchronous tempDirectory.deleteSync(recursive: true).
In high-frequency local testing environments, CI/CD systems, or during race conditions, these directories can be removed asynchronously (e.g., by background system cleanups or parallel tasks). When the finally block tries to clean up, it triggers an unchecked PathNotFoundException, leading to a crash.
Affected Code Locations
packages/flutter_tools/lib/src/ios/core_devices.dart at lines 527, 604, 652, and 747.
packages/flutter_tools/lib/src/ios/mac.dart at line 595.
Expected Behavior
The tool should utilize ErrorHandlingFileSystem.deleteIfExists to prevent throwing an uncaught PathNotFoundException if the directory was already deleted by the OS or a concurrent task during build cleanup.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
bkonyi commentedon May 22, 2026
Closed in favor of the unified global FileSystem Robustness Initiative tracking issue #186959.
github-actions commentedon Jul 14, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.