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

Cannot open a folder under my OneDrive folder #27285

Closed
DanTravison opened this issue May 25, 2017 · 65 comments
Closed

Cannot open a folder under my OneDrive folder #27285

DanTravison opened this issue May 25, 2017 · 65 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug electron Issues and items related to Electron upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded

Comments

@DanTravison
Copy link

I can use Code to open individual files under my OneDrive folder but attempts to open folders does nothing. Attempts to open the OneDrive folder directly does not result in an open folder but creates a new Onedrive file instead.

  • VSCode Version: 1.12.2
  • OS Version:10.0.16204 Pro and 10.0.16202 Server

Steps to Reproduce:
There are 3 repos:
Repro 1:

  1. Navigate to a folder under OneDrive from a command prompt.
  2. Launch code via 'code .'
  3. Code launches but no folder is open.

Repro 2:

  1. Launch Code
    2: Select File/Open Folder
    3: Navigate to a folder under OneDrive and open it.
    4: No folder is opened.

Repro 3:
1: Launch Code
2: Select File/Open Folder
3: Navigate to the Onedrive folder and select it.
4: No folder is opened but an empty 'OneDrive' file is created in the editor.
NOTE: The same occurs when running 'code .' from the OneDrive folder, an empty Onedrive file is created in the editor

@roblourens
Copy link
Member

roblourens commented May 25, 2017

Does it work normally with other editors?

@bpasero
Copy link
Member

bpasero commented May 25, 2017

Please see if you can find any logged output that could help us find the source of the issue:

  • run code --verbose from the command line and attach the output
  • in Code select Help | Toggle Developer Tools and select the Console
  • attach any output you see in the Console you can find

Thanks!

@bpasero bpasero added the info-needed Issue requires more information from poster label May 25, 2017
@bpasero bpasero added this to the Backlog milestone May 25, 2017
@dantraMSFT
Copy link

dantraMSFT commented May 25, 2017

I'm seeing a series of lstat errors in the console. Here are the details...

[uncaught exception]: Error: EINVAL: invalid argument, lstat 'D:\OneDrive'

Error: EINVAL: invalid argument, lstat 'D:\OneDrive'
onError @ index.js:40
(anonymous) @ index.js:109
emitOne @ events.js:96
emit @ events.js:188
window.onerror @ C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\renderer\init.js:124
i.globals.onerror @ errorTelemetry.ts:64
index.js:43Error: EINVAL: invalid argument, lstat 'D:\OneDrive'

Error: EINVAL: invalid argument, lstat 'D:\OneDrive'
at file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28:22576
onError @ index.js:43
(anonymous) @ index.js:109
emitOne @ events.js:96
emit @ events.js:188
window.onerror @ C:\Program Files (x86)\Microsoft VS Code\resources\electron.asar\renderer\init.js:124
i.globals.onerror @ errorTelemetry.ts:64
errors.ts:33Uncaught Error: EINVAL: invalid argument, lstat 'D:\OneDrive'

Error: EINVAL: invalid argument, lstat 'D:\OneDrive'
at file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/electron-browser/workbench.main.js:28:22576

@bpasero
Copy link
Member

bpasero commented Jun 11, 2017

@dantraMSFT I just tried to reproduce with my OneDrive folder and could not. Would you be willing to try to reproduce this running out of sources? As outlined here: https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run-from-source

@bpasero
Copy link
Member

bpasero commented Jun 15, 2017

@DanTravison @dantraMSFT @chenxizhang @kevin12314 can you please try again with our insider build from today and report back any errors you see?

You can give our preview releases a try from: http://code.visualstudio.com/Download#insiders

@dantraMSFT
Copy link

Doing so now.

@yzhang-gh
Copy link
Contributor

yzhang-gh commented Jun 16, 2017

Same here (cannot open folder in OneDrive, will open a new file with the folder name)
(cannot even open a file, will just open a new empty file. Notepad works well)

No error in console. But there is a alert popup "Path doesn't exist on disk" when opening file/folder by Open File/Folder menus.

image

Windows Insider Preview build 16215
Visual Studio Code Version 1.14.0-insider
Commit c89a5f6
Date 2017-06-15T05:13:32.497Z

@yzhang-gh
Copy link
Contributor

I suspect Files On-Demand feature is to blame.

@bpasero
Copy link
Member

bpasero commented Jun 16, 2017

@dantraMSFT any update trying insiders? do you have this "Files on demand" feature enabled?

@chenxizhang
Copy link

Still not work correctly @bpasero

@bpasero
Copy link
Member

bpasero commented Jun 16, 2017

@chenxizhang can you open the developer tools (Help > Toggle Developer Tools) and in the console type this:

require("fs").statSync("...")

Where ... is the path to the folder in OneDrive to open and send back the result?

@kevin12314
Copy link

kevin12314 commented Jun 16, 2017

My result:
image

@bpasero
Copy link
Member

bpasero commented Jun 16, 2017

Ok thanks so it looks like there is literally nothing we can do when node already fails.

@bpasero bpasero modified the milestones: Backlog, June 2017 Jun 16, 2017
@bpasero bpasero added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Jun 16, 2017
@ernestgwilsonii
Copy link

ernestgwilsonii commented Jun 17, 2017

THIS SUCKS. It took me hours to find this thread after going insane. Visual Studio Code cannot "open folders" on OneDrive for me either. It looks like OneDrive got updated and broke VSCode. I cannot get back into the Files On-Demand settings in OneDrive to disable that feature. Anyone know how to get this back working again?

@bpasero
Copy link
Member

bpasero commented Jun 18, 2017

@ernestgwilsonii suggest to contact OneDrive support to see if they have an answer.

@DanTravison @dantraMSFT @chenxizhang @kevin12314 @ernestgwilsonii just to be clear, you are all using the new OneDrive feature "Files On-demand" right?

@ernestgwilsonii
Copy link

Here are the facts from my end:
The issue with Visual Studio Code only presents itself while storing my code on OneDrive enabled locations on my PC.
My solution:
STOP using OneDrive and start using Google Drive.
Visual Studio Code is working fine now and OneDive is now in my rear view mirror.

@yzhang-gh
Copy link
Contributor

image

By disabling Files On-Demand, vscode works again.
(Right click the OneDrive tray icon, and click 'Settings')

@zhangyz1997
Copy link

Still not working. Win 10 16273.1000+VSCode 1.16.0 (x64)

@bpasero
Copy link
Member

bpasero commented Aug 25, 2017

@ChrisWarwick which exact Windows version are you on? Did you verify the scenario works with the "Files on-demand" feature enabled in OneDrive?

@pinoelefante
Copy link

@bpasero
Win 10 16275.1000+VSCode 1.15.1 (x86)
Still not working :(

@jeevcat
Copy link

jeevcat commented Aug 27, 2017

Not working for me either. I disabled files-on-demand and resynced and it didn't improve the situation.
Windows 10 16273
VSCode 1.15.1 (x64)

@refack
Copy link

refack commented Aug 27, 2017

  • a new libuv release with this fix
  • a new node.js release with that libuv version
  • a new electron release including that node.js version

The good news is the fix landed in libuv 1.14.0 (libuv/libuv@e5024c5), so 1 of 3 is done.

A version bump PR is open in node - nodejs/node#14866
Should land soon (that'll be 2 of 3).

Then the pressure will be on Electron...

@bpasero
Copy link
Member

bpasero commented Aug 31, 2017

I just created a build of VS Code that includes Electron 1.7.7 which includes a backport of the fix in libuv (thanks for the backport @zcbenz). Can people hitting the OneDrive issue maybe give this build a try and report back if the problem is fixed?

Thanks

@pinoelefante
Copy link

@bpasero is working with this build

@linanw
Copy link

linanw commented Aug 31, 2017

Ya, it works. I tested it on Windows 10 build 16251.
Updated:
My Windows later updated to 16278.rs3, it doesn't work any more.

@bpasero
Copy link
Member

bpasero commented Aug 31, 2017

That is good news. Unfortunately we are closing for our 1.16 release this week and it is unlikely that we would include this Electron version in the stable release. But we plan to update Electron for insiders next week asap so that people have a workaround by using VS Code insiders.

@MaximoTrinidad
Copy link

MaximoTrinidad commented Aug 31, 2017

I think someone make sure to test this on the latest Windows 10 Insider Build 16257.rs3. Just in case!
The reason I'm mentioning about it is due to the fact that OneDrive gets updated in one of the recent releases.

:)

@zhangyz1997
Copy link

Worked in build 16273 RS4

@bk147
Copy link

bk147 commented Sep 6, 2017

Also works here on Windows 10 Ent build 16353.rs_prerelease and OneDrive build 17.3.6998.0830 :-)

@bpasero
Copy link
Member

bpasero commented Sep 8, 2017

Fixed via electron/electron#10377

@bpasero bpasero closed this as completed Sep 8, 2017
@bpasero
Copy link
Member

bpasero commented Sep 28, 2017

Marking as verified based on user testing.

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 electron Issues and items related to Electron upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests