-
Notifications
You must be signed in to change notification settings - Fork 29k
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
File changes not reported after update to 1.91.1 #222098
Comments
This appears to be related to issue #221378. |
major +1 from me, this ends up being a major blocker as the source control status and edited files used to update on window refocus, file save, and other scenarios, but now requires a manual click of the refresh button to get latest data. like OP said, it seems to happen sporadically and seems to work for a period of time before it gets into a bad state. |
Same issue here on the same version, have to manually refresh the source control for every change to be reflected properly Renaming of files also did not prompt me to fix imports as it normally does, not sure if that is related |
If you are able to reproduce this issue consistently, could you please follow this wiki and share the logs for the file watcher? |
I seem to have no output from file watcher (tried with "File Watcher" as well), let me know if I am doing something wrong @lszomoru FileWatcherDebug.mov |
This issue could originate from a problem with file watching. Let me explain how file watching works in VSCode first and then provide some details how to get more logging data from how file watching behaves in your case. Synopsis
If you are connected to a remote (SSH, WSL, Docker), the file watcher will run within the target file system. As such, even though you maybe on Windows where VSCode runs, if the remote is Linux, the file watcher will run in the Linux environment. Platforms
Specifically on Linux, watching a large folder recursively can result in VSCode consuming too many file handles. If that is the case, you will see a warning notification with instructions how to solve that. Limitations
Settings Logging (local)
Logging (remote)
|
I just realized that the guide that you send @bpasero sightly differs from the wiki guide, by the looks of it yours is telling me to look in the output tab for it. But I don't have any option to select it there: |
Hi all, I had the same issue. A moment ago I decided to install an older version of VS Code (version 1.90) from this site Then I retried to update VSCode just to see if there are any differences in File Watcher output between 1.90 and 1.91, but after VSCode restart there was no File Watcher option in the dropdown menu of output view and file watching stopped to work again. Then I found out that I had some extensions enabled. So I disabled them and file watching started working again. I discovered, that it was ESLint in combination with the new VS Code that was probably causing the trouble in my case. However, after a couple of times of restarting VSCode with extensions either disabled or enabled, it currently works with enabled extensions and I can't reproduce the issue anymore. Do you guys also tried to run VS Code with disabled extensions? My current configuration: Version: 1.91.1 |
Hey I have the same issue. I followed @bpasero steps. Sharing my filewatcher screenshot |
Does it help at all to set |
That seems like it did the trick for me! 🙏 Both the source control and the file renaming now works for me FYI I am heading off to vacation for two weeks so I will be unable to help further debugging this, but thanks for looking into it and providing a fix! |
works me. Thanks 🙏 |
Can people that are impacted share steps how to reproduce, specifically what workspace they open and which extensions are involved? |
I think it might be related to using |
@liamdawson thats a good finding, would you be able to share a repro with me that I can follow along to test this step by step? Are others also using a setup like that? |
Hi @bpasero, I also use pnpm. However, |
@fansek only for the workspace watcher VS Code installs, however with With Again, a repro would be great on a repo I can try with! |
An interesting discussion. |
There should always be a |
Ok, thanks, @bpasero for explaining. I checked manually for such a process and couldn't find any. But I was experimenting only for a very short time. I may want to double check it again since there was some FileWatcher output, so something was running. |
Tested again, not seen any fileWatcher process.😞 I did:
Sample output:
|
@slavos1 you can use VS Codes built in process explorer (from the help menu) to spot it: Note: if you are connected to a remote machine, the file watcher would run inside the remote. |
@bpasero I ran into it a few more times, but muscle memory kicked in too quickly and I restarted the TS server each time 😅 I just created another file in the project mentioned above, in |
That log message is actually fine, we have some logic to handle paths either missing or being added or deleted while watching. It should not result in a 100% CPU spike. |
@bpasero 👍. As it happens, I'm currently experiencing a 100% spike in the file watcher process (no output from the file watcher though). Is there something I can do to help debug this? |
A reliable repro with code I can clone myself. |
I'm seeing the same issue as @cpojer since likely 1.92.0. I have no idea what triggers it so far. I'll try to observe when it starts to happen. |
@bpasero I'm also running into this issue on 1.92.1 (Universal) I found that there was a |
VS Code became unusable for me. The merge conflict editor is showing me outdated file contents, complains about overwriting changes then (which makes sense as on disk the contents are different than what VS Code shows me). The source control view needs manual refreshes all the time. I need to restart the TS server every time I create a new file, move a file or delete a file for it to pick up these changes. Auto-import is broken very often due to that. I didn't manage to find out when exactly it starts yet. Couldn't find anything interesting in VS Code logs. I tried disabling letting TS use VS Code's file watcher ( I can only point out that this issue doesn't appear immediately. I have to use VS Code actively for maybe 30 minutes or so until things start to break. Didn't manage to reproduce it while not doing real work so it's difficult to investigate. |
@levrik I'm having a similar experience. I find the git integration unreliable. I've turned off the commit graph visualization to see if it helps. I haven't found what triggers this yet. |
@morganick, please update to the newly released version (1.93) as the source graph was moved out of the main "Source Control" view. |
I've been running into this issue frequently along with several co-workers. As mentioned above, at some point during my normal workflow the fileWatcher process hits 100 CPU in the VSCode Process Explorer and further git/file changes are no longer reflected in VSCode until you reload the window. After turning on the file watcher logging mentioned it seems to be related to pnpm and the typescript watcher. Whenever the issue happens the console is spammed with symlink renaming logs from inside the node_module folder and deleting/restoring backups. I'll try and capture it happening live since it happens frequently (about every 10 minutes or so) but there doesn't seem to be a specific trigger. Usually it happens when switching branches (which causes a lot of file updates at once) but this latest time I had a single file open, all logs cleared, and randomly while scrolling the file the logs went crazy and the CPU went to 100 and stayed there. I'll continue to debug and report back with more info, specific logs. |
@rickbrenn do you have steps for me to reproduce, i.e. is the repo open source? |
@rickbrenn I guess that's what is happening for me as well. Happens most of the time when switching branches, doing interactive rebases or something similar which tends to touch a lot of files. Also using PNPM. Sadly I couldn't find anything useful in logs so far but I also didn't turn on logging for the file watcher logging as you mentioned. I'll try that as well. |
It just happened again for me. File watcher logs are spammed (log lines are sometimes not even 1ms apart) by things like this:
It seems like it tries to re-watch every single file it knows about. I'm seeing a lot of After spamming the logs, it goes into 100% CPU usage deadlock. No more logs from file watcher at this point. |
@bpasero Unfortunately it's not open source so I cannot share but I might be able to replicate a repo with similar attributes for testing/reproducing the issue. It is a large monorepo with a lot of dependencies using pnpm which I assume is the factors needed for reproducing the issue since it seems to be because of the watcher watching/updating for every dependency in the node_modules folder. I am able to confirm that the When the issue happens I see tons of logs in the console like this one:
and this one:
Then in the filewatcher output panel there are tons of logs like this one:
where it seems to be changing all the symbolic links from the individual monorepo package's node_modules to the root node_modules. |
Additionally something I noticed is that when running the 'reload window' command to fix the issue, it can occur during reload which I then have to reload the window again until it doesn't. I assume that is because when it starts up the watcher it has to start watching all of those files in node_modules which can trigger it. |
Just summarizing, the evidence so far points at the issue being with pnpm, likely with how it links and lays out |
ℹ I would appreciate if people impacted here could try out our latest insiders build (commit Steps:
Happy to hear back how it goes 🙏 |
This seems to work well. Haven't tested a lot but it works well. |
Does this issue occur when all extensions are disabled?: Yes
Version: 1.91.1 (user setup)
Commit: f1e16e1
Date: 2024-07-09T22:06:49.809Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.19045
Extensions:
Issues are still present with only the WSL remote extension enabled.
I don't know the cause of this and can't provide any reproduction steps but since updating today to the latest version of vscode the source control git integration has become buggy and unresponsive in several ways.
I don't know if this is a just me issue as I can't see any other issues about this in github.
The text was updated successfully, but these errors were encountered: