🐛 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:
sync.gist property in VS Code settingsSync: Download Settings💪 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.
@arnohovhannisyan
Can you look into this ?
I think we can release new version with this issue fix and alongwith that Mac related issue.
@shanalikhan sure
@ActionCactus Is this happening constantly, or did it only happen once?
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.
Once I have a fix, will you be able to test it?
Yeah, sure
I met it when I try to use shift +alt + U to set Token
Cannot read property 'StopWatching' of undefined
@ActionCactus can you try this out?
https://cdn.discordapp.com/attachments/549007146868539408/564659165088448534/code-settings-sync-3.2.8.vsix
@eojina If you are getting errors, create an issue and show the error. This way it can get fixed, and you won't get annoyed.
@arnohovhannisyan This appears to be working, but I may have more info for you.
To test the attachment you gave me I reset extension settings for code-sync and then uninstalled the extension. After that I reinstalled the extension from scratch and simply ran "Sync: Download Settings" without setting up a gist (previously this was a scenario which would trigger the error filed). Things worked fine...When I filed the issue I had only just installed code-settings-sync on this machine for the first time (having installed elsewhere before). Could the issues be related?
Of course when I installed the package you gave me (code --install-extension .\code-settings-sync-3.2.8.vsix) things worked perfectly again. It seems you've resolved the issue; thank you so much!
@ActionCactus I'm glad it worked, and thanks for testing!
Could the issues be related?
I'm pretty sure that this just had to do with the auto-upload service being instantiated after the call.
@shanalikhan I made a PR fixing this issue.
After that I reinstalled the extension from scratch [..]
I can confirm that a simple reinstall (uninstall, reload app, install extension again) fixes the problem.
I just manually restarted VS Code and it fixed this issue. Didn't have to uninstall or reinstall or anything exotic like that.
Can confirm: fresh install of VS Codium (VS Code without Microsoft's modifications), downloaded shan.code-settings-sync, hit CTRL + ALT + U, and got "Cannot read property 'StopWatching' of undefined". Manually relaunched the app, hit CTRL + ALT + U, and extension started behaving as expected (asked for GitHub Personal Access Token).
I just manually restarted VS Code and it fixed this issue. Didn't have to uninstall or reinstall or anything exotic like that.
it work after restarted.
Name: Settings Sync
Id: shan.code-settings-sync
Description: Synchronize Settings, Snippets, Themes, File Icons, Launch, Keybindings, Workspaces and Extensions Across Multiple Machines Using GitHub Gist.
Version: 3.2.8
Publisher: Shan
I have a same problem,and I try this:
@ActionCactus你可以尝试一下吗?https://cdn.discordapp.com/attachments/549007146868539408/564659165088448534/code-settings-sync-3.2.8.vsix
but it doesn't work. I get same result.
Have the same problem on new installation. After VSCode have been restarted problem was resolved.
Same problem. Restart of VSCode fixed it with the 3.2.8 build already installed.
I've just installed and got this error too. Restarting seemed to have solved this.
I got this issue too, I was setting up for the first time ever and it threw an error like this. I was using VS Code 1.33.1.
I was able to do the worksournd where I uninstall, reload and re-install and it resolved it for me.
Restarting the app didn't help me.
Released v3.2.9
Most helpful comment
I just manually restarted VS Code and it fixed this issue. Didn't have to uninstall or reinstall or anything exotic like that.