Code-settings-sync: A 'keybindings.json' file missing from Gist causes download to fail

Created on 11 Oct 2016  路  5Comments  路  Source: shanalikhan/code-settings-sync

Visual Studio Code Version : [ 1.6 ]
Code Sync Settings Version : [ 2.3.1 ]
Operating System : [ Windows 10 ]
Occurs On: [ Download]

This problem occurs in the following scenario:

  • The Gist is initially created by uploading from a Mac, which only creates keybindingsMac.json, but not (also) keybindings.json.
  • Download is then attempted on a Windows machine, where the missing keybindings.json then causes the failure printed below.

Solution: Do not assume presence of keybindings.json on Windows, and, conversely, keybindingsMac.json on a Mac - tolerate their absence.

Note: I tried to debug the extension and was able to do so in principle, but for some reason I never managed to break on breakpoints in the downloading code, which seemed not to execute at all while debugging (no errors showed, neither in the debug console nor in the developer toos).
Any idea why?

shell.ts:441 Cannot read property 'content' of undefined: TypeError: Cannot read property 'content' of undefined
    at C:\Users\jdoe\.vscode\extensions\Shan.code-settings-sync-2.3.1\out\src\extension.js:442:101
    at next (<anonymous>)
    at fulfilled (C:\Users\jdoe\.vscode\extensions\Shan.code-settings-sync-2.3.1\out\src\extension.js:4:58)
    at process._tickCallback (internal/process/next_tick.js:103:7)e.onUnexpectedError @ shell.ts:441(anonymous function) @ shell.ts:354e.onUnexpectedError @ errors.ts:68o @ errors.ts:83t.onUnexpectedExtHostError @ mainThreadErrors.ts:13e.handle @ abstractThreadService.ts:34s @ ipcRemoteCom.ts:269f @ ipcRemoteCom.ts:226_combinedTickCallback @ internal/process/next_tick.js:67_tickCallback @ internal/process/next_tick.js:98
bug 馃悰 fixed

All 5 comments

Same problem. It seems that this extension is not quite stable after I used for about 3 months. For so many times I just cannot download/upload my settings after I update the extension.
And right now, the status message is disappeared in the latest version...... These problems are just killing me. So I decided to abandon this extension, I'll try to write a sync-extension just for myself. Before that, I'll use "manual sync".

I dont have mac actually so i was unable to test there. i will look into it.

but for some reason I never managed to break on breakpoints

Yes, im also facing some problems sometimes the breakpoints are not hitting on time and sometime when it hits it hits on other line rather

@mklement0 try with the latest master branch, i have changed the typescript compilation configurations. Now the breakpoints will start hitting
i guess, this happened when i configured it with typescript 2

@shanalikhan Thanks; debugging works now, and I've fixed the issue in #118.

nonoroazoro has a point about the lack of stability of the extension overall.

I think it's time to add tests, even though you may not personally be able to test on all platforms (maybe there's even a solution for that - I know little about extension development and testing at this point).

I will learn and implment the test in the extension.

I have published the 2.3.3 version containing this fixed and other improvements.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

OlegChep picture OlegChep  路  5Comments

axetroy picture axetroy  路  4Comments

fdncred picture fdncred  路  3Comments

dawsbot picture dawsbot  路  5Comments

dagrooms52 picture dagrooms52  路  3Comments