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

Download of extension packages failed #642

Closed
mkarajohn opened this issue Sep 16, 2018 · 8 comments
Closed

Download of extension packages failed #642

mkarajohn opened this issue Sep 16, 2018 · 8 comments

Comments

@mkarajohn
Copy link

🐛 Describe the bug
When I download settings in a new machine (has happened twice now) i get this while downloading:

CODE SETTINGS SYNC - COMMAND LINE EXTENSION DOWNLOAD SUMMARY
Version: 3.1.2
--------------------
Sync : <PACKAGE NAME> Download Failed.
Sync : <PACKAGE NAME> Download Failed.
Sync : <PACKAGE NAME> Download Failed.
Sync : <PACKAGE NAME> Download Failed.
...
...

The settings files get downloaded, but not the actual packages. This means it looks like I have the extensions installed, but I don't actually have them.

🌴 Visual Studio Code Version : 1.27.2
🌴 Code Settings Sync Version : 3.1.2
🌴 Operating System : Windows 10 / CentOS 7
🌴 Occurs On: Download
🌴 Proxy Enabled: No / Yes
🌴 Gist Id: 017cc7c73b2f78580e7083da0124c217

📺 Console Error Log

This gets output for every extension, in the VSCode dev tools console (taken from my Windows machine)

[Extension Host] Sync : Extension : 'vscode-scss' - Version : '0.6.2'Error: ENOENT: no such file or directory, mkdir 'C:\Users\Mitch\AppData\Local\Temp\C:\Users\Mitch\AppData\Local\Temp\118816-20904-fn4zjf.7gfcd118816-20904-12xvxt.qncjwo'
@MisguidedEmails
Copy link

On Linux the error is /tmp/tmp/<SOMETHING>, creating the folder /tmp/tmp/ fixes the issue

@shanalikhan
Copy link
Owner

are you using Code as OSS version or portable version or standard ?

@mkarajohn
Copy link
Author

On Windows I've installed VSCode using the official installer. On CentOS I've installed it through the official repository

@shanalikhan
Copy link
Owner

can you try with v3.2

@emptyother
Copy link
Contributor

I've been getting the same errors a while now. Tried today with Settings sync 3.2.0. Also tried uninstalling vscode and reinstall it. Have not tried cleaning up %appdata% nor starting on a fresh gist, yet.

🌴 **Visual Studio Code Version : 1.28.2
🌴 **Visual Studio Code Installer : Tried both "User Installer" (that installs "code.exe" to %localappdata%) and "System Installer" (that installs "code.exe" to %programfiles%) for Windows, no difference.
🌴 **Code Settings Sync Version : 3.2.0
🌴 **Operating System : Windows 10 Version 1809 (17763.55)
🌴 **Occurs On: Download
🌴 **Proxy Enabled: No

@emptyother
Copy link
Contributor

So i took a quick look at why the code generated double temp paths. Wasn't entirely able to fix it, but here's what I've found so far.

The line "/src/util.ts:95" calls temp.path();. That node module ends up on this line:

return path.join(affixes.dir || exports.dir, name);

When called from util.ts, exports.dir contains the systems temporary path.. But the "name" variable sometimes contains just a filename, but other times it contains a full path. So when it joins "c:\user\tom\temp" with "c:\user\tom\temp\temfilename.randomletters", it ends up with double paths. I'm guessing it wasn't supposed to prepend exports.dir, but the affixes object is always falsy.

If you look at the content of the "affixes" object, it never have a property called "dir" when it gets called. It either have the properties "prefix" and "suffix" (created in "parseAffixes" method a few lines below in that file) or is undefined. So i'm guessing thats whats causing the bug.

I will take another look at this bug when I have time, unless anyone else get to it first.

@shanalikhan
Copy link
Owner

shanalikhan commented Nov 9, 2018

I will take another look at this bug when I have time, unless anyone else get to it first.

I am not able to generate the error at my end.
That would be great if you send look and send a PR. I will be more happy to accept that and push new version fixing it.

@shanalikhan
Copy link
Owner

Released.
let me know if there is any error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants