Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stoped to work after update to 2.4.2 #190

Closed
willgm opened this issue Jan 9, 2017 · 34 comments
Closed

Stoped to work after update to 2.4.2 #190

willgm opened this issue Jan 9, 2017 · 34 comments

Comments

@willgm
Copy link

willgm commented Jan 9, 2017

Visual Studio Code Version : 1.8.1
Code Sync Settings Version : 2.4.2
Operating System : Fedora 25
Occurs On: Startup and every time I try to run a sync command
Proxy Enabled: No

Right after I update it to the last version, I got this error message at realod and every time I try to run a sync command:

captura de tela de 2017-01-09 15-49-29

This is the message:
"Error Logged In Console (Help menu > Toggle Developer Tools). You may open an issue using 'Sync : Open Issue' from advance setting command."

I tryed to uninstall and install again, restart the computer and so on. =/

@dylove1010
Copy link

dylove1010 commented Jan 10, 2017

I got this error message too.

Visual Studio Code Version : 1.8.1
Code Sync Settings Version : 2.4.2
Operating System : Windows7 64bit
Occurs On: Startup and every time

@omartan
Copy link

omartan commented Jan 10, 2017

Same here, I now get this error each time I open VSCode

@jb510
Copy link

jb510 commented Jan 10, 2017

Same/Similar issue on OSX.
VSC Version 1.8.0 and 1.8.1
Code Sync: 2.4.2
OSX 10.12.3
2017-01-09 at 6 46 pm

2017-01-09 at 6 48 pm

@shanalikhan
Copy link
Owner

shanalikhan commented Jan 10, 2017

Occurs On: Startup and every time I try to run a sync command

As it runs in on code start. I need to identify please answer

Do you have auto upload enabled or auto download enabled?
Are all the settings are migrated to code configurations?
Is the syncSettings.json file deleted in the User folder?

@shanalikhan shanalikhan added this to the v2.4.3 milestone Jan 10, 2017
@dylove1010
Copy link

auto upload or download is disabled
i did not migrate the settings to code configurations
syncSettings.json is not deleted

@arnaud-lecat
Copy link

+1

@jb510
Copy link

jb510 commented Jan 10, 2017

FYI in my case it was a fresh install. I'd never used/installed this extension before.

@willgm
Copy link
Author

willgm commented Jan 10, 2017

@shanalikhan, I can't see my options, because I'm not able to open up they anymore. =/

I had the same problem with code sync also in my PC:

code-sync-error-windows-10

My sync options are public here:
https://gist.github.com/willgm/d7c954a6bbd12e8e3e79e1b7b01619cf

Coudn't find the syncSettings.json at my windows pc, and I'm not with my Fedora today.

@shanalikhan
Copy link
Owner

shanalikhan commented Jan 10, 2017

Coudn't find the syncSettings.json at my windows pc

Because all the settings from syncsettings.json is now in code settings file, u can check its available and old file is deleted.

.......

Solution
The Gist you have provided has not valid JSON in settings.json , can you please edit it manually and update Also check code settings file is also valid JSON file, as your current settings.json file is not valid and extension is failing in start up due to this in my computer also.

.....

@dylove1010 can you also please provide the GIST you last synced if its possible

@willgm
Copy link
Author

willgm commented Jan 10, 2017

@shanalikhan, I removed the extra comma at the settings.json as you asked, and now code sync is fine again! That was probably the issue.

I'm used to use trailing commas in object literals, as explaned here:
http://www.2ality.com/2013/07/trailing-commas.html

Of course it makes an invalid json, but is a valid ES5 and as VSC never complained about it.

What about give more meaningful feedback for this kind of problems?

@shanalikhan
Copy link
Owner

shanalikhan commented Jan 10, 2017

actually, this is caused by code API itself while saving the old extension setting syncSettings.json content to code settings.json file.

Similar issue is opened already in code.
microsoft/vscode#3641

As its from the API, I will see what can be done from the extension side

@willgm
Copy link
Author

willgm commented Jan 10, 2017

Got it!

Thanks for this great tool man! Keep it up! =)

@shanalikhan
Copy link
Owner

I think this is the problem for other users also.

I'm keeping this issue open and fill show a message to user to make sure it have valid JSON in all the Code configurations files in the next version.

@jb510
Copy link

jb510 commented Jan 11, 2017

Still not working for me. I tried creating a blank syncSettings.json file, changed the error but still didn't work... I tried dropping the content from my settings.json file in there, still didn't work.

At this point I've given up (I don't really need it anymore, I've manually copied settings around as needed).

It does seem a handy tool, although personally I'd rather just put these files in something like dropbox (personally I don't really need to share publicly, just across machines).

@farrajota
Copy link

I have two machines where the syncing doesn't work and another one where it does.

On the machines where it doesn't work, this is what I get as the output messages when attempting to download the gist (made by the other machine where this extension works):

[Extension Host] Linux
[Extension Host] {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"}
[Extension Host] Output omitted for a large object that exceeds the limits
Error Logged In Console (Help menu > Toggle Developer Tools). You may open an issue using 'Sync : Open Issue' from advance setting command.

Do you have any idea of what might be the cause ?

@shanalikhan
Copy link
Owner

@farrajota

Bad credentials

Check this link. #177

@jb510 are you sure you have all the files .json in user folder are valid JSON ? no trailing commas, try with putting simple {} in the settings.json and json files and try again

@farrajota
Copy link

@shanalikhan thanks, that solved my problem.

@jb510
Copy link

jb510 commented Jan 12, 2017

@shanalikhan I tried again, and yes there was a trailing comma in one of the settings files... removing that fixed it and code-settings-sync worked!

Thank you for the helpful tool and the help getting it working!

@edheltzel
Copy link

I was able to resolve this by a simple rest of the extension settings and re-adding the token.
I also uninstalled and reinstalled the extension.

@unional
Copy link

unional commented Jan 14, 2017

IMO you can try to read the json file like this:
https://github.com/palantir/tslint/blob/master/src/configuration.ts#L172-L177

This way you can read json file with comments.

The settings.json has comments in it when first created by vscode. So most users have comments in that file and will receive this error. 🌷

@shanalikhan
Copy link
Owner

shanalikhan commented Jan 14, 2017

Looks like alot of users are having problem. I'm busy nowadays in other work. If anyone can send me pull request i will make release newer version fixing this problem otherwise you guys need to wait until my exams are over 😄 in week or so, i'm sorry for that.

@unional Thanks, i will check it out.

@omartan
Copy link

omartan commented Jan 18, 2017

Sorry I'm a complete newbie at this. So how do I check the settings.json file again?

@shanalikhan
Copy link
Owner

Command prompt

Preferences : Open User Settings

@omartan
Copy link

omartan commented Jan 19, 2017

I just checked my settings.json and it only has my custom settings which is editor.renderIndentGuides, editor.fontSize and editor.fontFamily.

I thought when I first initialised sync is that the GIST ID will be listed here??

Also, is it normal to have 1 error: property expect (11,1)

    // Controls the font family.
    "editor.fontFamily": "'SFNS Display', Menlo, Monaco, 'Courier New', monospace",
} <-- error is at this line

@unional
Copy link

unional commented Jan 19, 2017

You have an extra comma at the end

@omartan
Copy link

omartan commented Jan 19, 2017

Oh nice! That solved the whole error part. So perhaps for sync to work, it needs to have a 0 error in the settings.json file?

@unional
Copy link

unional commented Jan 19, 2017

Yes, because currently it is ready the file as JSON, so for it to work, the file must be valid JOSN. Meaning no extra comma, no comments.

@omartan
Copy link

omartan commented Jan 19, 2017

Comments like this is fine though:

// Controls the font family.

@davidhellmann
Copy link

Same Problem here :/

@omartan
Copy link

omartan commented Jan 21, 2017

@davidhellmann have you checked your user settings JSON file? It must not have any red errors in it.

@brunolm
Copy link

brunolm commented Jan 27, 2017

Same issue for two people I know doing a fresh install.

@omartan
Copy link

omartan commented Jan 27, 2017

@brunolm I had this issue with a fresh install as well, have they checked their settings.json?

shanalikhan pushed a commit that referenced this issue Jan 31, 2017
@shanalikhan
Copy link
Owner

shanalikhan commented Jan 31, 2017

I cant save that file in JSON as i have to use their API to save the settings in settings.json
Code API gives that error while saving the settings.
I have released the newer version in order to give proper error to make it valid JSON to make extension work.
Comments are allowed but i think trailing commas are not allowed.

.......
Solution
Make sure you dont have trailing commas in settings.json file
.....

Iam going to open issue in code and let them know about the API behavior.

You can up vote and give ideas there.

@brunolm
Copy link

brunolm commented Jan 31, 2017

@wheelhot according to one of them he saw this thread and tried to remove trailing commas and all comments, but it still didn't work.

The next day it worked. Maybe he needed to restart something, I don't know exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests