-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
No results found when searching across all file managed by OneDrive #35433
Comments
Have you tried any other editors? Do they show results? |
Maybe related to #27285 Can you check for errors in the developer tools (Help > Toggle developer tools) and the Search output pane: |
I have exactly the same problem on
When I open folder When I open Only ASCII characters are used in my I haven't find anything relevant in Developer Tools Console. EDIT!: In Search output pane I found: |
Any special permissions on the Onedrive folder? Are you running Code as administrator? Are the Onedrive files actually on disk? |
Thanks for hints. Finally I resolved the problem by turning off Files On-Demand OneDrive feature. It seems that ripgrep doesn't work with Files On-Demand feature even if all folders are selected in OneDrive Settings and Always keep on this device is checked in File Explorer. In this case directories and files still have special link mode (reparse point attribute with no target) which ripgrep isn't able to process. Thanks for great editor! |
Glad you found a workaround. Do you know whether other editors work with this? |
I tried Notepad++ and NetBeans and both are able to search OneDrive files when Files On-Demand feature is turned on. I also tried to add file which was only available online (using OneDrive web app) and after successful search in Notepad++ file had status Available on this device (was downloaded during the search). |
Ok, I'll have to find out how they prompt windows to download those files. |
I don't think these editors do anything special for OneDrive files. I would guess they just open the file as usual and Windows downloads it. I think we could try to ask ripgrep to support Files On-Demand. It has special handling for links so it could also handle these special "links" too. |
The original report from @ericdching said that this happened even when all files are on the local device. I haven't had a response from him on questions above, and there are multiple reports of this behavior for off-device files, so continuing to use this issue for OneDrive issues in general. |
Ticking 'always keep on this device' downloads all the files yet Visual Studio Code still cannot search the contents. I tried closing OneDrive and putting the same files/folder in 'C:\Users\aaron\OneDrive' and 'C:\Users\aaron'. The search works in both locations but, when you reopen OneDrive, the search stops working on the OneDrive location even though the files are still there. Windows indexes and searches within the files fine so the issue is with the way Visual Studio Code is searching within the file contents in conjunction with OneDrive. As I say, the files are definitely still on the hard drive so there is a problem with Visual Studio Code. |
Unsuccessful search:
Successful search:
|
Strange. I haven't been able to repro this. Will keep trying... |
Same issue here. Identical symptoms to above. Is there anything I can provide/do to help track this down? Search output: Should note that the entire directory is already on-disk. |
Did some further digging on this. When ripgrep is pointed at a directory that is in OneDrive with Files on Demand turned on, it fails as though the directory doesn't exist. If pointed at a specific file within that same directory, it's able to work just fine. This is exactly the same behaviour as here: This will have to be fixed by ripgrep. I'll open a ticket up there soon. |
@kevbry Great, I hope this gets fixed soon; OneDrive is an integral part of Windows these days. |
I can repro it now after installing another Windows update. I was already on the latest Windows release, but I didn't have the latest OneDrive update for some reason. |
Hi @roblourens I have a live repro of this. All of the files in my "OneDrive - Microsoft" folder are downloaded locally to my machine. I can search my directory using Sublime. When I search using code, the Search Output Window shows this: rg --hidden --heading --line-number --color 'ansi' --colors 'path:none' --colors 'line:none' --colors 'match:fg:red' --colors 'match:style:nobold' --ignore-case -g '!/Users/jschwarz/OneDrive - Microsoft/workingdirs//.git' -g '!/Users/jschwarz/OneDrive - Microsoft/workingdirs//.svn' -g '!/Users/jschwarz/OneDrive - Microsoft/workingdirs//.hg' -g '!/Users/jschwarz/OneDrive - Microsoft/workingdirs//CVS' -g '!/Users/jschwarz/OneDrive - Microsoft/workingdirs//.DS_Store' -g '!/Users/jschwarz/OneDrive - Microsoft/workingdirs/.dmp' -g '!/Users/jschwarz/OneDrive - Microsoft/workingdirs/.dll' -g '!/Users/jschwarz/OneDrive - Microsoft/workingdirs/.obf' -g '!/Users/jschwarz/OneDrive - Microsoft/workingdirs/.mp4' -g '!/Users/jschwarz/OneDrive - Microsoft/workingdirs//node_modules' -g '!/Users/jschwarz/OneDrive - Microsoft/workingdirs/**/bower_components' --max-filesize '17179869184' --no-ignore --follow --fixed-strings -- 'test' 'c:\Users\jschwarz\OneDrive - Microsoft\workingdirs'
|
This is still very much an issue in the current version of VS Code. Has there been any progress on it? It looks like there hasn't been much activity on the upstream bugs... |
FYI, got the latest stable version of VSCode, still repros 100% for me. Would be great to please get an update on when this might be fixed so that I can start using VSCode again. Version 1.19.2 |
The upstream Rust issue is not seeing any progress, so I hope to come up with a workaround by the end of the month. I don't think it's been called out in this issue yet, but this can be worked around by disabling ripgrep with |
Thank you @roblourens - That seems to have done the trick for me :-) |
This will be fixed when we start building Insiders again. |
I updated VS Code to v1.21 and the most important feature of every editor (search) still doesn't work. Even after 9 months no one can search and work properly on projects backed up by OneDrive :( |
This was actually pulled from the 1.21 release. Going into 1.22 |
I verified that the following works:
|
I don't have the current release, so can't compare.
Steps to Reproduce:
Reproduces without extensions: Yes
The text was updated successfully, but these errors were encountered: