-
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
Deletion failed, (OS Error: The system cannot find the path specified. , errno = 3) #144140
Comments
Hello @nixos-s |
Already tried dint work You can see my comment on it |
Thanks for your response @nixos-s. |
Addional info Flutter is in D: Drive
|
assigning to myself to investigate where in the stack this is coming from |
I'm fairly sure that this is an upstream pub issue, so I filed: dart-lang/pub#4155. However, I will leave this issue open for discoverability. |
This is mysterious to me. https://github.com/dart-lang/pub/blob/f5fa122215923a8216335842ba41c3d820a8d4b7/lib/src/system_cache.dart#L305 @nixos-s could you try running Could you also try running |
Yes
|
To note i have downgraded to flutter 3.16.9 It still faces same issues as 3.19.0 Logs are from 3.16.9 |
Thanks for the added details. Hmm, I'm dumbstruck by this behavior. No clue what could be happening - the code does check for the dir's existence up front - and the error message says "path not found". We have tests running this code on Windows in CI. @jonasfj do you have any ideas? |
@sigurdm are we handling It sounds to me like the @nixos-s for context, the This is why even if you installed flutter on Does the |
Yes the dir is there, I have to delete it manually to get rid of it |
@nixos-s does the issue reproduce after you've deleted it manually? Did it just get in a weird state or what? Are you owner of the directory, have permissions to delete it? things like that. |
Yes I am an admin I have retried with dir being present And doing pub get and the cache clean after that still leads to same error I have also tried with admin privileges in terminal |
Just to narrow the possibilities a bit. Could you please run this dart script:
And report the output? |
|
And it deleted the directory? |
|
With help from chatgpt i tried out a few thing
Trying via Cmd Works
|
you need how to fix this issues chack this video is 1 min the video : https://youtu.be/MbcSYiGthOM |
chack this video to get fixed 👍 |
i had already tried it this doesn't work |
From this it looks to me like a dart:io issue. The directory is clearly there, but @sortie do you have any insights here? |
My best bet is that Or perhaps there's other conditions in there that might bring up these error codes in a surprising manner. You gotta remember there's lots of background activity on Windows that may keep paths alive or act on them in the background. The path in the exception is added on an outer layer, so it doesn't actually have the relevant failing nested path in the error message. You should audit the dart:io code carefully to spot all the potential cases that can happen, I didn't study it super closely at this time. The issue could be something else. |
Steps to reproduce
run flutter pub cache clean
Expected results
success
Actual results
flutter pub cache clean
This will remove everything inside C:\Users\Nixos\AppData\Local\Pub\Cache.
You will have to run
flutter pub get
again in each project.Are you sure? (y/N)? y
Removing pub cache directory C:\Users\Nixos\AppData\Local\Pub\Cache.
Deletion failed, path = 'C:\Users\Nixos\AppData\Local\Pub\Cache' (OS Error: The system cannot find the path specified.
, errno = 3)
Flutter Doctor output
flutter doctor -v
The text was updated successfully, but these errors were encountered: