code-settings-sync: "Cannot read property 'StopWatching' of undefined"

πŸ› Describe the bug
When downloading

🌴 Visual Studio Code Version : 1.33.0 🌴 Code Settings Sync Version : 3.2.8 🌴 Standard or Insiders : Standard? 🌴 OSS or Portable : OSS? 🌴 Operating System : Win10 🌴 Occurs On: Download 🌴 Proxy Enabled: No 🌴 Gist Id: (irrelevant, tested with multiple valid and invalid tokens)

πŸ“° To Reproduce Steps to reproduce the behavior:

  1. Configure the provided gist to the sync.gist property in VS Code settings
  2. Open the command palette and run Sync: Download Settings
  3. See error in the title

πŸ’ͺ Expected behavior A successful synchronization of settings or a more meaningful, user-facing error.

πŸ“Ί Console Error Log

Error: Cannot read property 'StopWatching' of undefined
	at module.exports.t.Sync.<anonymous> (c:\Users\natko\.vscode\extensions\shan.code-settings-sync-3.2.8\out\extension.js:130:81409)
	at Generator.next (<anonymous>)
	at module.exports.n (c:\Users\natko\.vscode\extensions\shan.code-settings-sync-3.2.8\out\extension.js:130:76170)
	at new Promise (<anonymous>)
	at module.exports.n (c:\Users\natko\.vscode\extensions\shan.code-settings-sync-3.2.8\out\extension.js:130:75947)
	at module.exports.t.Sync.download (c:\Users\natko\.vscode\extensions\shan.code-settings-sync-3.2.8\out\extension.js:130:81292)
	at d._executeContributedCommand (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:477:621)
	at d.$executeContributedCommand (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:478:6)
	at d._doInvokeHandler (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:622:11)
	at d._invokeHandler (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:621:716)
	at d._receiveRequest (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:620:394)
	at d._receiveOneMessage (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:619:141)
	at define.constructor._protocol.onMessage.e (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:617:400)
	at u.fire (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:44:708)
	at e (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:40:460)
	at u.fire (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:44:708)
	at a (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:172:467)
	at e (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:172:513)
	at u.fire (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:44:708)
	at y._receiveMessage (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:181:276)
	at define.constructor._socketDisposables.push._socketReader.onMessage.e (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:178:415)
	at u.fire (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:44:708)
	at f.acceptChunk (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:175:35)
	at define.constructor._register._socket.onData.e (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:174:410)
	at Socket.t (c:\Users\natko\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:182:689)
	at Socket.emit (events.js:182:13)
	at addChunk (_stream_readable.js:279:12)
	at readableAddChunk (_stream_readable.js:264:11)
	at Socket.Readable.push (_stream_readable.js:219:10)
	at Pipe.onread (net.js:636:20)

πŸ“Ί Additional context I’m not well-versed in typescript and I don’t know much about how async/promises work but the error occurs almost instantaneously after running the command which leads me to believe this is related to the globalCommonService.autoUploadService.StopWatching() call in Sync.download. I looked at the instantiation code and couldn’t see anything obvious but perhaps the problem is there?

I originally installed 3.2.8 from the VS-Code Marketplace but it looks like the latest tag you have here is 3.2.7. I installed 3.2.7 specifically in VS Code and the problem doesn’t exist there.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 21
  • Comments: 22 (9 by maintainers)

Commits related to this issue

Most upvoted comments

I just manually restarted VS Code and it fixed this issue. Didn’t have to uninstall or reinstall or anything exotic like that.

It was constant and virtually instantaneous every time. I used multiple gists (in between resetting settings, of course) and tried with numerous code-sync settings (ranging from just a configured gist to multiple settings).

As mentioned in the bug report I did revert to 3.2.7 and the problem doesn’t exist with that version.

After that I reinstalled the extension from scratch […]

I can confirm that a simple reinstall (uninstall, reload app, install extension again) fixes the problem.

@shanalikhan I made a PR fixing this issue.

@arnohovhannisyan

Can you look into this ? I think we can release new version with this issue fix and alongwith that Mac related issue.

Released v3.2.9