JudiniLabs / code-gpt-docs

Docusaurus page
https://code-gpt-docs.vercel.app
MIT License
553 stars 58 forks source link

CodeGPT listens on a different port than announced (VSCodium flatpak) #235

Closed handlebargh closed 1 month ago

handlebargh commented 4 months ago

This may be related to #234

I'm running CodeGPT 3.2.0

codeGPT announces to bind to port 54112 on localhost. However, on my machine (running VSCodium as flatpak) it seems to bind on port 54113 on localhost. If I try to redirect port 54113 to 54112 I get a "Not Found" message in the extension's window.

Screenshot1

codeGPT listens on my public interface as well (which in this case is my wifi card):

Screenshot2

If I redirect from this interface to localhost:54112 codeGPT works. So at the moment my workaround looks like this:

  1. Start VSCodium (but do not open the codeGPT window immediately)
  2. Run this socat command to redirect traffic:
    sudo socat tcp-listen:54112,reuseaddr,fork,bind=127.0.0.1 tcp:192.168.0.144:54112
  3. Use codeGPT

This leads me to 2 questions:

  1. Why does codeGPT bind to a different port than it announces on localhost? I currently don't suspect the flatpak being responsible since it runs in host network mode.
  2. Is there a way to restrict codeGPT to listen on localhost only?
octrow commented 3 months ago

@PilarHidalgo I'm experiencing a similar issue. I'm also using WSL2 (Ubuntu 22.04), and the CodeGPT extension seems to be opening the login and signup pages on a different port than the one announced - http://localhost:54112/login. This aligns with the behavior reported in this issue.

clintonruairi commented 2 months ago

same issue here. Just bought a subscription and it won't connect

PilarHidalgo commented 1 month ago

Hi everyone, sorry for the misunderstanding, thank you @handlebargh for the description of the solution. Shortly, we will be communicating about being able to use other extensions in parallel without problems.

clintonruairi commented 1 month ago

Has this issue been fixed @PilarHidalgo ?