code-settings-sync: Unable to read syncLocalSettings.json. Make sure its Valid JSON.

Visual Studio Code Version : [ 1.11.2] Code Settings Sync Version : [ 2.6.2] Operating System : [ Windows 10 ] Occurs On: [Upload] Proxy Enabled: [ No ] GIst Id: [ 1be69ce1a0ddc18a632b7f4108df3740]

I followed the instructions and created a GitHub Personal Access Token.

When I attempted to upload my settings, the following is displayed in VS Code

  • Cannot read property 'ignoreUploadFiles' of null
  • Sync : Unable to read syncLocalSettings.json. Make sure its Valid JSON.

These errors were also shown in VS Code debugger tool.

I went to the following directory C:\Users???\AppData\Roaming\Code\User and viewed the syncLocalSettings.json and noticed the file was empty. Based on blog post Code Settings Sync Customizable Sync, I manually added the following configuration to the syncLocalSettings.json

{ "ignoreUploadFiles": [ "projects.json", "projects_cache_git.json" ], "ignoreUploadFolders": [ "workspaceStorage" ], "replaceCodeSettings": { "http.proxy" :"", "files.autoSave" :"off" } }

After making these changes, the upload process worked and a gist was created on my GitHub account.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (4 by maintainers)

Most upvoted comments

There is an easier way. Ctrl + Shift + p and type Sync: Reset Extension Settings. Then scroll down on the Extension and Sign in with Github and it should redownload your Gist.

I recently encountered the same problem with a message saying: "Sync : Unable to read syncLocalSettings.json. Make sure its Valid JSON."But I solved this problem with just one click. Check “Download Public Gist” in Sync Settings and it will be successfully synchronized.(Or modify {“downloadPublicGist”: true} in the %APPDATA%\Code\User\syncLocalSettings.json file)

我最近遇到了相同的问题,提示信息显示:“Sync : Unable to read syncLocalSettings.json. Make sure its Valid JSON.” 但是我只用了一次点击便解决了这个问题,在Sync Settings里面勾选"下载公开Gist",立刻就能成功同步了。(或者在%APPDATA%\Code\User\syncLocalSettings.json文件中修改{“downloadPublicGist”: true})

Removing the file solved the issue on Windows 10. I tried to open it before, but vscode said it’s binary format or can’t open it. Next start the file was recreated, I entered again the gist token and everything works just like before.

delete the syncLocalSettings.json file from - %APPDATA%\Code\User\ - repository (folder) and restart vscode. after restart vs code automatically generate the file and the issue is solved.