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

VSCode tsconfig, jsconfig & other (.json) files in SharePoint #30817

Closed
rixpoint opened this issue Apr 6, 2019 · 6 comments
Closed

VSCode tsconfig, jsconfig & other (.json) files in SharePoint #30817

rixpoint opened this issue Apr 6, 2019 · 6 comments
Labels
Needs More Info The issue still hasn't been fully clarified

Comments

@rixpoint
Copy link

rixpoint commented Apr 6, 2019

Hi there, I've recently come across and issue which is exactly the same as:

#52853

Our global infrastructure team came to me complaining that the servers were being overloaded by requests from me. It's basically because of this issue.

There was a workaround supplied but it meant a reduction in functionality.

I use TypeScript and find it an important part of why I like VS Code so I feel disabling it when it works is not a very viable workaround for me.

Please can anyone suggest another way to do this without having to disable TS?

To summarize the issue - when opening a file directly in SharePoint VS Code will look for a .json file such as tsconfig.json in the same directory.

SP2013 blocks .json files by default and results in a 404 not found. VS Code then repeats the request over and over whilst I have it open resulting in 1000's of requests per minute to the server.

TypeScript works fine but the multiple requests are not.

Any help would be greatly appreciated.

Kind regards,

Richard Weston

@vscodebot vscodebot bot assigned mjbvz Apr 6, 2019
@mjbvz mjbvz transferred this issue from microsoft/vscode Apr 8, 2019
@mjbvz mjbvz removed their assignment Apr 8, 2019
@RyanCavanaugh
Copy link
Member

@mjbvz tsserver can't make HTTP requests, so I'm assuming VS Code is the one doing this - should there be some caching layer in place? TS assumes that the editor is giving us file paths and that it's safe to query them

@RyanCavanaugh RyanCavanaugh added the Needs More Info The issue still hasn't been fully clarified label Apr 10, 2019
@mjbvz
Copy link
Contributor

mjbvz commented Apr 10, 2019

@rixpoint can confirm, but I think this happens when you open a sharepoint assets folder using a unc style path in windows (see #30818 for example)

I think that webdav may be used behind the scenes but I think that windows hides these details from applications, so that normal file operations work transparently. This could actually be the same problem as #30818 which also is related to tsconfigs on sharepoint, but I'm not sure without having access to sharepoint logs

@RyanCavanaugh
Copy link
Member

Sounds like it's a possible mismatch between the "exists" vs "can read" behavior then?

@rixpoint
Copy link
Author

@mjbvz thanks for responding - it's exactly that!!

I have mapped the SharePoint location as a webdav drive and then opening the aspx files, for some reason the thing loops thousands of times for min trying to find a .json file in the same location but that ends up with me getting a call from our infrastructure team telling me I'm killing the server (like dos attack) and threatening to ban me from developing on there.

Lovely haha

@rixpoint
Copy link
Author

rixpoint commented Apr 26, 2019

So to add to this, I noticed the requests started hammering the server again.

It had stopped for a while but I don't know if VS Code auto updating turned it back on but when I went into the settings.json file to ensure that the validation parameters are set to false they already are.

{ "files.autoSave": "afterDelay", "typescript.validate.enable": false, "javascript.validate.enable": false }

Weird!

@rixpoint
Copy link
Author

I actually found that the typescript builtin extension had re-enabled itself (my guess would be on each update of vscode)

I'll be aware to disable this every time it updates.

typescript-issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs More Info The issue still hasn't been fully clarified
Projects
None yet
Development

No branches or pull requests

3 participants