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
"Waiting for another flutter command to release the Swift Package Manager lock..." on SMB share on MacOS #192802
It looks like file locking isn't supported via SMB, which would explain why we're failing to acquire the lock. #192821 should allow for progress to be made when working with file systems that don't support file locking, but won't prevent any possible collisions due to concurrent writes during Xcode build steps.
Hi, Thanks for fix. I found another problem with lockfile in same situation:
Command: flutter build ios
Building will fail after 300 seconds with timeout. Error corresponds to lockfile not being freed:
Could not acquire the lock to /Volumes/APP/.dart_tool/hooks_runner/shared/objective_c/.lock.
Target build_hooks failed: TimeoutException after 0:05:00.000000: Could not acquire the lock to /Volumes/APP/.dart_tool/hooks_runner/shared/objective_c/.lock.
Failed to package /Volumes/APP.
Command PhaseScriptExecution failed with a nonzero exit code
Could not acquire the lock to /Volumes/APP/.dart_tool/hooks_runner/shared/objective_c/.lock.
Target build_hooks failed: TimeoutException after 0:05:00.000000: Could not acquire the lock to /Volumes/APP/.dart_tool/hooks_runner/shared/objective_c/.lock.
Failed to package /Volumes/APP.
Command PhaseScriptExecution failed with a nonzero exit code
Temporary fix: Make symbolic link to .dart_tool directory on MacOS local filesystem (/smb/project/.dart_tool => /tmp/.dart_tool) to bypass this eror.
While this stems from the same underlying issue (advisory file locking failing on SMB network shares), this failure occurs in a separate component. The lock here is managed by package:hooks_runner (used during build_hooks for native assets like package:objective_c) rather than the Flutter tool's Swift Package Manager integration fixed in #192821.
I have filed an upstream issue in dart-lang/native to track and resolve this: dart-lang/native#3651. Once the fix lands upstream in hooks_runner, we will roll the updated package into Flutter.
In the meantime, symlinking .dart_tool to a local APFS/HFS+ volume is an effective temporary solution, as local macOS filesystems support advisory file locking.
Activity
vashworth commentedon Sep 15, 2026
cc @bkonyi
bkonyi commentedon Sep 15, 2026
It looks like file locking isn't supported via SMB, which would explain why we're failing to acquire the lock. #192821 should allow for progress to be made when working with file systems that don't support file locking, but won't prevent any possible collisions due to concurrent writes during Xcode build steps.
MarcinWad commentedon Sep 16, 2026
Hi, Thanks for fix. I found another problem with lockfile in same situation:
Command:
flutter build iosBuilding will fail after 300 seconds with timeout. Error corresponds to lockfile not being freed:
Temporary fix: Make symbolic link to .dart_tool directory on MacOS local filesystem (/smb/project/.dart_tool => /tmp/.dart_tool) to bypass this eror.
bkonyi commentedon Sep 16, 2026
Hi @MarcinWad,
Thanks for reporting this!
While this stems from the same underlying issue (advisory file locking failing on SMB network shares), this failure occurs in a separate component. The lock here is managed by
package:hooks_runner(used duringbuild_hooksfor native assets likepackage:objective_c) rather than the Flutter tool's Swift Package Manager integration fixed in #192821.I have filed an upstream issue in
dart-lang/nativeto track and resolve this: dart-lang/native#3651. Once the fix lands upstream inhooks_runner, we will roll the updated package into Flutter.In the meantime, symlinking
.dart_toolto a local APFS/HFS+ volume is an effective temporary solution, as local macOS filesystems support advisory file locking.