code-settings-sync icon indicating copy to clipboard operation
code-settings-sync copied to clipboard

Can't sync settings with error "Invalid / Expired GitHub Token."

Open levblanc opened this issue 8 years ago • 20 comments

I checked every related issue, but couldn't solve my problem.

I tried to regenerate my token several times, coupled with my gist id to download, got the error.

Also tried to generate new tokens several times, and then upload (or create a new gist), got the error.

Really frustrated and don't know what to do.... I really need my settings.

Please please please help.


MacOS: 10.11.6 (EI Capitan) VS Code : 1.28.2 (freshly reinstall today) Settings Sync: 3.2.0

VS Code keep telling me today that it can't update, so I decided to reinstall it.

Before reinstalling, I upload my settings to:

https://gist.github.com/levblanc/ec97529308d0ecf93ffc253f721bcad5 (secret gist, named as cloudSettings, no problems in sync before)

After reinstall, I regenerate my token:

image

my token setting:

image

my gist id setting: image

got the error and there is nothing logged in the debug console: image

levblanc avatar Oct 22 '18 03:10 levblanc

me too

fishinallblue avatar Oct 22 '18 10:10 fishinallblue

me too +1

betsu avatar Oct 22 '18 11:10 betsu

+1 I just installed it today for the first time so not working on a completely fresh either

OrangeDrangon avatar Oct 22 '18 15:10 OrangeDrangon

See the following issues.

https://github.com/shanalikhan/code-settings-sync/issues/321

https://github.com/shanalikhan/code-settings-sync/issues/388#issuecomment-404633809 https://github.com/shanalikhan/code-settings-sync/issues/408

shanalikhan avatar Oct 22 '18 15:10 shanalikhan

This is broken for me as well, none of the resolutions in #321, #388, or #408 have worked for me. Sync was working up until approximately 8 days ago.

gwritz avatar Oct 24 '18 17:10 gwritz

@gwritz , @OrangeDrangon , @betsu , @fishinallblue you guys are also using Mac or which platform ?

can you show the image of developer console also when this problem happens.

shanalikhan avatar Oct 29 '18 09:10 shanalikhan

screenshot from 2018-10-29 08-27-57

gwritz avatar Oct 29 '18 14:10 gwritz

I am on Ubuntu 18.04.

gwritz avatar Oct 29 '18 14:10 gwritz

I am on Windows 10

OrangeDrangon avatar Oct 29 '18 14:10 OrangeDrangon

I am on win 10

betsu avatar Nov 02 '18 09:11 betsu

windows 10 as well here

cmario92 avatar Nov 06 '18 18:11 cmario92

UPDATE: I copied my old gist id (you can find this by going to a gist and copying the last part of the URL), manually entered it into my VSCode settings "sync.gist": "gistID", uploaded settings (shift + alt + u) and it worked! So there is some missing documentation, it would seem.

image

Getting the same or similar issue on MacOS 10.14 VSCode 1.29.1.

I reset my settings, generated a new GitHub token, tried to upload settings (shift + alt + u) and got this error.

image

  | t.onDidNotificationChange | @ | notificationsAlerts.ts:40
-- | -- | -- | --
  | (anonymous) | @ | notificationsAlerts.ts:26
  | e.fire | @ | event.ts:145
  | t.notify | @ | notifications.ts:113
  | t.notify | @ | notificationService.ts:52
  | e._showMessage | @ | mainThreadMessageService.ts:83
  | e._showMessage | @ | mainThreadMessageService.ts:44
  | e.$showMessage | @ | mainThreadMessageService.ts:38
  | t._doInvokeHandler | @ | rpcProtocol.ts:439
  | t._invokeHandler | @ | rpcProtocol.ts:424
  | t._receiveRequest | @ | rpcProtocol.ts:341
  | t._receiveOneMessage | @ | rpcProtocol.ts:271
  | (anonymous) | @ | rpcProtocol.ts:146
  | e.fire | @ | event.ts:145
  | a | @ | ipc.net.ts:103
  | n._socketDataListener | @ | ipc.net.ts:132
  | emitOne | @ | events.js:116
  | emit | @ | events.js:211
  | addChunk | @ | _stream_readable.js:263
  | readableAddChunk | @ | _stream_readable.js:250
  | Readable.push | @ | _stream_readable.js:208
  | onread | @ | net.js:594

tillydray avatar Dec 10 '18 14:12 tillydray

Were you guys able to set it up correctly like @JasonMFry ?

Troubleshooting page is created here.

Anyone, who has fixed the problem like users above can add information there to help other guys. https://github.com/shanalikhan/code-settings-sync/wiki/Troubleshooting

shanalikhan avatar Dec 13 '18 10:12 shanalikhan

@levblanc Solution to me: my friend 1st: Sync: Reset Extension Settings 2nd: Generate access token 3rd: Paste the generated token into vscode by pressing {Ctrl+Shift+p > paste} 4th: Go to your user https://gist.github.com/{user_name}/{gitst_id} and copy the gist_id 5th: Go to vscode and open settings.json file and add

"sync.gist": "gist_id",
"sync.autoDownload" : true

Restart vscode.

Done!

Hope it helps!

EvangelosKolimitras avatar Mar 12 '19 15:03 EvangelosKolimitras

@levblanc Solution to me: my friend 1st: Sync: Reset Extension Settings 2nd: Generate access token 3rd: Paste the generated token into vscode by pressing {Ctrl+Shift+p > paste} 4th: Go to your user https://gist.github.com/{user_name}/{gitst_id} and copy the gist_id 5th: Go to vscode and open settings.json file and add

"sync.gist": "gist_id",
"sync.autoDownload" : true

Restart vscode.

Done!

Hope it helps!

This worked for me . Thanks a ton!!

yourgotocoder avatar Jun 10 '19 14:06 yourgotocoder

@levblanc Solution to me: my friend 1st: Sync: Reset Extension Settings 2nd: Generate access token 3rd: Paste the generated token into vscode by pressing {Ctrl+Shift+p > paste} 4th: Go to your user https://gist.github.com/{user_name}/{gitst_id} and copy the gist_id 5th: Go to vscode and open settings.json file and add

"sync.gist": "gist_id",
"sync.autoDownload" : true

Restart vscode.

Done!

Hope it helps!

this is not a solution, but a instruction. The author, who create this question, already have a settings, and he want to come back it.

seriiserii825 avatar Jun 22 '19 10:06 seriiserii825

Just follow these steps:

image

Then reload your VS code it should take the token automatically. If it didn't, then try the following:

image

After you login into your GitHub account, it should work just fine.

Please let me know if this helped.

Thank you.

Anas-Alhariri avatar May 25 '21 03:05 Anas-Alhariri

The solution posted by @Anas-Alhariri works... sort of... It ends up discarding your existing gist and creating a new one. The ability to update your token -- something that's bound to come up now and again -- should not be buried several levels deep. As far as I can tell, nowhere in the official instructions or extension settings does it indicate how to do this, which IMHO is a serious UX issue.

robertmarriott avatar Sep 01 '21 06:09 robertmarriott

  1. shift + alt + p
  2. type "sync"
  3. look for reset extension settings
  4. press shift + alt + u
  5. you can login again

steffenu avatar Nov 19 '21 18:11 steffenu

Thanks for the info. Besides the issue above, I also encountered another one with the same error. One of the extensions in the gist file can't be found and stopped the process, I ended up manually removing the entry from the gist file.

yzhanggithub avatar Jan 17 '22 13:01 yzhanggithub