microsoft / vscode-pull-request-github

GitHub Pull Requests for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github
MIT License
2.32k stars 579 forks source link

fetching pull requests failed in infinite loop when proxy is unavailable #6063

Open jsoref opened 5 months ago

jsoref commented 5 months ago

Type: Bug

  1. Open a terminal
  2. Run export http_proxy=http://localhost:3128;export https_proxy=http://localhost:3128
  3. Do not have anything listening on that port.
  4. Have a clone of https://github.com/fireship-io/fireship.io
  5. Have 3 remotes in it:
    fireship.io % git remote -v
    check-spelling  https://github.com/check-spelling-sandbox/fireship.io.git (fetch)
    check-spelling  https://github.com/check-spelling-sandbox/fireship.io.git (push)
    jsoref  https://github.com/jsoref/fireship.io.git (fetch)
    jsoref  https://github.com/jsoref/fireship.io.git (push)
    origin  git@github.com:fireship-io/fireship.io.git (fetch)
    origin  git@github.com:fireship-io/fireship.io.git (push)
  6. Use code . to open the repository in vscode (inheriting the proxy)
  7. Open the Pull Requests sidebar
  8. Expand Pull Requests
  9. Click Created By Me to expand
  10. See infinite loop of things

https://github.com/microsoft/vscode-pull-request-github/assets/2119212/a4232b14-407c-4c58-9f78-fa83fc6884d9

Expected results:

  1. Do not have an infinite loop
  2. Error messages should be visible long enough for a user to do something to them
  3. Whatever the underlying error is also shouldn't happen, but I'm more concerned by the first two points.

Extension version: 0.90.0 VS Code version: Code 1.90.2 (Universal) (5437499feb04f7a586f677b155b039bc2b3669eb, 2024-06-18T22:37:41.291Z) OS version: Darwin arm64 23.5.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 Max (10 x 2400)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|5, 5, 5| |Memory (System)|64.00GB (0.70GB free)| |Process Argv|--crash-reporter-id 1fc67ee2-0174-4598-9f98-4537df0dd32c| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 vscrp:30673768 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonnoceb:30805159 asynctok:30898717 pythonregdiag2:30936856 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 jchc7451:31067544 chatpanelc:31048052 dsvsc021:30996838 945dj816:31013170 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 dwnewjupytercf:31046870 newcmakeconfigv2:31071590 impr_priority:31082723 ```

The underlying error is:

Fetching pull requests failed: request to https://api.github.com/repos/fireship-io/fireship.io/pulls?per_page=20&page=1 failed, reason: Failed to establish a socket connection to proxies: ["PROXY localhost:3128"]

image
jsoref commented 5 months ago

Fwiw, there appears to be one notification,

image

... but I can't click the 🔔 to see it.

jsoref commented 5 months ago

... This is similar to #5814, but I'm on macOS, not in China, and there is no proxy, ... so testing, fixing, and validating should be easy to do, and I should be responsive for at least the next month...

nan-mu commented 1 month ago

Same issue with me. But I want to know at what level this plugin gets this proxy information? I use a development container, and the environment variables inside the container are clean, as are the settings for git config.

And, the complete output is like this:

2024-10-22 09:16:42.398 [error] GitHubRepository+0> Fetching all pull requests failed: HttpError: request to https://api.github.com/repos/nan-mu/ldc1614-test/pulls?per_page=20&page=1 failed, reason: Failed to establish a socket connection to proxies: ["PROXY 127.0.0.1:7890"]