Giter VIP home page Giter VIP logo

shanalikhan / code-settings-sync Goto Github PK

View Code? Open in Web Editor NEW
4.0K 54.0 389.0 9 MB

๐ŸŒด๐Ÿ’ช Synchronize your Visual Studio Code Settings Across Multiple Machines using GitHub GIST ๐Ÿ’ช๐ŸŒด

Home Page: https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync

License: MIT License

TypeScript 81.37% Shell 0.12% JavaScript 8.95% HTML 7.54% CSS 2.02%
gist settings-sync sync vscode-extension vscode-sync github-gist visual-studio-code

code-settings-sync's Introduction

Settings Sync Tweet Follow

Previously known as Visual Studio Code Settings Sync

Version Travis Greenkeeper badge Master course

Support

While being free and open source, if you find it useful, please consider supporting it by donating via PayPal or Open Collective. If you are using it in office as a team, please ask your company to support us via Open Collective from just 2$ per month!



*2$ Per Month

Drawing

Type Sync in command Palette in order to view all commands.

Key Features

1. Use your GitHub account token and Gist.
2. Easy to Upload and Download on one click.
3. Show a summary page at the end with details about config and extensions effected.
4. Auto download Latest Settings on Startup.
5. Auto upload Settings on file change.
6. Share the Gist with other users and let them download your settings.
7. Supports GitHub Enterprise
8. Support pragmas with @sync keywords: host, os and env are supported.
9. GUI for changing settings / logging in
10. Allows you to Sync any file across your machines.

It Syncs

All extensions and complete User Folder that Contains
1. Settings File
2. Keybinding File
3. Launch File
4. Snippets Folder
5. VSCode Extensions & Extensions Configurations
6. Workspaces Folder

Shortcuts

1. Upload Key : Shift + Alt + U
2. Download Key : Shift + Alt + D

(on macOS: Shift + Option + U / Shift + Option + D)

Configure Settings Sync

Settings Sync Configuration page will be opened automatically on code start and requires two things to setup:

  1. GitHub Token
  2. GitHub Gist Id

GitHub Token needs to be retrived by your GitHub account while Settings Sync creates GIST if you are first time user.

Following are the steps you need to perform to configure.

  • Click on Login with GitHub .
  • Login GitHub on Browser and close the browser tab once you get Success message.
  • If you are using Settings Sync first time GIST will be created automatically when you upload your settings.
  • If you already have GitHub Gist, new window will be opened to allow you to select the GitHub Gist or Skip to create new Gist.

Login with GitHub

Existing Gist

You can always verify created gist by going to https://gist.github.com and checking for a gist named cloudSettings

Upload Your Settings

Press Shift + Alt + U (macOS: Shift + Option + U)

Type ">Sync" In Command Palette into order download / upload

When downloading or uploading for the first time, the welcome page will automatically open, where you can configure the Settings Sync.

Once you select upload, after uploading the settings. You will see the Summary details with the list of each files and extensions uploaded.

Download your Settings

Press Shift + Alt + D (macOS: Shift + Option + D)

Type ">Sync" In Command Palette into order download / upload

When downloading or uploading for the first time, the welcome page will automatically open, where you can configure the Settings Sync.

Once you select download, after downloading. Settings Sync will display you Summary containing the list of each files and extension being downloaded.

New popup will be opened to allow you to restart the code to apply the settings.

Reset Extension Settings

Select "> Sync : Reset Extension Settings" in the Command Palette to reset your settings

Settings

Settings can be changed through the settings page, which can be accessed through "> Sync : Advanced Options > Open Settings Page"

There are two types of settings in Settings Sync. I will recommend you to read the configurations details here.

Gist Settings

Gist Settings are stored in settings.json file of Code. You can customize the settings in gist settings like:

1. Configure Gist Id (Environment)
2. Configure auto upload / download for GitHub Gist
3. Configure extension sync behaviour
4. Configure force download
4. Configure force upload
6. Configure quiet sync
    "sync.gist": "0c929b1a6c51015cdc9e0fe2e369ea4c",
    "sync.autoDownload": false,
    "sync.autoUpload": false,
    "sync.forceDownload": false,
    "sync.forceUpload": false,
    "sync.quietSync": false,
    "sync.removeExtensions": true,
    "sync.syncExtensions": true

Global Settings

Global settings are present in syncLocalSettings.json inside User folder. These settings will be shared across multiple Gist Environments.

You can customize the sync:

1. Options by which files / folders and settings to exclude from upload.
2. Configure default Gist Environment name.
3. Replace the code settings after downloading.
4. Change the Gist description while creating new one in github.
5. Configure GitHub Enterprise Url
{
    "ignoreUploadFiles": [
        "state.*",
        "syncLocalSettings.json",
        ".DS_Store",
        "sync.lock",
        "projects.json",
        "projects_cache_vscode.json",
        "projects_cache_git.json",
        "projects_cache_svn.json",
        "gpm_projects.json",
        "gpm-recentItems.json"
    ],
    "ignoreUploadFolders": [
        "workspaceStorage"
    ],
    "ignoreExtensions": [],
    "gistDescription": "Visual Studio Code Settings Sync Gist",
    "version": 340,
    "token": "YOUR_GITHUB_TOKEN",
    "downloadPublicGist": false,
    "supportedFileExtensions": [ "json", "code-snippets" ],
    "openTokenLink": true,
    "disableUpdateMessage": false,
    "lastUpload": null,
    "lastDownload": null,
    "githubEnterpriseUrl": null,
    "askGistDescription": false,
    "customFiles": {},
    "hostName": null,
    "universalKeybindings": false,
    "autoUploadDelay": 20
}

I will recommend you to read the configurations details here.

Features

Toggle Auto-Upload on change

Auto-upload is disabled by default. When the settings are changed and saved this feature will automatically start the upload process and save the settings online.

Please make sure you have valid github Token and Gist available to make it work properly.

Select Command "Sync : Advanced Options > Toggle Auto-Upload on Settings Change" command to Turn ON / OFF the auto-upload.

Toggle Auto Download

Auto Download is disabled by default. It will sync all the setting by default when the editor starts. Please make sure you have valid github Token and Gist available to make it work properly.

Select Command "Sync : Advanced Options > Toggle Auto-Download On Startup" command to Turn ON / OFF the auto download.

Toggle Force Download

Force Download is disabled by default. By default, extension won't download the latest settings if you already have the latest downloaded version, but sometimes when you delete some extension locally and don't upload the settings it will still show that you have latest versions by date or time checks, by turning this ON it will always download the cloud settings on startup.

Please make sure you have valid github Token and Gist available to make it work properly.

Select Command "Sync : Advanced Options > Toggle Force Download" command to Turn ON / OFF the force download.

Toggle Force Upload

Force Upload is disabled by default. By default, extension won't upload the settings if the gist has newer or identical content. By turning this ON it will always upload without checking for newer settings in the gist.

Please make sure you have valid github Token and Gist available to make it work properly.

Select Command "Sync : Advanced Options > Toggle Force Upload" command to Turn ON / OFF the force upload.

Toggle Summary

Summary is enabled by default which shows all files and extensions that are added or deleted on a single page. You may turn it off in order to make a upload and download process clean and quiet.

Select Command "Sync : Advanced Options > Show Summary Page On Upload / Download" command to Turn ON / OFF the auto download.

Custom Sync

Settings Sync allows you to sync the files other from User folder. For example, your workspace settings and much more. Its upon you to utilize the full potential of Settings Sync across your machines or your teams machines. Read about custom sync here.

Sync Pragmas

You can even manage which settings you want to ignore from being upload or download. Settings Sync even allows you to manage your home and office computer specific settings even OS related settings in single GitHub Gist. Read details about Sync Pragmas here.

Share Settings Across Teams & Users

If you are looking to share your settings. Read the details here. Settings Sync needs to create new Public GitHub Gist to share your settings with other users.

Troubleshooting

If you ever get into problem while setting up the Settings Sync. You can check our troubleshooting guide that cover those scenarios here, you can also add your solution there if its not available there to help other users.

How To Contribute

You can contribute in different ways. Read the details here

Fix and Earn - You can also earn money by fixing the issues - Check the issues under bounty program here.

Credits

Contributors

Thank you to all the people who have already contributed to Settings Sync!

Backers

Thank you to all our backers! [Become a backer]

Sponsors

Thank you to all our sponsors! (please ask your company to also support this open source project by becoming a sponsor)

License

Version

Version

Installs

Ratings

Master course

Drawing

code-settings-sync's People

Contributors

agross avatar auxves avatar csholmq avatar dlech avatar draptik avatar faliure avatar greenkeeper[bot] avatar karl-lunarg avatar lipis avatar luisurrutia avatar marvinjwendt avatar matt-h avatar michel-kraemer avatar mijien0179 avatar mklement0 avatar mmakarios avatar modelmat avatar nekonenene avatar njkevlani avatar o3ll avatar phding avatar protiumx avatar ryul1206 avatar shanaccelirate avatar shanalikhan avatar sonhanguyen avatar spinarooni avatar victorioberra avatar xconverge avatar zasdfgbnm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

code-settings-sync's Issues

Automatic syncing

I find manual download/upload unnecessary for this extension. Every time I add a snippet, I have to remember to upload my settings to keep it up to date. Is it possible to make this extension to sync data automatically when settings, key bindings or snippets change?

Ideally, I would like to install this extension and forget about it. Just like Chrome settings sync work: You don't need to push a button for syncing to kick in.

Gist ID ?

Hi

The extension asks me for a token but never ask for a gist id ?

Code overhaul

Hi,
I really like the extension but the code is ...nja... so I started a complete code overhaul of the repo's code to make it a little bit less redundant and overall easier to read and debug (had in mind to add some tests), mainly by splitting the code in more files/classes and the extensive use of async/await, which I think is perfect for simplifying the code structure.

I already restructured some code. You can see it here. The problem is that the code changed a lot and I don't want to displease you by making a PR that changes your code so much ๐Ÿ˜Ÿ.

Maybe you can have a look at my fork and say if you would accept such a code overhaul ๐Ÿ˜ถ. If not that's ok with me, then you can close this issue. If you like the changes I would continue and we can discuss and merge.

Request: Ability to administrate a settings (Be the only one that is allowed to push)

Visual Studio Code Version : 1.5.0-insiders
Code Sync Settings Version : (None, right now ... waiting for this implementation)
Operating System : Windows 10 x64

As the title mention it, I would like to be able to use this extension to create a sync between all the vscodes where I work and be the only one that can manage these settings (be the only person that is allowed to push).

Doesn't Prompt for Credentials

Visual Studio Code Version : [ VERSION_HERE ]
Code Sync Settings Version : [ VERSION_HERE ]

When I try to either upload or download settings on a 2nd computer,

  1. it only prompts for the token and gist id, never any credentials;
  2. fails w/ error

[Plugin Host] {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"}
messageService.ts:147 ERROR ! Logged In Console. Please open an issue in Github Repo.e.doShow @ messageService.ts:147e.show @ messageService.ts:131(anonymous function) @ extHostMessageService.ts:80n.undefined.t.Class.derive._oncancel @ winjs.base.raw.js:1901e.showMessage @ extHostMessageService.ts:72e.handle @ abstractThreadService.ts:100c @ ipcRemoteCom.ts:172f @ ipcRemoteCom.ts:120doNTCallback0 @ node.js:420_tickCallback @ node.js:349

Not Found

Visual Studio Code Version : 1.4.0
Code Sync Settings Version : 1.6.3
Operating System : Windows 10

When running command Sync: Download Settings:

[Extension Host] Windows_NT
[Extension Host] {"message":"Not Found",
                                "documentation_url":"https://developer.github.com/v3"}
ERROR ! Logged In Console (Help menu > Toggle Developer Tools). 
Please open an issue in Github Repo using 'Sync : Open Issue' command.

locale.json not supported

Visual Studio Code Version : 1.0.0
Code Sync Settings Version : 1.1.8

It could be really nice to people like me to also support locale.json.

By default my vscode use the fr-CA locale but I want to use the en-US locale instead. To do that I ran the command Changer la langue using the F1 command prompt.

The locale.json is saved under the %APPDATA%/Code/User folder.

You can get more information about that here.

Thanks

Uninstall previous sync extensions

Visual Studio Code Version : 1.2.1
Code Sync Settings Version : 1.3.0
Operating System : Windows 7

Steps to reproduce:

  1. Setup vscode and code-settings-sync in 2 different environments (A and B)
  2. Install an extension in environment A and sync settings.
  3. Download settings in environment B and the extension is installed.
  4. Uninstall the extension in environment B and sync settings. (Check gist and the extension.json file doesn't have the extension).
  5. Download settings in environment A.

Expected situation: The extension is removed.
Actual situation: The extension remains installed.

Suggestion: Add platform-specific sync behaviors

First things first: great extension, thanks for sharing.

For people using VSCode across different platforms, platform-specific behaviors are desirable:

  • It would be nice to have an option to have platform-specific keybindings.json files; for instance, use VSCode on both OS X and Windows, with distinct key bindings. Currently, the settings on whatever platform I happen to upload from are invariably applied to ALL platforms, which in the case of, say, OS X key bindings doesn't make much sense on Windows (different modifier keys, different system-wide shortcuts to avoid, ...). Also, since only one keybindings.json is stored, the different platform versions overwrite each other on uploading.
  • On a less important note: some extensions are platform-specific - such as those that integrate with an application only available on a given platform (e.g., https://marketplace.visualstudio.com/items?itemName=deerawan.vscode-dash, which only makes sense on OS X). I'm not sure such extensions are tagged as such, but if they are, download and installation on an incompatible platform could be skipped.

Feature : Add Proxy Support

Hi,

I have generated an access token correctly as is described in the README, and after entering in the extension an error is shown:

ERROR ! Logged In Console. Please open an issue in Github Repo.

I think this is because I'm behind a corporate proxy.

Could you please have a look into it ?

UPDATE:

I have tested in another PC without the proxy and the key works like a charm !!
I have configured the proxy in my settings. I can see extensions and install it.
Visual Studio Code Version: 0.10.6

Does not work in insider version

Since this week there is an insider version available. See anouncement and download here. It is a standalone program with it's own paths.

Since a lot of paths in this extension are hardcoded. The sync does not work with the new insiders version.

Extension is not using the proxy

Visual Studio Code Version : [ 1.2.1 ]
Code Sync Settings Version : [ 1.3.0 ]
Operating System : [ Windows 7 ]

The extension is not using the defined proxy in settings resulting a timeout.

[Extension Host] Error: connect ETIMEDOUT 192.30.253.116:443 at global.sendError (C:\Users\alexandre.pires\.vscode\extensions\Shan.code-settings-sync-1.3.0\node_modules\github4\lib\index.js:753:19) at C:\Users\alexandre.pires\.vscode\extensions\Shan.code-settings-sync-1.3.0\node_modules\github4\lib\index.js:762:29 at callCallback (C:\Users\alexandre.pires\.vscode\extensions\Shan.code-settings-sync-1.3.0\node_modules\github4\lib\index.js:639:17) at ClientRequest.<anonymous> (C:\Users\alexandre.pires\.vscode\extensions\Shan.code-settings-sync-1.3.0\node_modules\github4\lib\index.js:710:17) at emitOne (events.js:90:13) at ClientRequest.emit (events.js:182:7) at TLSSocket.socketErrorListener (_http_client.js:295:9) at emitOne (events.js:90:13) at TLSSocket.emit (events.js:182:7) at emitErrorNT (net.js:1253:8)

launch.json under .vscode does not sync

Visual Studio Code Version : 1.2.0
Code Sync Settings Version : 1.3.0
Operating System : Win 10

As title. And the launch.json didn't even upload to my gist, all the others are good.

Cannot input initial settings using Insiders build

System

Visual Studio Code Version : 1.4.0-insider (build 2016-07-22)
Code Sync Settings Version : 1.5.0
Operating System : Windows 10 (x64, Version 1511, Build 10586.494)

Steps to Reproduce

  1. Open Visual Studio Code - Insiders
  2. Open the command palette.
  3. Choose Sync: Download Settings.
  4. Extension opens browser (GitHub Settings).
  5. Command palette is no longer open.

Details

Which means I cannot input the access token or repository during initial configuration of the extension. Not entirely sure this is an issue with the extension itself, but the command palette auto-closing seems like expected behaviour (from a quick google search).

Extension sync not working?

using 0.10.8, installed code settings sync, restarted vscode.
Issued download command, supplied gist ID and token
VS Code reports "styles.less.json snipped added successfully", but no further activity.

On the filesystem, I do see some files (packages.json.json, for example) created in appdata\roaming\code\user\snippets.

Has something gone awry or am I missing an instruction somewhere?

Extension is not working behind a proxy

Visual Studio Code Version : [ 1.4 ]
Code Sync Settings Version : [ last on 2016-08-08 ]
Operating System : [ Windows 7 ]

Error: getaddrinfo ENOTFOUND api.github.com api.github.com:443
    at global.sendError (C:\Users\peninni2\.vscode\extensions\Shan.code-settings-sync-1.6.3\node_modules\github4\lib\index.js:753:19)
    at C:\Users\peninni2\.vscode\extensions\Shan.code-settings-sync-1.6.3\node_modules\github4\lib\index.js:762:29
    at callCallback (C:\Users\peninni2\.vscode\extensions\Shan.code-settings-sync-1.6.3\node_modules\github4\lib\index.js:639:17)
    at ClientRequest.<anonymous> (C:\Users\peninni2\.vscode\extensions\Shan.code-settings-sync-1.6.3\node_modules\github4\lib\index.js:710:17)
    at emitOne (events.js:90:13)
    at ClientRequest.emit (events.js:182:7)
    at TLSSocket.socketErrorListener (_http_client.js:295:9)
    at emitOne (events.js:90:13)
    at TLSSocket.emit (events.js:182:7)
    at connectErrorNT (net.js:996:8)

cannot download sync'ed settings

Visual Studio Code Version : [ 1.0 ]
Code Sync Settings Version : [ 1.1.7]

Please make sure to write the versions and console logged error picture or copied text.
Successfully installed code-settings-sync on a windows machine.
Successfully created gist ( and saved token and gist ID)
Successfully uploaded settings to a secret gist

Successfully installed code-settings-sync on a Mac Pro laptop with OS 10.9.5
I type alt-option -d
I enter token
I enter gist ID

get this error:
ERROR ! Logged In Console. Please open an issue in Github Repo.

??

extension download failed

*_Visual Studio Code Version : 1.2.1
*_Code Sync Settings Version : 1.3.0
**Operating System : Win10

Hi, I am opening an issue because there as an error, and code-settings-sync said to open an issue :)

I am not sure that the problem was exactly, because I was able to uninstall- and reinstall the Python extension without any troubles, after seeing this error.

vscode-settings-sync

Error when trying to sync for first time

Visual Studio Code Version : 1.1.1
Code Sync Settings Version : 1.2.3
Operating System : Windows 7

After installation and when I try to sync for first time I get the following error

Cannot read property 'id' of undefined: TypeError: Cannot read property 'id' of undefined at C:\Users\karypch\.vscode\extensions\Shan.code-settings-sync-1.2.3\out\src\githubService.js:61:28 at Object.proto.sendError (C:\Users\karypch\.vscode\extensions\Shan.code-settings-sync-1.2.3\node_modules\github\api\v3.0.0\index.js:32:13) at C:\Users\karypch\.vscode\extensions\Shan.code-settings-sync-1.2.3\node_modules\github\api\v3.0.0\gists.js:133:29 at callCallback (C:\Users\karypch\.vscode\extensions\Shan.code-settings-sync-1.2.3\node_modules\github\index.js:743:17) at IncomingMessage.<anonymous> (C:\Users\karypch\.vscode\extensions\Shan.code-settings-sync-1.2.3\node_modules\github\index.js:793:25) at emitNone (events.js:85:20) at IncomingMessage.emit (events.js:179:7) at endReadableNT (_stream_readable.js:913:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9)e.onUnexpectedError @ workbench.main.js:117 workbench.main.js:90ERROR ! Logged In Console (Help menu > Toggle Developer Tools). Please open an issue in Github Repo.e.doShow @ workbench.main.js:90

No handler found

I really like the idea of this extension, however, when I try to use it, I get the following:

image

Do you have any ideas about what is going on here?

Replace theme on sync

When I sync my settings from other machine, it doesn't replace the theme based on the sync.

Visual Studio Code Version : 1.2.0
Code Sync Settings Version : 1.3.0
Operating System : Windows Server 2012

Does not work with 0.10.8

Hi, I've just tried this extension with VSCode 0.10.8 (January 2016) and it doesn't seem to work - Alt+Shift+u does nothing and I can't see the "Sync" command of the extension in the pallete. Is it compatible with this version?

I am on Windows 10 x64, VS Code's path is "C:\Program Files (x86)\Microsoft VS Code\Code.exe".

Can't download settings

Visual Studio Code Version : 1.3.1
Code Sync Settings Version : 1.4.2
Operating System : Win10

Setting upload was successful.
Maybe i am too dumb, but what should i enter in 2 inputs for first download?
As placeholder says, at first input i should enter Github Personal Access Token, but your readme says that i should enter github account. And the second input is Gist ID - this is my personal access token, right?

Nevertheless, i tried to enter my name + token, my email + token, token + token, and i couldn't figure out what's wrong. Can you help me please?)

P.S. I have multiple git profiles, maybe it somehow relies on my global git username or email?

Update Doc screenshots

Visual Studio Code Version : 1.2
Code Sync Settings Version : 1.3.0
Operating System : Archlinux

I think you need to update the docs in the extension page for generating an access token as the screenshots are outdated and the new github page allows a person to give access to their private repositories. So they might accidently do it.

Incompatible with OS X (And Linux?)

Hello,

I tried to synchronize my settings from my work computer (Windows 10) to my personal one (OS X 10.11) but I cannot get it to work.

When checking the logs, I see that it tries to use windows formatted paths :

Error: ENOENT: no such file or directory, open '/Users/kedareLibrary/Preference\Code\User\token.txt'
at Error (native)

I suppose a simple fix should be to review all the path ( \ vs / and here we miss a "/" between the HOME and the final directory)

cannot reset wrong account token

Visual Studio Code Version : 1.1.1
Code Sync Settings Version : 1.2.3

I wanted to initialize sync. I did set the token wrong in my github account and then I also entered a wrong string when I was asked for the token in the command line of visual studio code (vsc).

I think, I entered the string "default" as access token in vsc

After that, I was not able to get to the command line to reset the token.

Even after deinstallation and reinstallation, the wrong value seemed cached.

Is there a file that I can delete to be able to start again with initialization?

Error says: Please open an issue in Github Repo. Please find attached the console log.

1463600575811.txt

Error while on boarding second system

Looks like an incomplete on boarding but it should provide a better error

Visual Studio Code Version : [ 1.4.0 ]
Code Sync Settings Version : [ 1.6.3 ]
Operating System : [ 10.11.6]

Please make sure to write the versions and console logged error picture or copied text.

[Extension Host] Darwin
[Extension Host] {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"}
[Extension Host] Uncaught Exception:  TypeError: Cannot read property 'id' of undefined
[Extension Host] TypeError: Cannot read property 'id' of undefined
    at /Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/out/src/githubService.js:64:28
    at global.sendError (/Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:755:13)
    at /Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:762:29
    at callCallback (/Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:639:17)
    at IncomingMessage.<anonymous> (/Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:694:25)
    at emitNone (events.js:85:20)
    at IncomingMessage.emit (events.js:179:7)
    at endReadableNT (_stream_readable.js:913:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
Cannot read property 'id' of undefined: TypeError: Cannot read property 'id' of undefined
    at /Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/out/src/githubService.js:64:28
    at global.sendError (/Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:755:13)
    at /Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:762:29
    at callCallback (/Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:639:17)
    at IncomingMessage.<anonymous> (/Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:694:25)
    at emitNone (events.js:85:20)
    at IncomingMessage.emit (events.js:179:7)
    at endReadableNT (_stream_readable.js:913:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
ERROR ! Logged In Console (Help menu > Toggle Developer Tools). Please open an issue in Github Repo using 'Sync : Open Issue' command.
[Extension Host] Darwin
[Extension Host] {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"}
[Extension Host] Uncaught Exception:  TypeError: Cannot read property 'id' of undefined
[Extension Host] TypeError: Cannot read property 'id' of undefined
    at /Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/out/src/githubService.js:64:28
    at global.sendError (/Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:755:13)
    at /Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:762:29
    at callCallback (/Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:639:17)
    at IncomingMessage.<anonymous> (/Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:694:25)
    at emitNone (events.js:85:20)
    at IncomingMessage.emit (events.js:179:7)
    at endReadableNT (_stream_readable.js:913:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
Cannot read property 'id' of undefined: TypeError: Cannot read property 'id' of undefined
    at /Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/out/src/githubService.js:64:28
    at global.sendError (/Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:755:13)
    at /Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:762:29
    at callCallback (/Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:639:17)
    at IncomingMessage.<anonymous> (/Users/{me}/.vscode/extensions/Shan.code-settings-sync-1.6.3/node_modules/github4/lib/index.js:694:25)
    at emitNone (events.js:85:20)
    at IncomingMessage.emit (events.js:179:7)
    at endReadableNT (_stream_readable.js:913:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
ERROR ! Logged In Console (Help menu > Toggle Developer Tools). Please open an issue in Github Repo using 'Sync : Open Issue' command.

Cannot Upload settings

Visual Studio Code Version : 1.3.1
Code Sync Settings Version : 1.6.3
Operating System : Win10

image

error after update to `v1.2.2`

Overview

Visual Studio Code Version : (v1.1.0 :: microsoft/vscode@c212f09) according to Help -> About
Code Sync Settings Version : v1.2.2
*TypeScript Version:* ^1.9.0-dev.20160514(nightly)

  • specified via "typescript.tsdk": "./node_modules/typescript/lib" in my ./vscode/settings.json
  • the issue appears to be unrelated to using the "unstable" dev build

Rundown:

  • Today I updated from v1.2.1 to v1.2.2. It was working find yesterday
  • I run the update task from the command pallet
  • Get Error ๐Ÿ˜ญ

Data

Got this error via notification in the workspace, Cannot find module './package.json'
Then there's a bunch more in the console, but here's the important part. The rest is included below.

shell.ts:416 Cannot find module './package.json': Error: Cannot find module './package.json'

expand to view full stack traces and error Object

4 things got logged to my console in Developer Tools

first exception
shell.ts:416 Cannot find module './package.json': Error: Cannot find module './package.json'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Function.N.n._load (c:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:17:18321)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Commons.<anonymous> (C:\Users\rozzzly\.vscode\extensions\Shan.code-settings-sync-1.2.2\out\src\commons.js:22:25)
    at next (native)
    at C:\Users\rozzzly\.vscode\extensions\Shan.code-settings-sync-1.2.2\out\src\commons.js:7:65
    at __awaiter (C:\Users\rozzzly\.vscode\extensions\Shan.code-settings-sync-1.2.2\out\src\commons.js:3:12)
    at Commons.InitSettings (C:\Users\rozzzly\.vscode\extensions\Shan.code-settings-sync-1.2.2\out\src\commons.js:19:16)e.onUnexpectedError @ shell.ts:416(anonymous function) @ shell.ts:318e.onUnexpectedError @ errors.ts:73u @ errors.ts:88(anonymous function) @ winjs.base.js:45(anonymous function) @ winjs.base.js:40
winjs.base.js:47 WARNING: Promise with no error callback:201
WARNING: Promise with no error callback:201
seperate error object logged to console

( I used JSON.stringify(temp1, null, '\t') to make it presentable )

{
    "exception": null,
    "error": {
        "name": "Error",
        "message": "Cannot find module './package.json'"
    },
    "promise": {
        "_oncancel": null,
        "_nextState": null,
        "_state": {
            "name": "error",
            "done": null,
            "then": null
        },
        "_listeners": null,
        "_value": {
            "name": "Error",
            "message": "Cannot find module './package.json'"
        },
        "_isException": false,
        "_errorId": 201
    },
    "id": 201
}
second exception
Cannot find module './package.json'                                                     messageService.ts:108

e.doShow @ messageService.ts:128
e.show @ messageService.ts:112
e.resume @ messageService.ts:71
(anonymous function) @ workbench.ts:343
e.invoke @ callbackList.ts:63e.fir
e @ event.ts:107
(anonymous function) @ quickOpenController.ts:467

Mitigation (Workaround Found)

  • uninstall --> restart --> reinstall --> restart --> run upload command via command pallet

    Same message. No effect.

  • Try to restore the package.json

    Steps to Resolve
    1. Locate this extension in the VS Code extension directory
    • Found path in stack trace:

    • C:\Users\rozzzly\.vscode\extensions\Shan.code-settings-sync-1.2.2

    • Extension's root directory contains a package.json

      Note: the full line from the stack trace was actually:
      ..\Shan.code-settings-sync-1.2.2\out\src\commons.js:22:25

    1. copy ./package.json to ./out/src/
    2. re-run command from the pallet; it works!

sounds like something is off in your build script

[Bug] Not Syncing

Visual Studio Code Version : [ 1.4.0]
Code Sync Settings Version : [ 1.6.3]
Operating System : [ Windows 10 w/ Anniversary Update ]

I set up my Gist ID and Token OK, but every time I try to download I get only this message:
capture
And everything else halts.
I've let it for some time, but nothing happens.
I tried:

  • Restarting VS Code
  • Uninstalling extension/ Deleting settings files / Re-installing

Preview upload

It would be nice to have an additional option that displays a preview of the changes to be uploaded as a diff.

Silent first-upload failure when launch.json is missing in the user settings directory

Hi there, I'm trying to get the extension to work and encountered an issue where the initial settings upload would silently fail after entering a valid Github API token (no message displayed, nothing happens).

I downloaded the extension's source, ran it with the debugger and saw that there was a file not found exception where the extension tries to access the launch.json file (which didn't exist on my machine, for some reason).

The extension assumes this file exists, but it should not:
/Users/[username]/Library/Application Support/Code/User/launch.json

Adding a launch.json file (with an empty root) fixes the initial upload on my machine.

I suppose there are other similar assumptions about file existence that would need fixing to make the extension more robust. I hope this helps!

Not working with Insiders build

*_Visual Studio Code Version : 0.10.14-insider
*_Code Sync Settings Version : 1.0.0

Please make sure to write the versions and console logged error picture or copied text.

Hi,

I am using the insiders build and it installs into a separate directory, and it looks like when I sync my settings down into it, they update the files in the directory C:\Users\jsummerton\AppData\Roaming\Code\User instead of C:\Users\jsummerton\AppData\Roaming\Code - Insiders\User

Error when trying to download on other pc

Visual Studio Code Version : [ 1.2.1]
Code Sync Settings Version : [ 1.3.0]
Operating System : [ win10]

Please make sure to write the versions and console logged error picture or copied text.

[Extension Host] {"message":"Not Found","documentation_url":"https://developer.github.com/v3"}
ERROR ! Logged In Console (Help menu > Toggle Developer Tools). Please open an issue in Github Repo.

  1. Entered Personal Access Token (something like 8997e8c316b6fe2bd943dd336d16d7486535e2a6)
  2. GIST ID???? -> No idea what this is. Is it the name of the token (e.g. VS_CODE)

Don't commit vsix files

Commiting all versions of the vsix files is a bad idea. They are zip files that contain all dependencies (node_modules) and can be very large. They are binary so they are not handled by git well. Your repo will quickly grow to infinity. Instead, I recommend you to use GitHub's releases system. It uses git tags and you can add binaries like vsix files.

Awesome plugin though!

Status bar icon

While installing extensions - status bar extension icon should be in loading state (the same as installing extensions by default).

Sync does not work if VSCode is launched from shell.

Visual Studio Code Version : [ 1.1.1 ]
Code Sync Settings Version : [ 1.2.3 ]
Operating System : [ Mac OS X 10.11.5 ]

If VSCode is launched from shell via code command, syncing will fail with error:

ERROR ! Logged In Console (Help menu > Toggle Developer Tools). Please open an issue in Github Repo.

The same error will occur if VSCode is launched from shell via open -a "visual studio code".

If quit VSCode and launched it as normal application from Finder or Spotlight, the sync works fine without problem.

Change Access Token

Hello, it seems that if I needed to move from one git account to another I am not able to change my access token. I run both Windows 10 and Fedora 23. If you could enable a account change option that would be great. I have also tried to remove the plugin and re install and it still fails.

Steve

Republish with new vsce version

The old version of vsce (the publishing tool) was not very advanced in the way it ignored devDependency node_modules. Because of that the current published code-settings-sync extension contains a lot of unused packages: 128 node dependency packages but only 10 are actually used! Since then we improved this (see microsoft/vscode-vsce#58) and with the new version v1.1.0 only productive dependencies are uploaded.

Just don't forget to update vsce before publishing the next time ๐Ÿ˜„

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.