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

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

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

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

RobIsHere opened this issue Jul 28, 2017 · 35 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug config VS Code configuration, set up issues verified Verification succeeded
Milestone

Comments

@RobIsHere
Copy link

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 debug Debug viewlet, configurations, breakpoints, adapter issues label Jul 28, 2017
@weinand weinand assigned isidorn and unassigned weinand Jul 28, 2017
@isidorn
Copy link
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 removed debug Debug viewlet, configurations, breakpoints, adapter issues new release labels Jul 28, 2017
@isidorn isidorn assigned bpasero and unassigned isidorn Jul 28, 2017
@RobIsHere
Copy link
Author

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
Copy link
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
Copy link

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 the info-needed Issue requires more information from poster label Aug 11, 2017
@bpasero bpasero added this to the Backlog milestone Aug 11, 2017
@bpasero
Copy link
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
Copy link
Author

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 Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Aug 11, 2017
@bpasero
Copy link
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 VS Code configuration, set up issues label Aug 11, 2017
@bpasero
Copy link
Member

bpasero commented Nov 15, 2017

Does this still happen?

@bpasero bpasero added the info-needed Issue requires more information from poster label Nov 15, 2017
@bpasero bpasero removed this from the Backlog milestone Nov 15, 2017
@RobIsHere
Copy link
Author

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
Copy link
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
Copy link
Author

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
Copy link
Author

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
Copy link
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
Copy link
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
Copy link
Author

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
Copy link
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
Copy link
Member

bpasero commented Nov 21, 2017

Closing for November, this should be fine now.

@bpasero bpasero closed this as completed Nov 21, 2017
@bpasero bpasero removed the info-needed Issue requires more information from poster label Nov 21, 2017
@bpasero bpasero added this to the November 2017 milestone Nov 21, 2017
@RobIsHere
Copy link
Author

I think this is not working yet!

stillnoconfigurations

@sandy081 sandy081 removed their assignment Nov 21, 2017
@bpasero
Copy link
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
@bpasero bpasero added the info-needed Issue requires more information from poster label Nov 22, 2017
@se-m
Copy link

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
Copy link
Author

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
Copy link

se-m commented Nov 22, 2017

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

@se-m
Copy link

se-m commented Nov 22, 2017

image

@se-m
Copy link

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
Copy link
Author

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
Copy link

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
Copy link
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 as completed Nov 23, 2017
@bpasero bpasero removed the info-needed Issue requires more information from poster label Nov 23, 2017
@RobIsHere
Copy link
Author

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
Copy link
Member

dbaeumer commented Dec 7, 2017

Marking as verified due to #31667 (comment)

@dbaeumer dbaeumer added the verified Verification succeeded 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.
Labels
bug Issue identified by VS Code Team member as probable bug config VS Code configuration, set up issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

8 participants