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:
- Configure the provided gist to the
sync.gistproperty in VS Code settings - Open the command palette and run
Sync: Download Settings - 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
- Make sure that autoUploadService is set before using it (#832) * Use handler methods to check if autoUploadService exists * Update incorrect function call * Use await before calling handlers — committed to shanalikhan/code-settings-sync by auxves 5 years ago
- Make sure that autoUploadService is set before using it (#832) * Use handler methods to check if autoUploadService exists * Update incorrect function call * Use await before calling handlers — committed to shanalikhan/code-settings-sync by auxves 5 years ago
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.
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