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

Explorer doesn't update automatically #3200

Closed
Mystic8b opened this issue Jun 12, 2020 · 10 comments
Closed

Explorer doesn't update automatically #3200

Mystic8b opened this issue Jun 12, 2020 · 10 comments
Assignees
Labels
wsl Issue in vscode-remote WSL

Comments

@Mystic8b
Copy link

  • VSCode Version: 1.46.0
  • OS Version: 10.0.19041.0

Steps to Reproduce:

  1. Open a project via code . or something else
  2. Change branch on wsl

Does this issue occur when all extensions are disabled?: idn

@isidorn
Copy link

isidorn commented Jun 15, 2020

Sounds like file events missing on wsl, for now forwarding to @aeschli as he might know a duplicate of

@isidorn isidorn assigned aeschli and unassigned isidorn Jun 15, 2020
@aeschli aeschli transferred this issue from microsoft/vscode Jun 16, 2020
@aeschli
Copy link
Contributor

aeschli commented Jun 16, 2020

What's the location that you open? Is it on `/mnt/c....' ?
Is it WSL1 or WSL2?

Can you follow the steps here to see if the watcher works?
#2310 (comment)

@Mystic8b
Copy link
Author

Mystic8b commented Jun 16, 2020

  1. It's symlink to '/mnt/c...'
❯ ls -la | grep project
lrwxrwxrwx  1 mystic mystic    39 Apr 24 19:58 projects -> /mnt/c/Users/Mystic/Documents/Projects/
  1. WSL2
PS C:\Users\Mystic> wsl.exe --list --verbose
  NAME      STATE           VERSION
* Ubuntu    Running         2 
  1. I hope I did everything right, here is the log, including after changing the git branch:

image

Log:

[2020-06-16 13:38:07.450] [remoteagent] [info] 

*
* Visual Studio Code Server
*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license https://aka.ms/vscode-remote/license
*


[2020-06-16 13:38:07.450] [remoteagent] [info] Extension host agent started.
[2020-06-16 13:38:07.582] [remoteagent] [info] [::ffff:172.28.96.1][bcba0906][ManagementConnection] New connection established.
[2020-06-16 13:38:07.584] [remoteagent] [info] [::ffff:172.28.96.1][38c68618][ExtensionHostConnection] New connection established.
[2020-06-16 13:38:07.628] [remoteagent] [trace] Scanned user extensions: 10
[2020-06-16 13:38:07.644] [remoteagent] [trace] {"errno":-2,"code":"ENOENT","syscall":"open","path":"/home/mystic/.vscode-server/bin/a5d1cc28bb5da32ec67e86cc50f84c67cc690321/extensions/node_modules/package.json"}
[2020-06-16 13:38:07.698] [remoteagent] [trace] Scanned system extensions: 30
[2020-06-16 13:38:07.892] [remoteagent] [trace] Started scanning system extensions
[2020-06-16 13:38:07.892] [remoteagent] [trace] Started scanning user extensions
[2020-06-16 13:38:07.950] [remoteagent] [trace] Scanned user extensions: 10
[2020-06-16 13:38:07.979] [remoteagent] [trace] [File Watcher (chokidar)] Start watching with chockidar: /home/mystic/projects/mitv_composer, excludes: **/.git/objects/**,**/.git/subtree-cache/**,**/.hg/store/**,**/node_modules/*/**,/home/mystic/.vscode-server/extensions/**,**/*.asar, usePolling: false
[2020-06-16 13:38:07.980] [remoteagent] [trace] {"errno":-2,"code":"ENOENT","syscall":"open","path":"/home/mystic/.vscode-server/bin/a5d1cc28bb5da32ec67e86cc50f84c67cc690321/extensions/node_modules/package.json"}
[2020-06-16 13:38:07.988] [remoteagent] [trace] Scanned system extensions: 30
[2020-06-16 13:38:08.260] [remoteagent] [trace] getUnixShellEnvironment#raw �[01;30m ===============================================================
�[00;37m  Good afternoon !                                   �[01;36m IT Dept Ltd.
�[01;30m ===============================================================
�[00;37m  - Hostname      : mystic-officepc
�[00;37m  - IP Address    : 172.28.109.72 
�[00;37m  - Release       :�[38;5;209m Ubuntu 20.04 LTS
�[00;37m  - Kernel        : Linux 4.19.84-microsoft-standard x86_64
�[00;37m  - Server Time   : Tue Jun 16 13:38:07 MSK 2020
�[00;37m  - System load   : 0.05 / 20 processes running
�[00;37m  - System uptime : 6 days 15 hours 44 minutes
�[01;30m ===============================================================
51186bf36353{"USER":"mystic","VSCODE_WSL_EXT_LOCATION":"/mnt/c/Users/Mystic/.vscode/extensions/ms-vscode-remote.remote-wsl-0.44.3","SHLVL":"0","HOME":"/home/mystic","OLDPWD":"/mnt/c/Users/Mystic/.vscode/extensions/ms-vscode-remote.remote-wsl-0.44.3","WSL_DISTRO_NAME":"Ubuntu","LOGNAME":"mystic","WSL_INTEROP":"/run/WSL/18855_interop","NAME":"MYSTIC-OFFICEPC","_":"/home/mystic/.vscode-server/bin/a5d1cc28bb5da32ec67e86cc50f84c67cc690321/node","TERM":"xterm-256color","PATH":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files (x86)/Razer Chroma SDK/bin:/mnt/c/Program Files/Razer Chroma SDK/bin:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/Program Files (x86)/NetSarang/Xshell 6/:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/iCLS/:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/iCLS/:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Users/Mystic/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Mystic/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files (x86)/Common Files/Acronis/SnapAPI/:/mnt/c/WINDOWS/system32/config/systemprofile/AppData/Local/Microsoft/WindowsApps:/mnt/c/HashiCorp/Vagrant/bin:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/PowerShell/7/:/mnt/c/Program Files/Git/cmd:/mnt/c/Users/Mystic/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Mystic/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/Mystic/AppData/Local/Microsoft/WindowsApps","VSCODE_AGENT_FOLDER":"/home/mystic/.vscode-server","LANG":"C.UTF-8","SHELL":"/bin/zsh","PWD":"/mnt/c/Users/Mystic/.vscode/extensions/ms-vscode-remote.remote-wsl-0.44.3","HOSTTYPE":"x86_64","WSLENV":"VSCODE_WSL_EXT_LOCATION/up","VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH":"/home/mystic/.vscode-server/bin/a5d1cc28bb5da32ec67e86cc50f84c67cc690321/remote/node_modules","VSCODE_LOGS":"/home/mystic/.vscode-server/data/logs/20200616T133807","ELECTRON_RUN_AS_NODE":"1","ELECTRON_NO_ATTACH_CONSOLE":"1","SSH_AUTH_SOCK":"/tmp/ssh-iqUALqAMIW9E/agent.62","SSH_AGENT_PID":"63","ZSH":"/home/mystic/.oh-my-zsh","PAGER":"less","LESS":"-R","LSCOLORS":"Gxfxcxdxbxegedabagacad","LS_COLORS":"rs=0:no=00:mi=00:mh=00:ln=01;36:or=01;31:di=01;34:ow=04;01;34:st=34:tw=04;34:pi=01;33:so=01;33:do=01;33:bd=01;33:cd=01;33:su=01;35:sg=01;35:ca=01;35:ex=01;32:","P9K_SSH":"0"}51186bf36353

[2020-06-16 13:38:08.261] [remoteagent] [trace] getUnixShellEnvironment#result {"USER":"mystic","VSCODE_WSL_EXT_LOCATION":"/mnt/c/Users/Mystic/.vscode/extensions/ms-vscode-remote.remote-wsl-0.44.3","SHLVL":"0","HOME":"/home/mystic","OLDPWD":"/mnt/c/Users/Mystic/.vscode/extensions/ms-vscode-remote.remote-wsl-0.44.3","WSL_DISTRO_NAME":"Ubuntu","LOGNAME":"mystic","WSL_INTEROP":"/run/WSL/18855_interop","NAME":"MYSTIC-OFFICEPC","_":"/home/mystic/.vscode-server/bin/a5d1cc28bb5da32ec67e86cc50f84c67cc690321/node","TERM":"xterm-256color","PATH":"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files (x86)/Razer Chroma SDK/bin:/mnt/c/Program Files/Razer Chroma SDK/bin:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/Program Files (x86)/NetSarang/Xshell 6/:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/iCLS/:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/iCLS/:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Users/Mystic/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Mystic/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files (x86)/Common Files/Acronis/SnapAPI/:/mnt/c/WINDOWS/system32/config/systemprofile/AppData/Local/Microsoft/WindowsApps:/mnt/c/HashiCorp/Vagrant/bin:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/PowerShell/7/:/mnt/c/Program Files/Git/cmd:/mnt/c/Users/Mystic/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Mystic/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/Mystic/AppData/Local/Microsoft/WindowsApps","VSCODE_AGENT_FOLDER":"/home/mystic/.vscode-server","LANG":"C.UTF-8","SHELL":"/bin/zsh","PWD":"/mnt/c/Users/Mystic/.vscode/extensions/ms-vscode-remote.remote-wsl-0.44.3","HOSTTYPE":"x86_64","WSLENV":"VSCODE_WSL_EXT_LOCATION/up","VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH":"/home/mystic/.vscode-server/bin/a5d1cc28bb5da32ec67e86cc50f84c67cc690321/remote/node_modules","VSCODE_LOGS":"/home/mystic/.vscode-server/data/logs/20200616T133807","SSH_AUTH_SOCK":"/tmp/ssh-iqUALqAMIW9E/agent.62","SSH_AGENT_PID":"63","ZSH":"/home/mystic/.oh-my-zsh","PAGER":"less","LESS":"-R","LSCOLORS":"Gxfxcxdxbxegedabagacad","LS_COLORS":"rs=0:no=00:mi=00:mh=00:ln=01;36:or=01;31:di=01;34:ow=04;01;34:st=34:tw=04;34:pi=01;33:so=01;33:do=01;33:bd=01;33:cd=01;33:su=01;35:sg=01;35:ca=01;35:ex=01;32:","P9K_SSH":"0"}
[2020-06-16 13:38:08.271] [remoteagent] [info] [::ffff:172.28.96.1][38c68618][ExtensionHostConnection] <18982> Launched Extension Host Process.
[2020-06-16 13:38:09.997] [remoteagent] [trace] [File Watcher (chokidar)] [CHANGED] /home/mystic/projects/mitv_composer/.git/FETCH_HEAD
[2020-06-16 13:38:10.049] [remoteagent] [trace] [File Watcher (chokidar)]  >> normalized  [CHANGED] /home/mystic/projects/mitv_composer/.git/FETCH_HEAD
[2020-06-16 13:38:10.337] [remoteagent] [trace] Started scanning user extensions
[2020-06-16 13:38:10.347] [remoteagent] [trace] Scanned user extensions: 10
[2020-06-16 13:38:10.392] [remoteagent] [trace] Started scanning system extensions
[2020-06-16 13:38:10.393] [remoteagent] [trace] Started scanning user extensions
[2020-06-16 13:38:10.412] [remoteagent] [trace] Scanned user extensions: 10
[2020-06-16 13:38:10.426] [remoteagent] [trace] {"errno":-2,"code":"ENOENT","syscall":"open","path":"/home/mystic/.vscode-server/bin/a5d1cc28bb5da32ec67e86cc50f84c67cc690321/extensions/node_modules/package.json"}
[2020-06-16 13:38:10.430] [remoteagent] [trace] Scanned system extensions: 30
[2020-06-16 13:38:10.720] [remoteagent] [trace] Started scanning system extensions
[2020-06-16 13:38:10.720] [remoteagent] [trace] Started scanning user extensions
[2020-06-16 13:38:10.748] [remoteagent] [trace] Scanned user extensions: 10
[2020-06-16 13:38:10.785] [remoteagent] [trace] {"errno":-2,"code":"ENOENT","syscall":"open","path":"/home/mystic/.vscode-server/bin/a5d1cc28bb5da32ec67e86cc50f84c67cc690321/extensions/node_modules/package.json"}
[2020-06-16 13:38:10.798] [remoteagent] [trace] Scanned system extensions: 30
[2020-06-16 13:38:12.111] [remoteagent] [trace] [File Watcher (chokidar)] [CHANGED] /home/mystic/projects/mitv_composer/.git/FETCH_HEAD
[2020-06-16 13:38:12.163] [remoteagent] [trace] [File Watcher (chokidar)]  >> normalized  [CHANGED] /home/mystic/projects/mitv_composer/.git/FETCH_HEAD
[2020-06-16 13:38:57.771] [remoteagent] [trace] [File Watcher (chokidar)] [ADDED] /home/mystic/projects/mitv_composer/.git/index.lock
[2020-06-16 13:38:57.822] [remoteagent] [trace] [File Watcher (chokidar)]  >> normalized  [ADDED] /home/mystic/projects/mitv_composer/.git/index.lock
[2020-06-16 13:38:57.888] [remoteagent] [trace] [File Watcher (chokidar)] [CHANGED] /home/mystic/projects/mitv_composer/README.md
[2020-06-16 13:38:57.939] [remoteagent] [trace] [File Watcher (chokidar)]  >> normalized  [CHANGED] /home/mystic/projects/mitv_composer/README.md
[2020-06-16 13:38:57.989] [remoteagent] [trace] [File Watcher (chokidar)] [CHANGED] /home/mystic/projects/mitv_composer/.git/index.lock
[2020-06-16 13:38:57.998] [remoteagent] [trace] [File Watcher (chokidar)] [CHANGED] /home/mystic/projects/mitv_composer/.git/index
[2020-06-16 13:38:58.003] [remoteagent] [trace] [File Watcher (chokidar)] [ADDED] /home/mystic/projects/mitv_composer/.git/HEAD.lock
[2020-06-16 13:38:58.013] [remoteagent] [trace] [File Watcher (chokidar)] [CHANGED] /home/mystic/projects/mitv_composer/.git/HEAD.lock
[2020-06-16 13:38:58.021] [remoteagent] [trace] [File Watcher (chokidar)] [CHANGED] /home/mystic/projects/mitv_composer/.git/HEAD
[2020-06-16 13:38:58.072] [remoteagent] [trace] [File Watcher (chokidar)]  >> normalized  [CHANGED] /home/mystic/projects/mitv_composer/.git/index.lock
[2020-06-16 13:38:58.072] [remoteagent] [trace] [File Watcher (chokidar)]  >> normalized  [CHANGED] /home/mystic/projects/mitv_composer/.git/index
[2020-06-16 13:38:58.072] [remoteagent] [trace] [File Watcher (chokidar)]  >> normalized  [ADDED] /home/mystic/projects/mitv_composer/.git/HEAD.lock
[2020-06-16 13:38:58.072] [remoteagent] [trace] [File Watcher (chokidar)]  >> normalized  [CHANGED] /home/mystic/projects/mitv_composer/.git/HEAD
[2020-06-16 13:38:58.092] [remoteagent] [trace] [File Watcher (chokidar)] [DELETED] /home/mystic/projects/mitv_composer/.git/index.lock
[2020-06-16 13:38:58.092] [remoteagent] [trace] [File Watcher (chokidar)] [DELETED] /home/mystic/projects/mitv_composer/.git/HEAD.lock
[2020-06-16 13:38:58.143] [remoteagent] [trace] [File Watcher (chokidar)]  >> normalized  [DELETED] /home/mystic/projects/mitv_composer/.git/HEAD.lock
[2020-06-16 13:38:58.143] [remoteagent] [trace] [File Watcher (chokidar)]  >> normalized  [DELETED] /home/mystic/projects/mitv_composer/.git/index.lock
[2020-06-16 13:42:55.700] [remoteagent] [trace] [File Watcher (chokidar)] [CHANGED] /home/mystic/projects/mitv_composer/.git/FETCH_HEAD

I tried to open not the symlink, but the directory itself - the result is the same.

@aeschli
Copy link
Contributor

aeschli commented Jun 16, 2020

Thanks for the detailed info!
Is git running on the Windows side? (which git).

@Mystic8b
Copy link
Author

Mystic8b commented Jun 16, 2020

Is git running on the Windows side? (which git).

On wsl I have git for linux

❯ which git
/usr/bin/git
❯ git --version
git version 2.25.1

@egamma egamma added the wsl Issue in vscode-remote WSL label Jun 17, 2020
@dragove
Copy link

dragove commented Jul 2, 2020

On wsl2 without git has a similar problem.
steps to reproduce:

  1. open a folder in /mnt/d/Study/c/test using vscode.
  2. delete some files in d:\Study\c\test by windows exploerer.
  3. return to vscode but the file list is not update automatically.

QQ截图20200702112150

@aeschli
Copy link
Contributor

aeschli commented Jul 2, 2020

@dragondove That's microsoft/WSL#4739. File events caused by window tools, don't seem to be properly propagated to WSL.
I don't know if there are also file event issues when the change comes from a Linux tool.

I think the advice is to avoid the /mnt/ mounts and have your file in the WSL file system /home/...
That will also give you a far better performance.

@Mystic8b
Copy link
Author

Mystic8b commented Jul 2, 2020

In any case, this is a problem and needs to be solved. Many people use symlink for their projects. Otherwise, it will not be much better than a regular virtual machine.

@dragove
Copy link

dragove commented Jul 2, 2020

@aeschli I see. Using linux tools like touch/rm performs properly. Files which are not mounted also performs properly.

@aeschli
Copy link
Contributor

aeschli commented Nov 10, 2020

duplicate of #3959

@aeschli aeschli closed this as completed Nov 10, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wsl Issue in vscode-remote WSL
Projects
None yet
Development

No branches or pull requests

5 participants