-
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
Running on flutter-tester: "The requested operation cannot be performed on a file with a user-mapped section open" on Windows #17833
Comments
@scheglov Have you seen this one? I thought it was intermittent, but right now I'm seeing it 100% of the time (both locally on my machine and on Travis). |
@aam, Danny is seeing this frequently on windows. Perhaps a race condition with access to the dill file within flutter_tools? |
Isn't this related to the question asked on this PR flutter/flutter-intellij#2239 (comment) ? |
Yep, the discussion in that PR seems to describe the same issue. |
I've got a some reasonable end-to-end hot reload tests working in Dart Code now (launches an app, adds breakpoints, hot reloads a few times, ensures reloads are working and we're still hitting breakpoints) but this is blocking me from running them on Windows CI (I have to switch to my PC and run them on against a real device for testing). It would be tremendously useful having these tests running all the time so if there's anything I could to do assist with/investigate/workaround this, let me know! |
There's a failing test in |
@aam Do you know what the status of this is (or there's a workaround)? It's not clear from the discussion in the PR linked above if we know what the fix will be. |
The .dill-file being locked for the duration of flutter run seems to be by design per comment I linked above. Am I right reading this as we are trying to update .dill-file while flutter is running? What are we trying to achieve with this? |
I think the case mentioned by @scheglov in the PR (for preview) may be more complicated, but in this case I'm doing nothing more than trying to run the app on |
I see, I'm not familiar with what is involved in running on flutter-tester device. @scheglov who put it together might be the best person to comment on that. |
I saw this problem on Windows as well. |
I just realized that this problem is caused by the fact that dart vm was requested to load exact same kernel file, that compiler is trying to update - same /tmp/flutter_hot_reload_test_app.*/build/app.dill goes to the vm and incremental compiler overwrites it as it initializes itself to serve hot reload. This is rather dangerous, on any platform. It seems good that Windows actually prevents you from doing that. So the issue seems to be with how |
Aha, makes sense. Does the fix need to go into the |
|
Woo! Thanks for this - looks obvious now seeing the fix! I'll give this a test and hopefully unskip the integration tests shortly. Thanks! |
No worries. From what I've seen we do need to fix path/uri handling in VM service layer for the tests to pass - currently file path that is passed on reload request gets interpreted as unix(rather than windows) file path and that causes issues in VM. |
Is there any issue open about them? I can try the tests and update the comments with the new issues to make it easier to track. I know about #18441 but that one only affects one test. There are some that don't reload at all, so if the issue is only during reload, maybe we can still unskip them. I'll do some testing. |
I guess this is the issue you're referring to:
LMK if you want me to open an issue for this (I can't see an existing one). |
Sure, if you have time to open an issue, that would be handy. Thanks. |
I've opened #21168. If you need any more specific info, let me know! |
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 |
When trying to run with
flutter-tester
on Windows, I get this error (seems like a file locking issue?):Flutter keeps running (doesn't quit), but pressing
r
seems to just hang "initialising hot reload" so presumably the app is not running.The text was updated successfully, but these errors were encountered: