shanalikhan / code-settings-sync

🌴💪 Synchronize your Visual Studio Code Settings Across Multiple Machines using GitHub GIST 💪🌴
https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync
MIT License
4.02k stars 390 forks source link

Sync: GIST NOT SAVED when uploading settings to gist #1039

Open taigi100 opened 5 years ago

taigi100 commented 5 years ago

🐛 Describe the bug
I'm trying to set up my sync, used to work find but today I noticed I'm getting the following error when trying to upload settings: image

🌴 Visual Studio Code Version : [ 1.38 ] 🌴 Code Settings Sync Version : [3.4.2 ] 🌴 Operating System : [ Windows 10 ] 🌴 Occurs On: [Upload] 🌴 Proxy Enabled: [ No ] 🌴 Gist Id: [0ff283486d00810e5af0740e91352207]

vitorhmcorreia commented 5 years ago

Hello,

I'm having the same issue:

image

Version: 1.38.0 (user setup) Commit: 3db7e09f3b61f915d03bbfa58e258d6eee843f35 Date: 2019-09-03T21:49:13.459Z Electron: 4.2.10 Chrome: 69.0.3497.128 Node.js: 10.11.0 V8: 6.9.427.31-electron.0 OS: Windows_NT x64 10.0.18362

vitorhmcorreia commented 4 years ago

Has anyone experienced the same issue?

vitorhmcorreia commented 4 years ago

I have uninstalled and reinstalled the extension, even creating a new GIST, but to no avail. Also tried with a different github account, but the behaviour stays the same.

shanalikhan commented 4 years ago

It should be fixed on the latest version of Settings Sync v3.4.3. Let me know if it persist. I will reopen this issue.

vitorhmcorreia commented 4 years ago

Hey!

I've installed the updated version but unfortunately, the error persists:

image

Should I completely remove the extension and try again? Is there any "special" procedure I should follow?

Best regards.

shanalikhan commented 4 years ago

Try removing the extension and restarting the code and installing extension. Then reset the extension settings and try to upload on new gist.

@vcorreia

vitorhmcorreia commented 4 years ago

Try removing the extension and restarting the code and installing extension. Then reset the extension settings and try to upload on new gist.

@vcorreia

Followed your steps, but got the same error:

image

shanalikhan commented 4 years ago

Okay, can you upload your Users folder in compressed form ( removing confidential things) so i will try to reproduce it later? I will update the GitHub api too to the latest version as a part of next release of Settings Sync.

vitorhmcorreia commented 4 years ago

Which folder, exactly? I'm using a corporate machine, due to group policies I don't have access to all folders.

taigi100 commented 4 years ago

I've also updated to latest version, and check it out. Same error as @vcorreia. I'm on a personal machine so I don't have corporate issues. I'm working from a windows machine and not sure which folder you want?

vitorhmcorreia commented 4 years ago

Hello everyone,

I've been caught up by work and have not had a chance to see if the issue had any updates. @taigi100 , have you had any luck syncing your settings?

shanalikhan commented 4 years ago

I'm using a corporate machine, due to group policies I don't have access to all folders.

@vcorreia and @taigi100 User folder contains your settings.json and other files. I like to reproduce this error on the files you have. So you need to share the folder in compressed form (you can remove the confidentials files)

taigi100 commented 4 years ago

@vcorreia nope, still not working

@shanalikhan mentioned of a User folder. With some googling I think he is referring to %AppData%/Code/User. I have attached my settings.json and syncsettings below

User.zip

jtuttas commented 4 years ago

I have exact the same Problem, with a german error message.

Because I used the Profile Switcher Extension (aaronpowell.vscode-profile-switcher) my settings.json is about 966 Lines long. May be this could caused the problem?

jtuttas commented 4 years ago

@taigi100 I can see that u uses this extension too !

@shanalikhan can this be the problem? Is there a max size for a gist?

jtuttas commented 4 years ago

Yeah, after removing the extension everything works likes expected ! :-) !

shanalikhan commented 4 years ago

Because I used the Profile Switcher Extension (aaronpowell.vscode-profile-switcher) my settings.json is about 966 Lines long.

What really is there in 966 lines of configurations?

I have to see how GitHub limit users in Gist in terms of length.

taigi100 commented 4 years ago

@jtuttas @shanalikhan I've created a test gist: https://gist.github.com/taigi100/71a1a13f1cbeff5a818b7ae47731dd52 It's bigger (~ 40k lines) seems to work well. Maybe it's an upload size issue? Some timeouts? I don't know.

zed-dz commented 4 years ago

"This gist exceeds the recommended number of files (~10). To access all files, please clone this gist. To share more, create a repository."

image

vitorhmcorreia commented 4 years ago

Guys,

After removing the extension Profile Switcher Extension, I was also able to sync properly!

vitorhmcorreia commented 4 years ago

Guys,

After removing the extension Profile Switcher Extension, I was also able to sync properly!

Spoke too soon... First sync worked, but the next did not.

I deleted my gists and did a settings reset. Was able to sync properly the first time, but after that it fails again.

It sure seems to be hitting some sort of upload limit. If I delete the only GIST I have for code-settings and try to upload, it works (for the first run).

mcollier commented 4 years ago

FYI - Removal of Profile Switcher seemed to resolve the problem for me.

taigi100 commented 4 years ago

@vcorreia @mcollier In my case deleting profile switcher isn't really an option, looked a long time for it. The combination of sync and profile switcher was amazing tho.

shanalikhan commented 4 years ago

Can you guys open issue on Profile Switcher and let author know about it, linking this issue.

I have tried on Ubuntu, Windows and its working perfectly. I will try to spend some time on it later on.

mcollier commented 4 years ago

@shanalikhan I'm going to try some more. Likely re-enabling Profile Switcher and observe results. The challenge I'm having is understanding _why__ Settings Sync is unable to save. Is there a way to get more detailed debugging information from Settings Sync that may show what failed? For example, is there a way to see the error coming from GitHub, as @Zed-M suggested earlier?

vitorhmcorreia commented 4 years ago

Can you guys open issue on Profile Switcher and let author know about it, linking this issue.

I have tried on Ubuntu, Windows and its working perfectly. I will try to spend some time on it later on.

Thank you for your investment on this issue. I have tried all combinations, including a fresh vscode installation, with only sync extension installed and even that has not worked :|

shanalikhan commented 4 years ago

I will try to spend some time on it later on.

@mcollier and @taigi100

Can you guys provide me concrete steps to reproduce it (including installing profile switcher). I will get the settings from https://github.com/shanalikhan/code-settings-sync/issues/1039#issuecomment-537976629

I have tried all combinations, including a fresh vscode installation, with only sync extension installed and even that has not worked :|

@vcorreia

Are you getting this same exception on event fresh install and Settings Sync configured. Can you post your console logs?

taigi100 commented 4 years ago

@shanalikhan I'm not sure I would be able to provide some exact steps. It's one of those bugs that seemed to work find and then suddenly stopped working. I'll try to check it out more in depth after I'm done with some current projects I'm working on.

aaronpowell commented 4 years ago

👋 Howdy all, author of Profile Switcher here.

Let me know what I can do to help debug/resolve this. If it seems there's a problem that the max size of a gist is being hit (is there a max size, I'm unsure) I'll have to think more creatively around how the extensions are tracked for profiles. (I'm aware that the extension tracking support I added caused the settings.json file to explode in size.)

jpsantos7 commented 4 years ago

@shanalikhan I don't have profile-switcher and I still get the error.

"This gist exceeds the recommended number of files (~10). To access all files, please clone this gist. To share more, create a repository."

image

If I remove the gist and upload again it creates a new one, but on the second upload it fails again.

vitorhmcorreia commented 4 years ago

@shanalikhan I don't have profile-switcher and I still get the error.

"This gist exceeds the recommended number of files (~10). To access all files, please clone this gist. To share more, create a repository." image

If I remove the gist and upload again it creates a new one, but on the second upload it fails again.

Same here. I've been using code-settings this way, by deleting the first gist and uploading again...

pegasi51b commented 4 years ago

I had the same issue, to solve this problem I add "aaronpowell.vscode-profile-switcher" to list of folders ignored during upload to gist. Settings can be found in %AppData%/Code/syncLocalSettings.json.

dougwaldron commented 4 years ago

I had the same issue, but with the webhint extension. This extension adds the folder webhint.vscode-webhint/node_modules/ to the User globalStorage folder, which seems like a mistake. Maybe profile-switcher is doing the same thing?

The node_modules folder contains dozens (hundreds?) of JSON files, which all get uploaded causing the gist to get locked by GitHub.

Maybe a universal fix would be adding node_modules to the default list of ignored folders.

jabacchetta commented 4 years ago

Yeah, with Profile Switcher, both settings.json and globalStorage can become massive.

mcandre commented 4 years ago

:(

snowyu commented 4 years ago

Add node_modules to the ignoreUploadFolders, now all work again.

code ~/.config/Code/User/syncLocalSettings.json

{
    "ignoreUploadFolders": [
        "node_modules",
        "workspaceStorage"
    ],
xiaoyang-chen commented 2 years ago

it maybe be cause by this (https://github.com/shanalikhan/code-settings-sync/issues/1039#issuecomment-549186953), I find %AppData%/Code/History is massive, and then add "History" into syncLocalSettings.json

"ignoreUploadFolders": [
    "History",
    "workspaceStorage"
],

after add it, settings sync work again

xshapira commented 1 year ago

it maybe be cause by this (#1039 (comment)), I find %AppData%/Code/History is massive, and then add "History" into syncLocalSettings.json

"ignoreUploadFolders": [
    "History",
    "workspaceStorage"
],

after add it, settings sync work again

Add node_modules to the ignoreUploadFolders, now all work again.

code ~/.config/Code/User/syncLocalSettings.json

{
    "ignoreUploadFolders": [
        "node_modules",
        "workspaceStorage"
    ],

@xiaoyang-chen, @snowyu

Thank you, guys. Super helpful!

luong-komorebi commented 1 year ago

For this to work again, please remove the old gist, add History to the ignored Folders image And then tirgger an upload again

This failure is because of the size of the history folder, which makes Github Gist API returns with a failure. This feature was release sometimes ago in 1.66 version (called Local History). The reason some people are recently seeing errors is because the folder just got bigger than what Github can handle

estebangarviso commented 1 year ago

I've added node_modules and History to ignored Folders, and it worked.