microsoft / vscode-python

Python extension for Visual Studio Code
https://aka.ms/pvsc-marketplace
MIT License
4.28k stars 1.17k forks source link

Python extension not loading in the Remote SSH #23809

Closed krishna0512 closed 3 weeks ago

krishna0512 commented 1 month ago

Type: Bug

When I try to connect to a remote SSH server, python extension is misbehaving. the python extension is basically osccilating between "Discovering Python Interpreters" and "Remote extension host terminated unexpectedly". This has started since last 2 days, I did the extension bisect and its pointing to the python extension only.

I tried downgrading the extension version but no change. This is the log output for python:

2024-07-13 16:06:25.445 [info] > hatch env show --json
2024-07-13 16:06:25.445 [info] cwd: .
2024-07-13 16:06:25.453 [info] > /bin/python3 -I ~/.vscode-server/extensions/ms-python.python-2024.10.0-linux-x64/python_files/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2024.10.0-linux-x64/python_files/interpreterInfo.py
2024-07-13 16:07:32.235 [error] Reading directory to watch failed [Error: ENOENT: no such file or directory, scandir '/home/ocr_testing/testing_platform/.pixi/envs'
    at Object.readdirSync (node:fs:1515:26)
    at /home/ocr_testing/.vscode-server/extensions/ms-python.python-2024.10.0-linux-x64/out/client/extension.js:2:574598
    at /home/ocr_testing/.vscode-server/extensions/ms-python.python-2024.10.0-linux-x64/out/client/extension.js:2:574789
    at Array.map (<anonymous>)
    at d.initWatchers (/home/ocr_testing/.vscode-server/extensions/ms-python.python-2024.10.0-linux-x64/out/client/extension.js:2:574507)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async d.ensureWatchersReady (/home/ocr_testing/.vscode-server/extensions/ms-python.python-2024.10.0-linux-x64/out/client/extension.js:2:536827)] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: '/home/ocr_testing/testing_platform/.pixi/envs'
}
2024-07-13 16:07:32.235 [error] Dir "/home/ocr_testing/testing_platform/.pixi/envs" is not watchable (directory does not exist)
2024-07-13 16:07:32.270 [info] Default formatter is set to ms-python.black-formatter for workspace /home/ocr_testing/testing_platform
2024-07-13 16:07:32.270 [error] Following setting is deprecated: "python.linting.pylintEnabled"
2024-07-13 16:07:32.270 [error] All settings starting with "python.linting." are deprecated and can be removed from settings.
2024-07-13 16:07:32.270 [error] Linting features have been moved to separate linter extensions.
2024-07-13 16:07:32.270 [error] See here for more information: https://code.visualstudio.com/docs/python/linting
2024-07-13 16:07:32.270 [error] Please install "pylint" extension: https://marketplace.visualstudio.com/items?itemName=ms-python.pylint
2024-07-13 16:07:32.523 [info] Python interpreter path: /bin/python3
2024-07-13 16:07:32.595 [info] Starting Environment refresh
2024-07-13 16:07:32.599 [info] > pixi --version
2024-07-13 16:07:32.600 [error] [Error: spawn pixi ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn pixi',
  path: 'pixi',
  spawnargs: [ '--version' ]
}
2024-07-13 16:07:32.601 [info] > hatch env show --json
2024-07-13 16:07:32.601 [info] cwd: .
2024-07-13 16:07:32.609 [info] > /bin/python3 -I ~/.vscode-server/extensions/ms-python.python-2024.10.0-linux-x64/python_files/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2024.10.0-linux-x64/python_files/interpreterInfo.py

Extension version: 2024.8.1 VS Code version: Code 1.91.1 (f1e16e1e6214d7c44d078b1f0607b2388f29d729, 2024-07-09T22:06:49.809Z) OS version: Windows_NT x64 10.0.22631 Modes: Connection to 'ssh-remote+10.4.16.80' could not be established

System Info |Item|Value| |---|---| |CPUs|13th Gen Intel(R) Core(TM) i5-13500H (16 x 3187)| |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
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.64GB (3.13GB free)| |Process Argv|-n --crash-reporter-id 9e4faa81-2686-4fd1-8362-e9622bfb2255| |Screen Reader|no| |VM|0%| Connection to 'ssh-remote+10.4.16.80' could not be established
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256860 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonnoceb:30805159 asynctok:30898717 pythonregdiag2:30936856 pythonmypyd1:30879173 2e7ec940:31000449 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 chatpanelt:31048053 dsvsc021:30996838 jg8ic977:31013176 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 dwnewjupyter:31046869 2f103344:31071589 legacy_priority:31082724 ```
karthiknadig commented 1 month ago

Can you share the remote extension host logs? Also, can you provide details about the remote. Like OS, architecture, python version etc on the remote.

github-actions[bot] commented 3 weeks ago

Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.

Happy Coding!