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

No results found when searching across all file managed by OneDrive #35433

Closed
ericdching opened this issue Sep 30, 2017 · 28 comments
Closed

No results found when searching across all file managed by OneDrive #35433

ericdching opened this issue Sep 30, 2017 · 28 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug search Search widget and operation issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded
Milestone

Comments

@ericdching
Copy link

ericdching commented Sep 30, 2017

  • VSCode Version: 1.16.1
  • OS Version: Windows 10 (insiders preview) 10.0.16299 Build 16299.
    I don't have the current release, so can't compare.

Steps to Reproduce:

  1. Open a OneDrive folder in VSCode. Note, all files have a green check status and are 'Available on this device'
  2. Ctrl+Shift+F to search across all files
  3. Enter a string that should produce results and press Enter
  4. No results found
  5. Copy the directory outside OneDrive. Repeat steps 1-3 and results are returned

Reproduces without extensions: Yes

@vscodebot vscodebot bot added the search Search widget and operation issues label Sep 30, 2017
@roblourens
Copy link
Member

Have you tried any other editors? Do they show results?

@roblourens
Copy link
Member

roblourens commented Oct 1, 2017

Maybe related to #27285

Can you check for errors in the developer tools (Help > Toggle developer tools) and the Search output pane:

image

@vojtechhabarta
Copy link

vojtechhabarta commented Oct 15, 2017

I have exactly the same problem on

  • VSCode Version: Code 1.17.1 (1e9d365, 2017-10-10T14:24:50.851Z)
  • OS Version: Windows_NT x64 10.0.16299

When I open folder C:\Users\<USER>\OneDrive\Documents\<FOLDER> then Search (Ctrl+Shift+F) and also Go to File (Ctrl+P) don't work.

When I open C:\Users\<USER>\Downloads everything works as expected.

Only ASCII characters are used in my <USER> and <FOLDER> names.

I haven't find anything relevant in Developer Tools Console.

EDIT!: In Search output pane I found:
c:\Users\<USER>\OneDrive\Documents\<FOLDER>: Access is denied. (os error 5)

@roblourens
Copy link
Member

roblourens commented Oct 16, 2017

Any special permissions on the Onedrive folder? Are you running Code as administrator? Are the Onedrive files actually on disk?

@vojtechhabarta
Copy link

Thanks for hints. Finally I resolved the problem by turning off Files On-Demand OneDrive feature.

files-on-demand

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.

menu

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!

@roblourens
Copy link
Member

Glad you found a workaround. Do you know whether other editors work with this?

@roblourens roblourens added the info-needed Issue requires more information from poster label Oct 17, 2017
@vojtechhabarta
Copy link

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).

@roblourens
Copy link
Member

Ok, I'll have to find out how they prompt windows to download those files.

@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Oct 18, 2017
@vojtechhabarta
Copy link

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.

@roblourens
Copy link
Member

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.

@roblourens roblourens changed the title No results found when searching across all file managed by OneDrive (all files on device) No results found when searching across all file managed by OneDrive Oct 24, 2017
@aaronsace
Copy link

aaronsace commented Oct 25, 2017

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.

@roblourens
Copy link
Member

Are there any errors in the search output pane?

image

@aaronsace
Copy link

aaronsace commented Oct 25, 2017

Unsuccessful search:

rg --hidden --heading --line-number --color 'ansi' --colors 'path:none' --colors 'line:none' --colors 'match:fg:red' --colors 'match:style:nobold' --ignore-case --max-filesize '17179869184' --no-ignore --follow --fixed-strings -- 'test' 'c:\Users\aaron\OneDrive\MultiPoolMiner' 'c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\parts\welcome\page\electron-browser\vs_code_welcome_page'
 - cwd: c:/
 - Sibling clauses: {}
c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\parts\welcome\page\electron-browser\vs_code_welcome_page: The system cannot find the path specified. (os error 3)
No files were searched, which means ripgrep probably applied a filter you didn't expect. Try running again with --debug.

Successful search:

rg --hidden --heading --line-number --color 'ansi' --colors 'path:none' --colors 'line:none' --colors 'match:fg:red' --colors 'match:style:nobold' --ignore-case --max-filesize '17179869184' --no-ignore --follow --fixed-strings -- 'test' 'c:\Users\aaron\MultiPoolMiner'
 - cwd: c:/
 - Sibling clauses: {}

@roblourens
Copy link
Member

but, when you reopen OneDrive, the search stops working on the OneDrive location even though the files are still there.

Strange. I haven't been able to repro this. Will keep trying...

@kevbry
Copy link

kevbry commented Dec 1, 2017

Same issue here. Identical symptoms to above. Is there anything I can provide/do to help track this down?

Search output:
c:\Users\me\OneDrive\Documents\Visual Studio 2017\Projects\test: Access is denied. (os error 5)

Should note that the entire directory is already on-disk.

@kevbry
Copy link

kevbry commented Dec 3, 2017

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:
#27285

This will have to be fixed by ripgrep. I'll open a ticket up there soon.

@aaronsace
Copy link

aaronsace commented Dec 3, 2017

@kevbry Great, I hope this gets fixed soon; OneDrive is an integral part of Windows these days.

@roblourens
Copy link
Member

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.

@roblourens roblourens added this to the December 2017 milestone Dec 4, 2017
@julenka
Copy link

julenka commented Dec 4, 2017

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'

  • cwd: c:/
  • Sibling clauses: {}
    c:\Users\jschwarz\OneDrive - Microsoft\workingdirs: Access is denied. (os error 5)

@tamasys
Copy link

tamasys commented Jan 2, 2018

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...

@julenka
Copy link

julenka commented Jan 16, 2018

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
Commit 490ef76
Date 2018-01-10T15:55:03.538Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

@roblourens
Copy link
Member

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 "search.useRipgrep": false.

@SQLDBAWithABeard
Copy link

Thank you @roblourens - That seems to have done the trick for me :-)

@roblourens
Copy link
Member

This will be fixed when we start building Insiders again.

@patrik-martinko
Copy link

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 :(

@roblourens roblourens removed the verified Verification succeeded label Mar 12, 2018
@roblourens roblourens modified the milestones: February 2018, March 2018 Mar 12, 2018
@roblourens roblourens reopened this Mar 12, 2018
@roblourens
Copy link
Member

This was actually pulled from the 1.21 release.

Going into 1.22

@dbaeumer
Copy link
Member

I verified that the following works:

  • when the files are already available on my machine
  • when the files are not available on my machine. In this case the files are downloaded after the search.

@dbaeumer dbaeumer added the verified Verification succeeded label Mar 29, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug search Search widget and operation issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests