-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flutter upgrade
fails on Windows/ARM because of locked cache folder
#114753
Comments
Labeling this for further investigation as I'm unable to verify this locally at the moment. |
@loic-sharma or @cbracken, can one of you verify this on a real WIndows ARM machine? I wonder if this is related to:
|
FWIW, I'm able to reproduce it on a Volterra dev kit, which seems to rule out # 2 from the above. C:\src\flutter>bin\flutter upgrade
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine ...
Expanding downloaded archive...
Building flutter tool...
Running pub upgrade...
Upgrading Flutter to 3.5.0-12.0.pre.165 from 3.5.0-12.0.pre.101 in C:\src\flutter...
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 004a305166d57756cf7c5f6255dd09a5cf43479d...
Rename-Item: C:\src\flutter\bin\internal\update_dart_sdk.ps1:52
Line |
52 | Rename-Item $dartSdkPath "$oldDartSdkPrefix$oldDartSdkSuffix"
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Access to the path 'C:\src\flutter\bin\cache\dart-sdk' is denied. Machine is left in this state; let me know if there are any diagnostics you'd like me to run? |
Oh wow, very interesting. And I can't even think of any diagnostics to run. |
FWIW messing around with this a bit |
FYI: This happens on all flavors of flutter, master/main, beta and stable. Since it is at least one year since someone commented here, are any working on it? |
I encountered this issue. What i did is to disconnect the running app from emulator or device before executing |
For now I never upgrade or changes channel when AS is started. I upgrade/change channel from my flutter program folder in powershell. It doesn't fail when using this method. |
Steps to Reproduce
Running Flutter on Windows ARM,
flutter upgrade
on themaster
channel doesn't work because the cache directory gets locked during the install process.Logs
This is from a freshly-rebooted machine which has not run VSCode, Flutter or Dart since the reboot.
Expected results
Flutter should obviously be able to delete the folder. For some reason, rename fails but delete succeeds. I wonder if we need a fallback option where if the rename fails, we just blow the cache away?
Further details
The machine I'm using is a MacBook Air M2 with Parallels Desktop 18, hosting a Windows 11 22H2 ARM-based VM. I've observed this for some months, so it's a recent regression. Flutter was installed originally with a
git clone
from the flutter/flutter repo. Process Explorer shows no exclusive handles held on files in the cache folder.The text was updated successfully, but these errors were encountered: