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

Comments

Projects
None yet
@DanTravison

DanTravison commented May 25, 2017

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

This comment has been minimized.

Show comment
Hide comment
@roblourens

roblourens May 25, 2017

Member

Does it work normally with other editors?

Member

roblourens commented May 25, 2017

Does it work normally with other editors?

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero May 25, 2017

Member

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!

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 this to the Backlog milestone May 25, 2017

@dantraMSFT

This comment has been minimized.

Show comment
Hide comment
@dantraMSFT

dantraMSFT May 25, 2017

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Jun 11, 2017

Member

@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

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

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Jun 15, 2017

Member

@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

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

This comment has been minimized.

Show comment
Hide comment
@dantraMSFT

dantraMSFT Jun 15, 2017

Member

Doing so now.

Member

dantraMSFT commented Jun 15, 2017

Doing so now.

@neilsustc

This comment has been minimized.

Show comment
Hide comment
@neilsustc

neilsustc Jun 16, 2017

Contributor

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

Contributor

neilsustc 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

@neilsustc

This comment has been minimized.

Show comment
Hide comment
@neilsustc

neilsustc Jun 16, 2017

Contributor

I suspect Files On-Demand feature is to blame.

Contributor

neilsustc commented Jun 16, 2017

I suspect Files On-Demand feature is to blame.

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Jun 16, 2017

Member

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

Member

bpasero commented Jun 16, 2017

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

@chenxizhang

This comment has been minimized.

Show comment
Hide comment
@chenxizhang

chenxizhang Jun 16, 2017

Still not work correctly @bpasero

chenxizhang commented Jun 16, 2017

Still not work correctly @bpasero

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Jun 16, 2017

Member

@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?

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

This comment has been minimized.

Show comment
Hide comment
@kevin12314

kevin12314 Jun 16, 2017

My result:
image

kevin12314 commented Jun 16, 2017

My result:
image

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Jun 16, 2017

Member

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

Member

bpasero commented Jun 16, 2017

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

@ernestgwilsonii

This comment has been minimized.

Show comment
Hide comment
@ernestgwilsonii

ernestgwilsonii 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?

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

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Jun 18, 2017

Member

@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?

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

This comment has been minimized.

Show comment
Hide comment
@ernestgwilsonii

ernestgwilsonii Jun 18, 2017

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.

ernestgwilsonii commented Jun 18, 2017

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.

@neilsustc

This comment has been minimized.

Show comment
Hide comment
@neilsustc

neilsustc Jun 18, 2017

Contributor

image

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

Contributor

neilsustc commented Jun 18, 2017

image

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

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Aug 25, 2017

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@pinoelefante

pinoelefante Aug 26, 2017

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

pinoelefante commented Aug 26, 2017

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

@jeevcat

This comment has been minimized.

Show comment
Hide comment
@jeevcat

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

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

This comment has been minimized.

Show comment
Hide comment
@refack

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

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

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Aug 31, 2017

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@pinoelefante

pinoelefante Aug 31, 2017

@bpasero is working with this build

pinoelefante commented Aug 31, 2017

@bpasero is working with this build

@linanw

This comment has been minimized.

Show comment
Hide comment
@linanw

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

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

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Aug 31, 2017

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@MaximoTrinidad

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

:)

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

This comment has been minimized.

Show comment
Hide comment
@zhangyz1997

zhangyz1997 Sep 1, 2017

Worked in build 16273 RS4

zhangyz1997 commented Sep 1, 2017

Worked in build 16273 RS4

@bk147

This comment has been minimized.

Show comment
Hide comment
@bk147

bk147 Sep 6, 2017

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

bk147 commented Sep 6, 2017

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

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero
Member

bpasero commented Sep 8, 2017

Fixed via electron/electron#10377

@bpasero bpasero closed this Sep 8, 2017

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Sep 28, 2017

Member

Marking as verified based on user testing.

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.