-
Notifications
You must be signed in to change notification settings - Fork 756
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
Doesn't work with VSCode under WSL2 #25
Comments
Sorry, I'm not familiar with this but my extension doesn't hardcode any tmp/ folders. From the error it looks like it could be a permission issue of chrome.exe on tmp folder? Could you try |
@kirsanium I released a new version with the mentioned flags set. I don't know if it'll help but it was mentioned in this thread There is also this troubleshooting guide on how to run puppeteer on WSL https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#running-puppeteer-on-wsl-windows-subsystem-for-linux |
@gencay new version didn't fix the issue on itself. Although I had success opening browser and logging in using the link you provided on how to run puppeteer in WSL, after that VS Code still throws following exception: |
@kirsanium |
For me, installing Chrome on Ubuntu Server 22.04.1 inside WSL2 on Windows 11 worked. Thanks for the tip, I didn't know it was possible to run Chrome on Ubuntu Server WSL2 without a GUI! |
I also tried this extension today in WSL (Debian) and it works perfectly via built-in X11. I just installed Google Chrome in WSL using these commands:
And then just set the 'Chromium Path' in VSCode (ChatGPT extension) to 'google-chrome' (without quotes!) __ It's even easier than I described in #39 for a Remote (SSH) extension. |
Thanks for your comments again @EzYDark. if somebody else could confirm your solution, I will add it to Readme. 🙏🏼 |
Can confirm the solution is working now! Closing the issue, thanks to everyone in the comments, and especially to the amazing extension author <3. |
@kirsanium thanks for confirmation and thanks for your contribution @EzYDark! I updated the readme with references to these issues. |
My WSL2 shell is zsh and with the @EzYDark solution, I get: Unable to login. Make sure to login and keep your browser open. This error may also be due to OpenAI servers down or that it's throttling the requests. Error: Error Failed to launch the browser process! /etc/zsh/zshrc: line 31: key: BackSpace: must use subscript when assigning associative array /etc/zsh/zshrc: line 31: key: "${terminfo[kbs]}": must use subscript when assigning associative array /etc/zsh/zshrc: line 31: key: Home: must use subscript when assigning associative array /etc/zsh/zshrc: line 31: key: "${terminfo[khome]}": must use subscript when assigning associative array /etc/zsh/zshrc: line 31: key: End: must use subscript when assigning associative array /etc/zsh/zshrc: line 31: key: "${terminfo[kend]}": must use subscript when assigning associative array /etc/zsh/zshrc: line 31: key: Insert: must use subscript when assigning associative array /etc/zsh/zshrc: line 31: key: "${terminfo[kich1]}": must use subscript when assigning associative array /etc/zsh/zshrc: line 31: k... |
Tried @EzYDark's solution and got the following error: [4073:4073:0117/165518.793971:ERROR:ozone_platform_x11.cc(238)] Missing X server or $DISPLAY [4073:4073:0117/165518.794004:ERROR:env.cc(255)] Obviously something to do with having X11 tools installed or the display environment variable set correctly but not sure how to proceed as I've tried installing them via these instructions and also tried editing my .zshrc config file to include DISPLAY environment variable. |
I met the same issue and I found that compared to the 'GPT3 open AI key' method this 'browser Auto-login' just can invoke the perfect chatGPT APIs. My environment is: VcXsrv Windows X Server + LXDE Linux desktop + google-chrome and I think the only key point is to let this extension can read the DISPLAY environment variable when it opens the google-chrome in WSL2. I've tried to add the DISPLAY environment in /etc/environment or .bashrc but neither of them can work. while when I open the terminal and use the command line @EzYDark any comments from your sides? |
After restarting my laptop, everything seems to work fine right now. this is my environmental solution: win10(VcXsrv Windows X Server) + ubuntu20.04(LXDE Linux desktop + google-chrome) On win10:
On Ubuntu(WSL2):
|
Thanks for sharing @shencp, If people can confirm this solution happy to take a PR to update the Readme with a reference to your solution. |
Didn't work for me. Failed to install both packages (lxde/google-chrome)
|
I released a new version to fix the |
Set my Chromium path to
/mnt/c/Program Files/Google/Chrome/Application/chrome.exe
, and after hitting login button I get:I believe in such case tmp path should be on mounted C drive, maybe make it configurable?
I do realize it might be an exotic way to use VS Code for you, but it's the only way I use it and your extension seems to be the only way to use ChatGPT from inside VS Code at all :P
The text was updated successfully, but these errors were encountered: