Code-settings-sync: Cannot Download settings with 2.9.1

Created on 1 May 2018  路  8Comments  路  Source: shanalikhan/code-settings-sync

Visual Studio Code Version : 1.22.2
Code Settings Sync Version : 2.9.1
Operating System : Windows 8.1
Occurs On: Download
Proxy Enabled: No
GIst Id: f2c89b48376033703694b0a9ec6558b0

I setup a new environment (VSC) and started with this extensions and then tried to download my existing gist configuration.

It downloaded all except my extensions...

All with a similar error like the following... SyntaxError: Unexpected token u in JSON at position 0

mainThreadExtensionService.ts:44 SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse ()
at ReadFileContext.callback (C:\Users\giuseppe.vscode\extensions\Shan.code-settings-sync-2.9.1\out\src\service\pluginService.js:91:35)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:359:13)

bug 馃悰 fixed

Most helpful comment

Fixed - Published v2.9.2
let me know if there is any error.

Issue opened for package that caused this issue - https://github.com/cthackers/adm-zip/issues/221
Updating adm-zip caused this.

All 8 comments

Visual Studio Code Version : 1.22.2
Code Settings Sync Version : 2.9.1
Operating System : Windows 10
Occurs On: Download
Proxy Enabled: No
GIst Id: c0073857f89c1672cbb8444e885f8f44

Also getting this, here is sample output in dev tools. Installing extensions manually works.

SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
    at ReadFileContext.callback (C:\Users\Rahul\.vscode\extensions\Shan.code-settings-sync-2.9.1\out\src\service\pluginService.js:91:35)
    at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:359:13)
e.$onExtensionRuntimeError @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2870
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:260 

[Extension Host] Error: ENOENT: no such file or directory, open 'C:\Users\Rahul\AppData\Local\Temp\11841-4476-o6uuxc.5b9q\extension\package.json'
t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:260
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:260 

[Extension Host] Sync : Extension : 'terraform' - Version : '1.0.4' Error: ENOENT: no such file or directory, open 'C:\Users\Rahul\AppData\Local\Temp\11841-4476-1ffjwn9.jyajk\extension\package.json'
t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:260
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:260 

[Extension Host] Error: ENOENT: no such file or directory, open 'C:\Users\Rahul\AppData\Local\Temp\11841-4476-1ffjwn9.jyajk\extension\package.json'

If I look inside the temp folder where the extension has been downloaded, the path names seem to be messed up. There are no subfolders, and the folder names are all joined by underscores.

Example dir listing attached
list.txt

Thanks, Looking into it.

I am having the same issue, with failed downloading.

edit:

so the issue is that in the temp files there is no "\extension\package.json" in any of the temp folders.

For anyone who needs to be able to synchronise while @shanalikhan is working on a fix I recommend just using the previous version, this is what I did.

To do this simply edit your vscode settings and add "extensions.autoUpdate": false, download the VSIX file from release 2.9.0 https://github.com/shanalikhan/code-settings-sync/releases/tag/v2.9.0 and install in vscode by running the following command: 麓Extensions: Install from VSIX...麓

@joakimhew works like a charm, thxs...

for those wondering how to install the vsix file, here's how :)

Had the same problem with 2.9.1. 2.9.0 works ok.

Fixed - Published v2.9.2
let me know if there is any error.

Issue opened for package that caused this issue - https://github.com/cthackers/adm-zip/issues/221
Updating adm-zip caused this.

Was this page helpful?
0 / 5 - 0 ratings