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

🐛 Describe the bug
When I start VSCode I get error in dev console: Sync : Unable to read syncLocalSettings.json. Make sure its Valid JSON.

Afterwards extension opens link to: http://shanalikhan.github.io/2017/02/19/Option-to-ignore-settings-folders-code-settings-sync.html

Also the notification appears. It happens everytime I start VSCode.

🌴 Visual Studio Code Version : 1.29.0 🌴 Code Settings Sync Version : 3.2.0 🌴 Standard or Insiders : Standard 🌴 OSS or Portable : OSS 🌴 Operating System : Ubuntu 18.04.1 LTS 🌴 Occurs On: when I start vscode 🌴 Proxy Enabled: no 🌴 Gist Id: [ ID_HERE ]

📰 To Reproduce Not sure, it says invalid json, but my json is valid. I have these settings:

  "sync.autoDownload": true,
  "sync.autoUpload": true,
  "sync.forceDownload": true,
  "sync.quietSync": true,
  "sync.askGistName": false,
  "sync.removeExtensions": true,
  "sync.syncExtensions": true,

💪 Expected behavior It shouldn’t error out, atleast not open the browser.

📺 Console Error Log I added console.error(this.en.FILE_CUSTOMIZEDSETTINGS, customSettingStr); to see some output, but it seems to log only the path, like the there is no json 🤔 image

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 21 (7 by maintainers)

Most upvoted comments

If you’re having trouble location the syncLocalSettings.json file in Ubuntu, it’s here: ~/.config/Code/User/syncLocalSettings.json

I had to add my gist token manually to that file. and then in settings i had to clear my Gist ID. After pressing Alt+Shift+U, it worked and a Gist ID was somehow autmatically generated

I got this issue when I downloaded the extension in VSC and click on login to GitHub button. For this issue, instead of direct login into my Github account, I click on the Edit configuration button and copy-paste gist ID and gist token manually. Then I did sync: Download in VSC and it is working.

It is referring to this global settings. https://github.com/shanalikhan/code-settings-sync#global-settings

Reset the Settings Sync Settings to fix it.

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})

I also have auto upload and download off and get this error. Moreover, I just downloaded this extension on fresh VSCode on fresh PC and on fresh (just installed) OS. I did reset settings several times and login with github, but error is the same:

Sync : Unable to read syncLocalSettings.json. Make sure its Valid JSON.