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

Configuration values are missing from files on remote network drives #31667

Closed
RobIsHere opened this Issue Jul 28, 2017 · 35 comments

Comments

Projects
None yet
8 participants
@RobIsHere

RobIsHere commented Jul 28, 2017

When I open a folder from my server e.g. \MYSERVER\some-project, all debug configurations are missing.

If I open the same folder from a drive letter, that is mapped to \MYSERVER\some-project, all debug configurations work as expected.

==================================

  • VSCode Version: Code 1.14.2 (cb82feb, 2017-07-19T23:34:09.706Z)
  • OS Version: Windows_NT ia32 10.0.14393
  • Extensions:
    vsc-ember-frost|cie|0.0.2
    vscode-eslint|dba|1.2.11
    vscode-babel-coloring|dza|0.0.4
    redux-snippets|jam|0.0.2
    debugger-for-chrome|msj|3.1.6
    code-settings-sync|Sha|2.8.2
    vscode-react-native|vsm|0.4.0

Reproduces without extensions: Yes

@vscodebot vscodebot bot added the new release label Jul 28, 2017

@vscodebot vscodebot bot added the debug label Jul 28, 2017

@weinand weinand assigned isidorn and unassigned weinand Jul 28, 2017

@isidorn

This comment has been minimized.

Show comment
Hide comment
@isidorn

isidorn Jul 28, 2017

Contributor

This is due to the fact that we are missing file events from network locations. So debug does not get pinged by configuration service for a change
Forwarding to @bpasero since he probably knows if this is a duplicate or this should be covered by #13665

Contributor

isidorn commented Jul 28, 2017

This is due to the fact that we are missing file events from network locations. So debug does not get pinged by configuration service for a change
Forwarding to @bpasero since he probably knows if this is a duplicate or this should be covered by #13665

@isidorn isidorn assigned bpasero and unassigned isidorn Jul 28, 2017

@RobIsHere

This comment has been minimized.

Show comment
Hide comment
@RobIsHere

RobIsHere Jul 28, 2017

To clarify this: I did not change the launch.json. The launch.json was like today for at least a month, working well.

But vscode always deletes the Recent Folder Entry, when you forget to click on the drive-mapped network folder in explorer.

So I decided to open it via its network name. But then I can't debug.

As this incident happened at the same time with some other issues and updates, I wasted two hours to find the cause. At least please add this to an FAQ or docs.

RobIsHere commented Jul 28, 2017

To clarify this: I did not change the launch.json. The launch.json was like today for at least a month, working well.

But vscode always deletes the Recent Folder Entry, when you forget to click on the drive-mapped network folder in explorer.

So I decided to open it via its network name. But then I can't debug.

As this incident happened at the same time with some other issues and updates, I wasted two hours to find the cause. At least please add this to an FAQ or docs.

@isidorn

This comment has been minimized.

Show comment
Hide comment
@isidorn

isidorn Jul 28, 2017

Contributor

Thanks for more details.
FYI we accept PRs for vscode-docs here https://github.com/microsoft/vscode-docs

Contributor

isidorn commented Jul 28, 2017

Thanks for more details.
FYI we accept PRs for vscode-docs here https://github.com/microsoft/vscode-docs

@se-m

This comment has been minimized.

Show comment
Hide comment
@se-m

se-m Jul 28, 2017

Problem exists even you mount network shares to folders
e.g. mklink /d c:\proj \\server\share\foldername\

vscode does not read not only debug config (launch.json), but also workspace settings (settings.json)

se-m commented Jul 28, 2017

Problem exists even you mount network shares to folders
e.g. mklink /d c:\proj \\server\share\foldername\

vscode does not read not only debug config (launch.json), but also workspace settings (settings.json)

@bpasero bpasero assigned sandy081 and bpasero and unassigned bpasero Aug 11, 2017

@bpasero bpasero added this to the Backlog milestone Aug 11, 2017

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Aug 11, 2017

Member

@RobIsHere do the configurations show up when you do a restart of VS Code? If not, then this imho is not a file watching problem.

Member

bpasero commented Aug 11, 2017

@RobIsHere do the configurations show up when you do a restart of VS Code? If not, then this imho is not a file watching problem.

@RobIsHere

This comment has been minimized.

Show comment
Hide comment
@RobIsHere

RobIsHere Aug 11, 2017

I share your opinion. I restarted it a couple of times and they never showed up.

Unless you have done very unusual things in your code, this is no file watching problem. But that's what I already wrote above.

I'm on sailing holiday, so I can't do further testing now, sorry

RobIsHere commented Aug 11, 2017

I share your opinion. I restarted it a couple of times and they never showed up.

Unless you have done very unusual things in your code, this is no file watching problem. But that's what I already wrote above.

I'm on sailing holiday, so I can't do further testing now, sorry

@bpasero bpasero added bug and removed needs more info labels Aug 11, 2017

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Aug 11, 2017

Member

Ok thanks, we should try to reproduce this somehow. I have heard issues like that in the past.

Member

bpasero commented Aug 11, 2017

Ok thanks, we should try to reproduce this somehow. I have heard issues like that in the past.

@bpasero bpasero added the config label Aug 11, 2017

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Nov 15, 2017

Member

Does this still happen?

Member

bpasero commented Nov 15, 2017

Does this still happen?

@bpasero bpasero removed this from the Backlog milestone Nov 15, 2017

@RobIsHere

This comment has been minimized.

Show comment
Hide comment
@RobIsHere

RobIsHere Nov 15, 2017

Yes. Version 1.18.0. In the screenshots below you can see one and only one project.
Its located on my MacBook. And shared from there via SMB.

When opened remote from my Windows 10 PC, You see the debug configs are missing (Keine Konfigurationen = No Configurations) and there is an indicator to work on the debug configs. Although the commands can be executed via shell.

Having this working would be quite cool, because the ios simulator only runs on a mac. So I would like to ssh-tunnel the react-native packager to the mac.

debugconfigsmissing

bildschirmfoto 2017-11-15 um 19 01 13

RobIsHere commented Nov 15, 2017

Yes. Version 1.18.0. In the screenshots below you can see one and only one project.
Its located on my MacBook. And shared from there via SMB.

When opened remote from my Windows 10 PC, You see the debug configs are missing (Keine Konfigurationen = No Configurations) and there is an indicator to work on the debug configs. Although the commands can be executed via shell.

Having this working would be quite cool, because the ios simulator only runs on a mac. So I would like to ssh-tunnel the react-native packager to the mac.

debugconfigsmissing

bildschirmfoto 2017-11-15 um 19 01 13

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Nov 16, 2017

Member

@RobIsHere @se-m would you be willing to help out on this issue by setting up VS Code to run from its sources so that we can add some debug information? The steps how to get there are outlined here: https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run-from-source

Member

bpasero commented Nov 16, 2017

@RobIsHere @se-m would you be willing to help out on this issue by setting up VS Code to run from its sources so that we can add some debug information? The steps how to get there are outlined here: https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run-from-source

@RobIsHere

This comment has been minimized.

Show comment
Hide comment
@RobIsHere

RobIsHere Nov 17, 2017

Narrowed it down to https://github.com/Microsoft/vscode/blob/master/src/vs/base/common/paths.ts#L24

Run the function with

from = "\\ROBERTS-MBP\Dropfella", to = "\\ROBERTS-MBP\Dropfella\.vscode\launch.json"

and you get

Return value "../..//ROBERTS-MBP/Dropfella/.vscode/launch.json"

RobIsHere commented Nov 17, 2017

Narrowed it down to https://github.com/Microsoft/vscode/blob/master/src/vs/base/common/paths.ts#L24

Run the function with

from = "\\ROBERTS-MBP\Dropfella", to = "\\ROBERTS-MBP\Dropfella\.vscode\launch.json"

and you get

Return value "../..//ROBERTS-MBP/Dropfella/.vscode/launch.json"
@RobIsHere

This comment has been minimized.

Show comment
Hide comment
@RobIsHere

RobIsHere Nov 17, 2017

https://github.com/Microsoft/vscode/blob/master/src/vs/base/common/paths.ts#L167
calling getRoot("\ROBERTS-MBP\Dropfella") returns "/"
calling getRoot on some subfolder works

So a comparison of the two roots is not equal.

See the screenshots:
getroot
getrootwithfile

RobIsHere commented Nov 17, 2017

https://github.com/Microsoft/vscode/blob/master/src/vs/base/common/paths.ts#L167
calling getRoot("\ROBERTS-MBP\Dropfella") returns "/"
calling getRoot on some subfolder works

So a comparison of the two roots is not equal.

See the screenshots:
getroot
getrootwithfile

bpasero added a commit that referenced this issue Nov 17, 2017

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Nov 17, 2017

Member

@RobIsHere great work, can you grab latest from master and see if the fix I pushed makes it any better?

@jrieken it looks like path.relative('\\\\ROBERTS-MBP\\Dropfella', '\\\\ROBERTS-MBP\\Dropfella\\.vscode\\launch.json') results in ../..//ROBERTS-MBP/Dropfella/.vscode/launch.json. We need to either fix that method or use the node.js one. The problem is that all remaining clients of our paths.relative live in common (including glob.ts)...

Member

bpasero commented Nov 17, 2017

@RobIsHere great work, can you grab latest from master and see if the fix I pushed makes it any better?

@jrieken it looks like path.relative('\\\\ROBERTS-MBP\\Dropfella', '\\\\ROBERTS-MBP\\Dropfella\\.vscode\\launch.json') results in ../..//ROBERTS-MBP/Dropfella/.vscode/launch.json. We need to either fix that method or use the node.js one. The problem is that all remaining clients of our paths.relative live in common (including glob.ts)...

@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken Nov 17, 2017

Member

I am not responsible for path.relative not a single line of my code has survived there and "yes" it's completely broken because it doesn't respect the root of a path. Use node-path whenever possible, ideally move all code to /node/ if it requires path-math.

Member

jrieken commented Nov 17, 2017

I am not responsible for path.relative not a single line of my code has survived there and "yes" it's completely broken because it doesn't respect the root of a path. Use node-path whenever possible, ideally move all code to /node/ if it requires path-math.

@RobIsHere

This comment has been minimized.

Show comment
Hide comment
@RobIsHere

RobIsHere Nov 19, 2017

The debug configurations don't appear.

The sourcemaps seem to be broken now, breakpoints stop on different rows than the one I'm targeting, so it's tedious to find it out.

Maybe tests of some of the involved methods could be a lot faster in dev time than try-and-error?

Just another thing, don't know if that's a problem: getRoot is e.g. also called from paths.normalize:
return paths.normalize(relative(this.folder.fsPath, resource.fsPath), toOSPath);
So I'm not 100% sure about the fix.

RobIsHere commented Nov 19, 2017

The debug configurations don't appear.

The sourcemaps seem to be broken now, breakpoints stop on different rows than the one I'm targeting, so it's tedious to find it out.

Maybe tests of some of the involved methods could be a lot faster in dev time than try-and-error?

Just another thing, don't know if that's a problem: getRoot is e.g. also called from paths.normalize:
return paths.normalize(relative(this.folder.fsPath, resource.fsPath), toOSPath);
So I'm not 100% sure about the fix.

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Nov 20, 2017

Member

@RobIsHere I think I am able to reproduce now when I use the UNC localhost notation on Windows and open the root drive with a .vscode folder inside: \\localhost\c$. However after my fix I see the configurations showing up, and without they do not.

To be on the safe side can you maybe try to reproduce with todays insider build that includes my fix? You can give our preview releases a try from: https://code.visualstudio.com/insiders/

Member

bpasero commented Nov 20, 2017

@RobIsHere I think I am able to reproduce now when I use the UNC localhost notation on Windows and open the root drive with a .vscode folder inside: \\localhost\c$. However after my fix I see the configurations showing up, and without they do not.

To be on the safe side can you maybe try to reproduce with todays insider build that includes my fix? You can give our preview releases a try from: https://code.visualstudio.com/insiders/

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Nov 21, 2017

Member

Closing for November, this should be fine now.

Member

bpasero commented Nov 21, 2017

Closing for November, this should be fine now.

@bpasero bpasero closed this Nov 21, 2017

@bpasero bpasero added this to the November 2017 milestone Nov 21, 2017

@RobIsHere

This comment has been minimized.

Show comment
Hide comment
@RobIsHere

RobIsHere Nov 21, 2017

I think this is not working yet!

stillnoconfigurations

RobIsHere commented Nov 21, 2017

I think this is not working yet!

stillnoconfigurations

@sandy081 sandy081 removed their assignment Nov 21, 2017

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Nov 22, 2017

Member

@RobIsHere can you use insiders please, the screenshot looks like you are still running out of sources.

Member

bpasero commented Nov 22, 2017

@RobIsHere can you use insiders please, the screenshot looks like you are still running out of sources.

@bpasero bpasero reopened this Nov 22, 2017

@se-m

This comment has been minimized.

Show comment
Hide comment
@se-m

se-m Nov 22, 2017

Hi.
I checked the last one insiders build. On windows 7x64 all fine. Debug configuration appears. There is no watch and autoreload, so you should restart vscode (or close&open folder) to see your changes in configuration file, but its ok.
Tested in both variants: "network shares as folders" and "network shares as network drive"

Version 1.19.0-insider
commit 3afa334

se-m commented Nov 22, 2017

Hi.
I checked the last one insiders build. On windows 7x64 all fine. Debug configuration appears. There is no watch and autoreload, so you should restart vscode (or close&open folder) to see your changes in configuration file, but its ok.
Tested in both variants: "network shares as folders" and "network shares as network drive"

Version 1.19.0-insider
commit 3afa334

@RobIsHere

This comment has been minimized.

Show comment
Hide comment
@RobIsHere

RobIsHere Nov 22, 2017

Can you install and run insider build side by side with the "normal" build? I'm hesitating a little bit because I still need my dev machine at work ;)

RobIsHere commented Nov 22, 2017

Can you install and run insider build side by side with the "normal" build? I'm hesitating a little bit because I still need my dev machine at work ;)

@se-m

This comment has been minimized.

Show comment
Hide comment
@se-m

se-m Nov 22, 2017

Get latest code from github (commit bce608e) and make it run. Configuration also appears.

se-m commented Nov 22, 2017

Get latest code from github (commit bce608e) and make it run. Configuration also appears.

@se-m

This comment has been minimized.

Show comment
Hide comment
@se-m

se-m commented Nov 22, 2017

image

@se-m

This comment has been minimized.

Show comment
Hide comment
@se-m

se-m Nov 22, 2017

left normal build 1.18.0
center build from sources
right insider

the same folder is open in all three

se-m commented Nov 22, 2017

left normal build 1.18.0
center build from sources
right insider

the same folder is open in all three

@RobIsHere

This comment has been minimized.

Show comment
Hide comment
@RobIsHere

RobIsHere Nov 22, 2017

Your github is showing 14 changes. But doesn't show any in insiders or master.

At my machine (accessing a smb share on mac from windows) it's the opposite. I'm seeing my github changes only on the master branch, not in the normal build.

Could this also be related to the changed path resolution here?

RobIsHere commented Nov 22, 2017

Your github is showing 14 changes. But doesn't show any in insiders or master.

At my machine (accessing a smb share on mac from windows) it's the opposite. I'm seeing my github changes only on the master branch, not in the normal build.

Could this also be related to the changed path resolution here?

@se-m

This comment has been minimized.

Show comment
Hide comment
@se-m

se-m Nov 22, 2017

My git installation folder not in usual place. I set up "git.path" param and it show the same result (14)

se-m commented Nov 22, 2017

My git installation folder not in usual place. I set up "git.path" param and it show the same result (14)

@bpasero

This comment has been minimized.

Show comment
Hide comment
@bpasero

bpasero Nov 23, 2017

Member

@se-m great to hear. yeah file events might be broken in that setup, that is a known issue. Closing as fixed.

Member

bpasero commented Nov 23, 2017

@se-m great to hear. yeah file events might be broken in that setup, that is a known issue. Closing as fixed.

@bpasero bpasero closed this Nov 23, 2017

@RobIsHere

This comment has been minimized.

Show comment
Hide comment
@RobIsHere

RobIsHere Nov 23, 2017

Thank you @bpasero! I can confirm that this works in the insider build.

( It still does not work on master branch. But because you already had this in mind, this is probably specific to your git workflow )

RobIsHere commented Nov 23, 2017

Thank you @bpasero! I can confirm that this works in the insider build.

( It still does not work on master branch. But because you already had this in mind, this is probably specific to your git workflow )

@dbaeumer

This comment has been minimized.

Show comment
Hide comment
@dbaeumer

dbaeumer Dec 7, 2017

Member

Marking as verified due to #31667 (comment)

Member

dbaeumer commented Dec 7, 2017

Marking as verified due to #31667 (comment)

@dbaeumer dbaeumer added the verified label Dec 7, 2017

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 7, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.