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

Pyright will cause gnome desktop login failure. #2382

Closed
hongyi-zhao opened this issue Oct 6, 2021 · 9 comments
Closed

Pyright will cause gnome desktop login failure. #2382

hongyi-zhao opened this issue Oct 6, 2021 · 9 comments

Comments

@hongyi-zhao
Copy link

I'm using Ubuntu 20.04.2 LTS, and installed pyright as follows:

$ sudo npm install -g pyright

But after I restart the OS, it will trigger the "Oh no! Something went wrong" screen and cause the gnome desktop login failure. After I remove pyright by the following command, the problem dissapeared:

$ sudo npm uninstall pyright

Any hints for this problem will be highly appreciated.

Regards,
HZ

@JelleZijlstra
Copy link
Contributor

That's going to be a hard one to figure out. Does your OS provide any logs that could hint at how pyright is breaking login?

@hongyi-zhao
Copy link
Author

hongyi-zhao commented Oct 7, 2021

There seems to be no valuable information:

werner@X10DAi-00:/var/log$ rg -uu -i '\bpyright' .
./ubuntu-advantage.log: Permission denied (os error 13)
./btmp: Permission denied (os error 13)
./speech-dispatcher: Permission denied (os error 13)
./private: Permission denied (os error 13)
./gdm3: Permission denied (os error 13)
./btmp.1: Permission denied (os error 13)
./installer/debug: Permission denied (os error 13)
./installer/casper.log: Permission denied (os error 13)
./installer/version: Permission denied (os error 13)
./installer/syslog: Permission denied (os error 13)
./installer/partman: Permission denied (os error 13)
./lightdm/seat0-greeter.log.1.gz: Permission denied (os error 13)
./lightdm/seat0-greeter.log.2.gz: Permission denied (os error 13)
./lightdm/lightdm.log: Permission denied (os error 13)
./lightdm/lightdm.log.2.gz: Permission denied (os error 13)
./lightdm/x-0.log.1.gz: Permission denied (os error 13)
./lightdm/x-0.log: Permission denied (os error 13)
./lightdm/seat0-greeter.log: Permission denied (os error 13)
./lightdm/lightdm.log.1.gz: Permission denied (os error 13)
./lightdm/x-0.log.2.gz: Permission denied (os error 13)
./auth.log
77326:Oct  6 11:20:27 X10DAi-00 sudo:   werner : TTY=pts/7 ; PWD=/home/werner/Public/repo/git.savannah.gnu.org/git/emacs ; USER=root ; COMMAND=/usr/bin/npm update -g pyright
81432:Oct  6 14:59:39 X10DAi-00 sudo:   werner : TTY=tty2 ; PWD=/home/werner ; USER=root ; COMMAND=/usr/bin/npm uninstall -g pyright
81538:Oct  6 15:01:27 X10DAi-00 sudo:   werner : TTY=pts/1 ; PWD=/home/werner ; USER=root ; COMMAND=/usr/bin/npm uninstall pyright
werner@X10DAi-00:/var/log$ sudo rg -uu -i '\bpyright' .
./auth.log
77326:Oct  6 11:20:27 X10DAi-00 sudo:   werner : TTY=pts/7 ; PWD=/home/werner/Public/repo/git.savannah.gnu.org/git/emacs ; USER=root ; COMMAND=/usr/bin/npm update -g pyright
81432:Oct  6 14:59:39 X10DAi-00 sudo:   werner : TTY=tty2 ; PWD=/home/werner ; USER=root ; COMMAND=/usr/bin/npm uninstall -g pyright
81538:Oct  6 15:01:27 X10DAi-00 sudo:   werner : TTY=pts/1 ; PWD=/home/werner ; USER=root ; COMMAND=/usr/bin/npm uninstall pyright
werner@X10DAi-00:/var/log$ sudo -i
root@X10DAi-00:~# cd /var/log
root@X10DAi-00:/var/log# rg -uu -i '\bpyright' .
./auth.log
77326:Oct  6 11:20:27 X10DAi-00 sudo:   werner : TTY=pts/7 ; PWD=/home/werner/Public/repo/git.savannah.gnu.org/git/emacs ; USER=root ; COMMAND=/usr/bin/npm update -g pyright
81432:Oct  6 14:59:39 X10DAi-00 sudo:   werner : TTY=tty2 ; PWD=/home/werner ; USER=root ; COMMAND=/usr/bin/npm uninstall -g pyright
81538:Oct  6 15:01:27 X10DAi-00 sudo:   werner : TTY=pts/1 ; PWD=/home/werner ; USER=root ; COMMAND=/usr/bin/npm uninstall pyright

@erictraut
Copy link
Collaborator

I'm at a loss for what to do with this bug. Pyright is a normal npm package, so I don't see how it should cause problems for gnome desktop. I think you'll need to find someone with expertise with gnome desktop and ask them for help.

One potential workaround is to avoid installing pyright globally. Use npm install pyright to install it in the current directory only. Then use npx pyright from that directory to execute it.

@erictraut
Copy link
Collaborator

@hongyi-zhao, were you able to find help from anyone with expertise with gnome desktop? Did my suggested workaround work for you?

My inclination is to close this issue because I don't think there's anything pyright can do to address this.

@erictraut erictraut added the question Further information is requested label Oct 8, 2021
@hongyi-zhao
Copy link
Author

Due to another issue reported here, it's useless and difficult for me to do further testing on pyright.

@erictraut
Copy link
Collaborator

OK, thanks for the update. I'm going to close this for now because I don't think there's anything we can do. If you learn more or have any other ideas, please post back, and we'll revisit the topic.

@hongyi-zhao
Copy link
Author

hongyi-zhao commented Oct 14, 2021

One potential workaround is to avoid installing pyright globally. Use npm install pyright to install it in the current directory only. Then use npx pyright from that directory to execute it.

Thank you for your advice, but I prefer the following method noted here, which is more portable :

$ yarn global add pyright
$ export PATH=$HOME/.yarn/bin:$PATH

@jakebailey
Copy link
Member

"global" is a bit different when you're using sudo (which is what the original issue did). I use the same method you do to install it "globally" to my user.

@hongyi-zhao
Copy link
Author

hongyi-zhao commented Oct 14, 2021

Yep. See here for the method I used now. And this will also avoid the gnome desktop problem I reported here.

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

No branches or pull requests

4 participants