microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.41k stars 28.62k forks source link

Sync Settings Error on Chrome OS Linux #151784

Closed JessMTermini closed 2 years ago

JessMTermini commented 2 years ago

Issue Type: Bug

This is so frustrating, omg, I have tried everything. The issue started after I did a complete reformat of the linux partition on my chromebook and had to reinstall vs code. I ended up reformating the linux partiton and reinstalling about 3 differenttimes,trying various things...(See post #148033:[https://github.com/microsoft/vscode/issues/148033#issuecomment-1151527731])

After none of that worked, I decided to create a brand new home directory, as in an entire new user profile on my chromebook with it'sown login and everything. It even used a different email address to sign in so it was definately a fresh profile space. (I did this because I wasn't ready to powerwash my computer and I was thinking that maybe some leftover data from linux keyring remained somewhere in my old profile even after repartitioning and I figured this would be the best and fastest way to rule that out.

So as surprised as I am, the issue still remains. Even after 3 more repartitions and completely fresh reinstalls on a brand new user profile on my chromebook, the exact same error still persists! It persists across same and different partitions and same and different user profiles. Each time changing the enable sync settings at the beginning from merge, remote, keep local, while letting all my settings, extensions etc sync and also while unchecking all options so nothing actually syncs but it is being turned on! So it basically turns on, downloads all my extensions and settings and then logs itself out asking me to sign back in again and then continues to log me back out every ten minutes (approx) with that same error upon recurrent logins.

So right now basically I can only use vs code without github or settings sync integration, or basically just as a basic new installation, but even using it that way is no good and doesn't solve anything because I would have to continue to use it this way without ever turning on the sync and well it's no good to me that way. So I am completely at a loss and standstill here. I do not know how to fix it and I cannot use the software this way either! I don't know what else to do. Somebody please help!

Thanks again in advance!

VS Code version: Code 1.68.0 (4af164ea3a06f701fe3e89a2bcbb421d2026b68f, 2022-06-08T11:49:57.055Z) OS version: Linux x64 5.10.110-15808-ge5740beba59b Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Celeron(R) CPU N3350 @ 1.10GHz (2 x 1094)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: disabled_off
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|1, 1, 0| |Memory (System)|2.73GB (2.70GB free)| |Process Argv|--unity-launch| |Screen Reader|no| |VM|100%| |DESKTOP_SESSION|undefined| |XDG_CURRENT_DESKTOP|X-Generic| |XDG_SESSION_DESKTOP|undefined| |XDG_SESSION_TYPE|undefined|
Extensions: none
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonvspyt551cf:30345471 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 vsc1dst:30438360 pythonvs932:30410667 wslgetstarted:30449410 vscscmwlcmt:30465135 cppdebug:30492333 vsclangdc:30486549 ```
JessMTermini commented 2 years ago

Here are some of the screen shots I forgot!!

Screenshot 2022-06-10 2 02 53 PM Screenshot 2022-06-10 1 46 38 PM Screenshot 2022-06-10 1 41 51 PM

TylerLeonhardt commented 2 years ago

@JessMTermini did you try looking at the troubleshooting guide (the button in your screenshot will take you there)?

This error you are seeing means that libsecret isn't set up on your machine. The easiest way to get this working is by installing gnome-keyring:

sudo apt-get update
sudo apt-get install -y gnome-keyring

VS Code needs some sort of vault in order to store the access token securely on your machine. I suggested gnome-keyring because it's the easiest to work with.

btleafar commented 2 years ago

@TylerLeonhardt just tried this method and I got a package providing that functionality and got the same issue described in the thread:

❯ sudo zypper install libsecret
[sudo] password for root: 
Loading repository data...
Reading installed packages...
'libsecret' not found in package names. Trying capabilities.
'libsecret-1-0' providing 'libsecret' is already installed.
Resolving package dependencies...
Nothing to do.

TylerLeonhardt commented 2 years ago

@btleafar What Desktop environment are you using? Some desktop environments might need additional setup with libsecret/gnome-keyring.

btleafar commented 2 years ago

@TylerLeonhardt using KDE on openSUSE Tumbleweed and also intalled KDE neon on another machine and got the same error. You're right, KDE is going to be trickier to configure for vscode, for the rest it has been such a beautiful transition, that I hope latter I don't have to go back to GNOME for the stability and straightforwardness lol... I hope I find a solution for this 🙏

TylerLeonhardt commented 2 years ago

@btleafar you'll want to follow this thread closely: https://github.com/microsoft/vscode/issues/104319

btleafar commented 2 years ago

@TylerLeonhardt thanks a lot for that!, I'll follow it up.

JessMTermini commented 2 years ago

Hi, thanks for everyone who has responded. I am not sure I follow though. My machine shouldn't need any additional setup. I have already been using vs code with no issues whatsoever on this same machine for close to a year now. The problem occurred in a few different instances. I will explain. I am not sure if you are understanding how a Chromebook is setup but it's basically running chrome OS with a built in feature in the chrome OS settings to turn on the Linux development environment, which is basically able to turn the functionality on and off and then once on you can create one Linux shell along with the ability to change the partition size any time you want. It doesn't allow for more than one Linux instance per user profile (so more then one can run on the same machine as long as you have enough hard drive space to go around, but not within the same user space. This means in order to have two shells running You would have to create another user profile on tat Chromebook, log into it and then under that users chrome OS settings ...turn it on...create the partition, etc etc) But everything is set up automatically, there are no other configuration to do, its basically the push of two buttons. Turn developer mode on, then create the shell by choosing the partition size. That's it. With that said, since I've had this machine, like I've said, I have had vs code working fine and have gone through one vs code update but never had to destroy my Linux partition, ie, (to destroy the Linux partition and restore the Linux partition back to the main chrome OS is as simple as turning developer mode back off). And since I've had this machine, I've never actually had any need to do this, so from a brand new Chromebook everything was working out of the box on first attempt. The problem didn't start until I had to destroy my Linux shell and rebuild it. (ie. in chome OS settings, turn developer mode switch to off (deletes the Linux shell/instance/partition, then literally switch it back on, and choose partition size. Wait a few minutes while chrome sets everything up and that's it.) I did't do anything different or out of the ordinary. I installed vs code on the new fresh Linux instance and immediately had the problem from the first time it opened. I then tried a reinstall and logging out of GitHub (to force re-authentication dialog popup) and destroying and recreating a few more Linux instances with fresh installs and complete computer reboots in-between, and NOTHING fixed it. The last thing I tried was to create a new user login on my Chromebook, logged into a completely new user home directory, practically a fresh instance of chrome OS, and that didn't even fix it. So the issue remains either a big somewhere in vs code, a bug somewhere in the GitHub authentication process, or it may have something to do with some Linux keyring settings being left somewhere in the main OS and everything not fully being destroyed upon the partition destruction and recreation causing some sort of conflict on the same machine. Although, being that it's happening across user profiles suggests that it may be a bug somewhere in the authentication process with GitHub because the only thing that links all instances, the only thing all instances had in common I should say, is that my username login and password for GitHub authentication (my keyring information) all remained the same and even in the completely new user profile, (picture brand new never used chrome user profile, running no extensions, has no bookmarks, very first clean run) AND the exact problem upon fresh clean first start of vs code on logging into GitHub is the error message stating that there is a conflict for my sync settings asking me whether to keep local copy, remote copy or merge them! Actually now that I think about it, writing this out like this, that pretty much says it all for me! That's got to be where the problem is. Something is getting caught up in the authentication process. But where I haven't the faintest. This is way out of my scope of expertise! I am so sorry this was so long, but I've seen a few other random people scattered across the web having this same issue so I thought it best to put all the most pertinent information to help you guys maybe be able to solve this across the board once and for all.

JessMTermini commented 2 years ago

Some more information from my terminal that might help:

It might also be useful to note again that #148033 is also running Debian 11 bullseye

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
Static hostname: penguin
Virtualization: lxc
Operating System: Debian GNU/Linux 11 (bullseye)
Kernel: Linux 5.10.110-15808-ge5740beba59b
Architecture: x86-64

Some Chromebook Details:

Google Chrome: 102.0.5005.125 (Official Build) (64-bit)
Revision: 07573b09e385116e620ed12d5ef2402c4bfa929f-refs/branch-heads/5005@{#1159}
Platform: 14695.107.0 (Official Build) stable-channel snappy
Firmware Version: Google_Snappy.9042.253.0
Customization ID: BENTLEY-BIGDADDY
ARC: 8697754
JavaScript: V8 10.2.154.8
User Agent: Mozilla/5.0 (X11; CrOS x86_64 14695.107.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36

Hope this helps!

Lilkedus commented 2 years ago

I am facing a similar issue but on macOS. After signing in to my account on vscode, I get this logged to the console:

Screen Shot 2022-06-23 at 2 28 35 PM
TylerLeonhardt commented 2 years ago

@JessMTermini if you have nodejs installed, you can run this simple one-liner to see if the problem is how your keychain is setup:

npx @emacs-grammarly/keytar-cli find-creds -s vscode-insidersvscode.github-authentication

This is using the following open source package: https://github.com/emacs-grammarly/keytar-cli

What you should get is something like this:

[
  {
    account: 'github.auth',
    password: '....... longggg string ......'
  }
]

NOTE: on macOS I got a system prompt to allow this process to access the keychain... that may or may not be the case for you

If that succeeds, then the problem is not with your keyring.

If that does complain, then the problem is with your keyring and you need to investigate how to properly set up gnome-keyring with whatever your desktop environment is....... or look at the current status of alternatives to gnome-keyring over in this thread: https://github.com/microsoft/vscode/issues/104319#issuecomment-1058254378

TylerLeonhardt commented 2 years ago

@Lilkedus this issue is about Chrome OS. Can you open a new issue and provide the contents of the GitHub Authentication Output or Microsoft Authentication Output whichever account you used to long into.

VSCodeTriageBot commented 2 years ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!