Skip to content
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

Git extension does not detect changes #14529

Closed
Tracked by #14565
tsmaeder opened this issue Nov 26, 2024 · 6 comments · Fixed by #14545
Closed
Tracked by #14565

Git extension does not detect changes #14529

tsmaeder opened this issue Nov 26, 2024 · 6 comments · Fixed by #14545

Comments

@tsmaeder
Copy link
Contributor

Bug Description:

The git "Changes" view remains empty when I change a file in an editor.

Steps to Reproduce:

  1. Open Theia IDE on the Theia source code
  2. Open a file in the editor, e.g. 'npmignore' and add a line at the end
  3. Save the file
  4. Observe: the git "changes" view remains empty. When I hit "refresh" in the "GIT" view toolbar, the change appears.

Additional Information

  • Operating System: Window 11
  • Theia Version: 1.55.0 Theia IDE
@tsmaeder
Copy link
Contributor Author

I've also seen some failed updates in the file explorer as well. So my first instinct would be to blame the replaced file watcher infrastructure.

@tsmaeder
Copy link
Contributor Author

Unfortunately, I can't reproduce this in the electron example built from source.

@tsmaeder
Copy link
Contributor Author

I restarted my machine and the file watching works again in Theia IDE 1.55.0. There seems to be some system-level code getting stuck somehow.

@safisa
Copy link
Contributor

safisa commented Nov 27, 2024

@tsmaeder I had similar issues with Theia Web 1.55, both in the file explorer and in the Git (source control) tree. In some cases, I had to click the tree's refresh icon to see the new/deleted file changes. Reloading the page fixes the issue.

Unfortunately, I don't have specific steps to reproduce this issue.

@tsmaeder
Copy link
Contributor Author

A little update:

First I thought we were running into a case where ReadDirectoryChangesW was running into ERROR_NOTIFY_ENUM_DIR indicating there are too many changes. But I was not seeing that in the log.

I noticed parcel-bundler/watcher#187 and update to the 2.5.0 version of @parcel/watcher. Now I'm getting the following error:

2024-11-27T15:33:34.326Z root ERROR [parcel-watcher: 23356] Watcher service error on "C:\Users\thomas\code\theia\theia5\node_modules\@discoveryjs\json-ext": [Error: Failed to read changes]

in the log, but if we were getting ERROR_NOTIFY_ENUM_DIR, the error message should be ""Buffer overflow. Some events may have been lost.". So I suspect before we were running into the deadlock from the mentioned issue and now we run into a different error. Needs more digging.

@tsmaeder
Copy link
Contributor Author

I had an editor open on the file mentioned in the above error log and I seem to recall that the watcher throws an error when deleting a file that is being watched. That makes sense. Otherwise I'm optimistic that simple version update fixes the symptoms described in this issue.
The fact that we're not handling the case of ERROR_NOTIFY_ENUM_DIR is still a problem, but might not be causing the current issue. This needs more testing, though.

tsmaeder added a commit to tsmaeder/theia that referenced this issue Nov 27, 2024
This should fix eclipse-theia#14529

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
tsmaeder added a commit that referenced this issue Nov 28, 2024
This should fix #14529

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
tsmaeder added a commit that referenced this issue Dec 2, 2024
This should fix #14529

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants