Skip to content

Handle the scenario when the data in the cloud is in wrong format #185501

Open

Description

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.79.2
  • OS Version: Ubuntu 23.04

Steps to Reproduce:

  1. Have Settings Sync enabled
  2. Open Settings Sync Output Channel
  3. See an error logged in the output channel: TypeError: s is not iterable

settings-sync-error

[error] TypeError: s is not iterable
    at C (/snap/code/132/usr/share/code/resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:79:25387)
    at e.KeybindingsSynchroniser.ob (/snap/code/132/usr/share/code/resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:81:60431)
    at async e.KeybindingsSynchroniser.cb (/snap/code/132/usr/share/code/resources/app/out/vs/code/node/sharedProcess/sharedProcessMain.js:81:27833)

Expected behaviour:

No error is logged to the settings sync output channel.

Actual Behaviour

An error logged in the output channel: TypeError: s is not iterable

Source Code Location

const userbindings: string[] = [...local, ...remote, ...(base || [])].map(keybinding => keybinding.key);

Additional information

Using Chrome debugger I could see the following values:

debug

local (minified i):

[
    {
        "key": "ctrl+r",
        "command": "workbench.action.reloadWindow"
    },
    {
        "key": "ctrl+r",
        "command": "-workbench.action.reloadWindow",
        "when": "isDevelopment"
    },
    {
        "key": "ctrl+shift+r",
        "command": "workbench.action.openRecent"
    },
    {
        "key": "ctrl+r",
        "command": "-workbench.action.openRecent"
    }
]

remote (minified s):

{
    "linux": [
        {
            "key": "ctrl+n",
            "command": "explorer.newFile"
        },
        {
            "key": "ctrl+m",
            "command": "workbench.action.toggleActivityBarVisibility"
        },
        {
            "key": "ctrl+shift+r",
            "command": "workbench.action.openRecent"
        },
        {
            "key": "ctrl+q",
            "command": "editor.togglequotes"
        },
        {
            "key": "ctrl+alt+u",
            "command": "insertNextSuggestion",
            "when": "hasOtherSuggestions && textInputFocus && !inSnippetMode && !suggestWidgetVisible && config.editor.tabCompletion == 'on'"
        },
        {
            "key": "ctrl+shift+g [IntlBackslash]",
            "command": "-gitlens.diffLineWithPrevious",
            "when": "editorTextFocus && gitlens:keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
        },
        {
            "key": "ctrl+shift+g shift+,",
            "command": "-gitlens.diffLineWithPrevious",
            "when": "editorTextFocus && gitlens:keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
        },
        {
            "key": "ctrl+shift+g w",
            "command": "-gitlens.diffLineWithWorking",
            "when": "editorTextFocus && gitlens:keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
        },
        {
            "key": "ctrl+shift+g .",
            "command": "-gitlens.diffWithNext",
            "when": "editorTextFocus && gitlens:keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
        },
        {
            "key": "ctrl+shift+g ,",
            "command": "-gitlens.diffWithPrevious",
            "when": "editorTextFocus && !isInDiffEditor && gitlens:keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
        },
        {
            "key": "ctrl+shift+g ,",
            "command": "-gitlens.diffWithPreviousInDiff",
            "when": "isInDiffEditor && gitlens:keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
        },
        {
            "key": "ctrl+shift+g shift+w",
            "command": "-gitlens.diffWithWorking",
            "when": "editorTextFocus && gitlens:keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
        },
        {
            "key": "ctrl+shift+g /",
            "command": "-gitlens.showCommitSearch",
            "when": "gitlens:enabled && gitlens:keymap == 'chorded'"
        },
        {
            "key": "ctrl+shift+g c",
            "command": "-gitlens.showQuickCommitFileDetails",
            "when": "editorTextFocus && gitlens:enabled && gitlens:keymap == 'chorded'"
        },
        {
            "key": "ctrl+shift+g shift+h",
            "command": "-gitlens.showQuickRepoHistory",
            "when": "gitlens:enabled && gitlens:keymap == 'chorded'"
        },
        {
            "key": "ctrl+shift+g h",
            "command": "-gitlens.showQuickFileHistory",
            "when": "gitlens:enabled && gitlens:keymap == 'chorded'"
        },
        {
            "key": "ctrl+shift+g -",
            "command": "-gitlens.showLastQuickPick",
            "when": "gitlens:enabled && gitlens:keymap == 'chorded'"
        },
        {
            "key": "ctrl+shift+g s",
            "command": "-gitlens.showQuickRepoStatus",
            "when": "gitlens:enabled && gitlens:keymap == 'chorded'"
        },
        {
            "key": "ctrl+shift+g g",
            "command": "-workbench.view.scm",
            "when": "gitlens:enabled && gitlens:keymap == 'chorded'"
        },
        {
            "key": "ctrl+shift+g b",
            "command": "-gitlens.toggleFileBlame",
            "when": "editorTextFocus && gitlens:keymap == 'chorded' && gitlens:activeFileStatus =~ /blameable/"
        },
        {
            "key": "ctrl+shift+g shift+b",
            "command": "-gitlens.toggleCodeLens",
            "when": "editorTextFocus && gitlens:canToggleCodeLens && gitlens:enabled && gitlens:keymap == 'chorded'"
        },
        {
            "key": "ctrl+shift+e",
            "command": "-workbench.action.quickOpenNavigatePreviousInFilePicker",
            "when": "inFilesPicker && inQuickOpen"
        },
        {
            "key": "ctrl+shift+e",
            "command": "-extension.runQuery",
            "when": "editorTextFocus && editorLangId == 'sql'"
        },
        {
            "key": "ctrl+k ctrl+e",
            "command": "workbench.files.action.collapseExplorerFolders"
        },
        {
            "key": "ctrl+shift+g .",
            "command": "-gitlens.diffWithNext",
            "when": "editorTextFocus && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
        },
        {
            "key": "ctrl+shift+g ,",
            "command": "-gitlens.diffWithPrevious",
            "when": "editorTextFocus && !isInDiffEditor && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
        },
        {
            "key": "ctrl+shift+g ,",
            "command": "-gitlens.diffWithPreviousInDiff",
            "when": "isInDiffEditor && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
        },
        {
            "key": "ctrl+shift+g shift+w",
            "command": "-gitlens.diffWithWorking",
            "when": "editorTextFocus && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
        },
        {
            "key": "ctrl+shift+g shift+,",
            "command": "-gitlens.diffLineWithPrevious",
            "when": "editorTextFocus && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
        },
        {
            "key": "ctrl+shift+g w",
            "command": "-gitlens.diffLineWithWorking",
            "when": "editorTextFocus && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /tracked/"
        },
        {
            "key": "ctrl+shift+g /",
            "command": "-gitlens.showCommitSearch",
            "when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
        },
        {
            "key": "ctrl+shift+g c",
            "command": "-gitlens.showQuickCommitFileDetails",
            "when": "editorTextFocus && gitlens:enabled && config.gitlens.keymap == 'chorded'"
        },
        {
            "key": "ctrl+shift+g shift+h",
            "command": "-gitlens.showQuickRepoHistory",
            "when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
        },
        {
            "key": "ctrl+shift+g h",
            "command": "-gitlens.showQuickFileHistory",
            "when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
        },
        {
            "key": "ctrl+shift+g -",
            "command": "-gitlens.showLastQuickPick",
            "when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
        },
        {
            "key": "ctrl+shift+g s",
            "command": "-gitlens.showQuickRepoStatus",
            "when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
        },
        {
            "key": "ctrl+shift+g b",
            "command": "-gitlens.toggleFileBlame",
            "when": "editorTextFocus && config.gitlens.keymap == 'chorded' && gitlens:activeFileStatus =~ /blameable/"
        },
        {
            "key": "ctrl+shift+g shift+b",
            "command": "-gitlens.toggleCodeLens",
            "when": "editorTextFocus && gitlens:canToggleCodeLens && gitlens:enabled && config.gitlens.keymap == 'chorded'"
        },
        {
            "key": "ctrl+shift+g g",
            "command": "-workbench.view.scm",
            "when": "gitlens:enabled && config.gitlens.keymap == 'chorded'"
        },
        {
            "key": "alt+w",
            "command": "-gitlens.diffLineWithWorking",
            "when": "editorTextFocus && config.gitlens.keymap == 'alternate' && gitlens:activeFileStatus =~ /tracked/"
        },
        {
            "key": "alt+w",
            "command": "-workbench.action.terminal.toggleFindWholeWordTerminalFocus",
            "when": "terminalFocus"
        },
        {
            "key": "alt+w",
            "command": "-workbench.action.terminal.toggleFindWholeWord",
            "when": "terminalFindWidgetFocused"
        },
        {
            "key": "alt+w",
            "command": "-toggleFindWholeWord",
            "when": "editorFocus"
        },
        {
            "key": "alt+w",
            "command": "-toggleSearchWholeWord",
            "when": "searchViewletFocus && searchViewletVisible"
        },
        {
            "key": "ctrl+shift+,",
            "command": "workbench.action.openGlobalKeybindingsFile"
        },
        {
            "key": "ctrl+shift+,",
            "command": "-editor.action.inPlaceReplace.up",
            "when": "editorTextFocus && !editorReadonly"
        },
        {
            "key": "ctrl+i",
            "command": "editor.emmet.action.incrementNumberByOne"
        },
        {
            "key": "ctrl+shift+i",
            "command": "editor.emmet.action.decrementNumberByOne"
        },
        {
            "key": "ctrl+shift+i",
            "command": "-workbench.action.toggleDevTools",
            "when": "isDevelopment"
        },
        {
            "key": "ctrl+shift+i",
            "command": "-editor.action.formatDocument",
            "when": "editorTextFocus && !editorReadonly"
        },
        {
            "key": "ctrl+r",
            "command": "-workbench.action.openRecent"
        },
        {
            "key": "ctrl+r",
            "command": "-workbench.action.gotoSymbol"
        },
        {
            "key": "ctrl+r r",
            "command": "-npm-script.rerun-last-script"
        },
        {
            "key": "ctrl+r shift+r",
            "command": "-npm-script.run"
        },
        {
            "key": "ctrl+r t",
            "command": "-npm-script.test"
        },
        {
            "key": "ctrl+r l",
            "command": "-npm-script.showOutput"
        },
        {
            "key": "ctrl+r shift+x",
            "command": "-npm-script.terminate-script"
        },
        {
            "key": "ctrl+r",
            "command": "-workbench.action.quickOpenNavigateNextInRecentFilesPicker",
            "when": "inQuickOpen && inRecentFilesPicker"
        },
        {
            "key": "ctrl+r",
            "command": "workbench.action.reloadWindow"
        },
        {
            "key": "ctrl+r",
            "command": "-workbench.action.reloadWindow",
            "when": "isDevelopment"
        },
        {
            "key": "ctrl+k p",
            "command": "-editor.action.marker.prev",
            "when": "editorFocus"
        },
        {
            "key": "ctrl+k p",
            "command": "-workbench.action.files.copyPathOfActiveFile"
        },
        {
            "key": "ctrl+k p",
            "command": "git.push"
        },
        {
            "key": "ctrl+k s",
            "command": "git.sync"
        },
        {
            "key": "ctrl+k s",
            "command": "-workbench.action.files.saveWithoutFormatting"
        },
        {
            "key": "tab",
            "command": "-editor.emmet.action.expandAbbreviation",
            "when": "config.emmet.triggerExpansionOnTab && editorTextFocus && !editorReadonly && !editorTabMovesFocus"
        }
    ]
}

base (minified o):

null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugsettings-sync

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions