microsoft / vscode-python

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

Stuck in ' Reactivating terminals' on the remote server #24286

Open ArcticOc opened 3 hours ago

ArcticOc commented 3 hours ago

Type: Bug

  1. Connect to the remote server
  2. Open a workspace
  3. Stuck in 'Reactivating terminals'

Extension version: 2024.16.1 VS Code version: Code 1.94.2 (384ff7382de624fb94dbaf6da11977bba1ecd427, 2024-10-09T16:08:44.566Z) OS version: Darwin arm64 24.1.0 Modes: Remote OS version: Linux x64 5.4.0-196-generic

System Info |Item|Value| |---|---| |CPUs|Apple M2 Pro (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
webnn: disabled_off| |Load (avg)|1, 2, 2| |Memory (System)|32.00GB (3.15GB free)| |Process Argv|--crash-reporter-id ef192f5e-f1ee-4c9a-b84c-0624e59a566d| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|SSH: abcd| |OS|Linux x64 5.4.0-196-generic| |CPUs|Intel(R) Xeon(R) Gold 6126 CPU @ 2.60GHz (24 x 1000)| |Memory (System)|187.57GB (183.66GB free)| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 bdiig495:31013172 a69g1124:31058053 dvdeprecation:31068756 dwnewjupytercf:31046870 impr_priority:31102340 nativerepl2:31139839 refactort:31108082 pythonrstrctxt:31112756 wkspc-onlycs-t:31132770 wkspc-ranged-t:31151552 cf971741:31144450 autoexpandse:31146404 iacca1:31150322 notype1cf:31151524 controlgs:31153265 5fd0e150:31155592 ```

It works fine for local workspaces.

karthiknadig commented 2 hours ago

@ArcticOc Can you share your logs from Output > Python? and from Output > Python Locator? Also, provide details on the environment that was used.

To unblock you can add this to your user settings: "python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"],

ArcticOc commented 1 hour ago

@ArcticOc Can you share your logs from Output > Python? and from Output > Python Locator? Also, provide details on the environment that was used.

To unblock you can add this to your user settings: "python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"],

After adding this setting: "python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"],, although 'Reactivating terminals' disappeared, the python extension still did not work properly.

Here is the OUTPUT > Python.

Python ``` 2024-10-10 17:13:54.814 [info] Experiment 'pythonTerminalEnvVarActivation' is inactive 2024-10-10 17:13:54.814 [info] Experiment 'pythonaacf' is active 2024-10-10 17:13:54.814 [info] Experiment 'pythonRecommendTensorboardExt' is active 2024-10-10 17:13:54.814 [info] Experiment 'pythonSurveyNotificationcf' is active 2024-10-10 17:13:54.814 [info] Experiment 'pythonTestAdapter' is active 2024-10-10 17:13:54.814 [info] Native locator: Refresh started 2024-10-10 17:13:54.814 [info] Default formatter is set to charliermarsh.ruff for workspace /home/arc/mse 2024-10-10 17:13:54.814 [info] Native locator: Refresh started 2024-10-10 17:13:55.930 [info] > pyenv which python 2024-10-10 17:13:55.930 [info] cwd: . 2024-10-10 17:13:55.951 [info] Conda environment manager found at: /home/arc/miniconda3/bin/conda 2024-10-10 17:13:56.425 [warning] Microvenv failed as it is using proposed API which is constantly changing l [Error]: Failed to resolve env "/Users/koko/micromamba/envs/Research/bin/python" at ae (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2051686) at oe (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2049646) at Immediate. (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2045940) at processImmediate (node:internal/timers:483:21) { code: -4, data: undefined } 2024-10-10 17:13:56.425 [error] Python Extension: interpreterManager.refresh l [Error]: Failed to resolve env "/Users/koko/micromamba/envs/Research/bin/python" at ae (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2051686) at oe (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2049646) at Immediate. (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2045940) at processImmediate (node:internal/timers:483:21) { code: -4, data: undefined } 2024-10-10 17:13:56.426 [error] [ 'Failed to activate a workspace, Class name = v, completed in 1662ms, has a falsy return value, Arg 1: , Arg 2: {"started":1728580434657}, Return Value: undefined', l [Error]: Failed to resolve env "/Users/koko/micromamba/envs/Research/bin/python" at ae (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2051686) at oe (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2049646) at Immediate. (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2045940) at processImmediate (node:internal/timers:483:21) { code: -4, data: undefined } ] 2024-10-10 17:13:56.426 [error] Failure during activation. l [Error]: Failed to resolve env "/Users/koko/micromamba/envs/Research/bin/python" at ae (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2051686) at oe (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2049646) at Immediate. (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2045940) at processImmediate (node:internal/timers:483:21) { code: -4, data: undefined } 2024-10-10 17:13:56.426 [error] sendStartupTelemetry() failed. l [Error]: Failed to resolve env "/Users/koko/micromamba/envs/Research/bin/python" at ae (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2051686) at oe (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2049646) at Immediate. (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2045940) at processImmediate (node:internal/timers:483:21) { code: -4, data: undefined } 2024-10-10 17:13:56.428 [info] Native locator: Refresh finished in 1743 ms 2024-10-10 17:14:10.149 [info] > ~/miniconda3/bin/conda info --json 2024-10-10 17:15:37.766 [error] Failed to get activation commands l [Error]: Failed to resolve env "/Users/koko/micromamba/envs/Research/bin/python" at ae (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2051686) at oe (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2049646) at Immediate. (/home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/out/client/extension.js:2:2045940) at processImmediate (node:internal/timers:483:21) { code: -4, data: undefined } 2024-10-10 17:21:14.362 [info] Native locator: Refresh started 2024-10-10 17:21:14.469 [info] Conda environment manager found at: /home/arc/miniconda3/bin/conda 2024-10-10 17:21:14.613 [info] Native locator: Refresh finished in 243 ms 2024-10-10 17:21:30.038 [info] Discover tests for workspace name: mse - uri: /home/arc/mse 2024-10-10 17:21:30.038 [info] Python interpreter path: ~/miniconda3/envs/MXE/bin/python 2024-10-10 17:21:40.506 [info] Native locator: Refresh started 2024-10-10 17:21:40.594 [info] Conda environment manager found at: /home/arc/miniconda3/bin/conda 2024-10-10 17:21:40.738 [info] Native locator: Refresh finished in 226 ms 2024-10-10 17:21:46.709 [info] Native locator: Refresh started 2024-10-10 17:21:46.780 [info] Conda environment manager found at: /home/arc/miniconda3/bin/conda 2024-10-10 17:21:46.893 [info] Native locator: Refresh finished in 177 ms ```

Here is the OUTPUT > Python Locator.

Python Locator ``` 2024-10-10 17:13:54.814 [info] Starting Python Locator /home/arc/.vscode-server/extensions/ms-python.python-2024.16.1-linux-x64/python-env-tools/bin/pet server 2024-10-10 17:13:55.949 [info] Discovered env: /bin/python3 2024-10-10 17:13:55.951 [info] Discovered manager: (Conda) /home/arc/miniconda3/bin/conda 2024-10-10 17:13:55.951 [info] Discovered env: /home/arc/miniconda3/envs/crc/bin/python 2024-10-10 17:13:55.952 [info] Discovered env: /home/arc/miniconda3/bin/python 2024-10-10 17:13:55.952 [info] Discovered env: /home/arc/miniconda3/envs/nsa/bin/python 2024-10-10 17:13:56.061 [info] Discovered env: /usr/bin/python3 2024-10-10 17:13:56.063 [info] Discovered env: /home/arc/miniconda3/envs/NSA/bin/python 2024-10-10 17:13:56.420 [info] Discovered env: /home/arc/miniconda3/envs/MSE/bin/python 2024-10-10 17:13:56.422 [info] Discovered env: /home/arc/miniconda3/envs/sr/bin/python 2024-10-10 17:13:56.424 [error] Failed to execute Python to resolve info "/Users/arc/micromamba/envs/Research/bin/python": No such file or directory (os error 2) 2024-10-10 17:13:56.424 [warning] Unknown Python Env "/Users/arc/micromamba/envs/Research/bin/python" 2024-10-10 17:13:56.424 [error] Failed to resolve env "/Users/arc/micromamba/envs/Research/bin/python" 2024-10-10 17:13:56.427 [info] Locator Conda took 73.33175ms 2024-10-10 17:13:56.427 [info] Locator Homebrew took 382.699µs 2024-10-10 17:13:56.427 [info] Locator LinuxGlobal took 67.406665ms 2024-10-10 17:13:56.427 [info] Locator PipEnv took 93.934µs 2024-10-10 17:13:56.427 [info] Locator Poetry took 2.215638ms 2024-10-10 17:13:56.427 [info] Locator PyEnv took 1.241518ms 2024-10-10 17:13:56.427 [info] Locator Venv took 239.061µs 2024-10-10 17:13:56.427 [info] Locator VirtualEnv took 285.79µs 2024-10-10 17:13:56.427 [info] Locator VirtualEnvWrapper took 283.716µs 2024-10-10 17:13:56.427 [info] Locator GlobalVirtualEnvs took 704.126µs 2024-10-10 17:13:56.427 [info] Locator Locators took 73.642391ms 2024-10-10 17:13:56.427 [info] Locator Path took 140.305161ms 2024-10-10 17:13:56.427 [info] Locator Workspaces took 14.638516ms 2024-10-10 17:13:56.427 [info] Refresh completed in 140ms 2024-10-10 17:15:19.370 [error] Failed to execute Python to resolve info "/Users/arc/micromamba/envs/Research/bin/python": No such file or directory (os error 2) 2024-10-10 17:15:19.371 [warning] Unknown Python Env "/Users/arc/micromamba/envs/Research/bin/python" 2024-10-10 17:15:19.371 [error] Failed to resolve env "/Users/arc/micromamba/envs/Research/bin/python" 2024-10-10 17:17:05.750 [error] Failed to execute Python to resolve info "/Users/arc/micromamba/envs/Research/bin/python": No such file or directory (os error 2) 2024-10-10 17:17:05.750 [warning] Unknown Python Env "/Users/arc/micromamba/envs/Research/bin/python" 2024-10-10 17:17:05.750 [error] Failed to resolve env "/Users/arc/micromamba/envs/Research/bin/python" 2024-10-10 17:18:42.638 [error] Failed to execute Python to resolve info "/Users/arc/micromamba/envs/Research/bin/python": No such file or directory (os error 2) 2024-10-10 17:18:42.639 [warning] Unknown Python Env "/Users/arc/micromamba/envs/Research/bin/python" 2024-10-10 17:18:42.639 [error] Failed to resolve env "/Users/arc/micromamba/envs/Research/bin/python" 2024-10-10 17:21:14.366 [error] Failed to execute Python to resolve info "/Users/arc/micromamba/envs/Research/bin/python": No such file or directory (os error 2) 2024-10-10 17:21:14.366 [warning] Unknown Python Env "/Users/arc/micromamba/envs/Research/bin/python" 2024-10-10 17:21:14.366 [error] Failed to resolve env "/Users/arc/micromamba/envs/Research/bin/python" 2024-10-10 17:21:14.469 [info] Discovered manager: (Conda) /home/arc/miniconda3/bin/conda 2024-10-10 17:21:14.470 [info] Discovered env: /home/arc/miniconda3/envs/crc/bin/python 2024-10-10 17:21:14.477 [info] Discovered env: /home/arc/miniconda3/envs/NSA/bin/python 2024-10-10 17:21:14.480 [info] Discovered env: /home/arc/miniconda3/bin/python 2024-10-10 17:21:14.484 [info] Discovered env: /home/arc/miniconda3/envs/nsa/bin/python 2024-10-10 17:21:14.491 [info] Discovered env: /home/arc/miniconda3/envs/MSE/bin/python 2024-10-10 17:21:14.494 [info] Discovered env: /bin/python3 2024-10-10 17:21:14.497 [info] Discovered env: /home/arc/miniconda3/envs/sr/bin/python 2024-10-10 17:21:14.500 [info] Discovered env: /usr/bin/python3 2024-10-10 17:21:14.603 [info] Locator Conda took 113.662619ms 2024-10-10 17:21:14.603 [info] Locator Homebrew took 261.828µs 2024-10-10 17:21:14.603 [info] Locator LinuxGlobal took 115.693664ms 2024-10-10 17:21:14.603 [info] Locator PipEnv took 119.36µs 2024-10-10 17:21:14.603 [info] Locator Poetry took 897.513µs 2024-10-10 17:21:14.603 [info] Locator PyEnv took 577.715µs 2024-10-10 17:21:14.603 [info] Locator Venv took 139.275µs 2024-10-10 17:21:14.603 [info] Locator VirtualEnv took 63.313µs 2024-10-10 17:21:14.603 [info] Locator VirtualEnvWrapper took 120.649µs 2024-10-10 17:21:14.603 [info] Locator GlobalVirtualEnvs took 813.169µs 2024-10-10 17:21:14.603 [info] Locator Locators took 117.575772ms 2024-10-10 17:21:14.603 [info] Locator Path took 237.321786ms 2024-10-10 17:21:14.604 [info] Locator Workspaces took 19.272323ms 2024-10-10 17:21:14.604 [info] Refresh completed in 237ms 2024-10-10 17:21:30.028 [info] Resolved Python Environment /home/arc/miniconda3/envs/MSE/bin/python 2024-10-10 17:21:40.594 [info] Discovered manager: (Conda) /home/arc/miniconda3/bin/conda 2024-10-10 17:21:40.595 [info] Discovered env: /home/arc/miniconda3/bin/python 2024-10-10 17:21:40.604 [info] Discovered env: /home/arc/miniconda3/envs/crc/bin/python 2024-10-10 17:21:40.608 [info] Discovered env: /home/arc/miniconda3/envs/nsa/bin/python 2024-10-10 17:21:40.610 [info] Discovered env: /home/arc/miniconda3/envs/NSA/bin/python 2024-10-10 17:21:40.613 [info] Discovered env: /home/arc/miniconda3/envs/MSE/bin/python 2024-10-10 17:21:40.618 [info] Discovered env: /bin/python3 2024-10-10 17:21:40.620 [info] Discovered env: /home/arc/miniconda3/envs/sr/bin/python 2024-10-10 17:21:40.623 [info] Discovered env: /usr/bin/python3 2024-10-10 17:21:40.730 [info] Locator Conda took 90.890019ms 2024-10-10 17:21:40.730 [info] Locator Homebrew took 245.038µs 2024-10-10 17:21:40.730 [info] Locator LinuxGlobal took 93.456699ms 2024-10-10 17:21:40.730 [info] Locator PipEnv took 83.28µs 2024-10-10 17:21:40.730 [info] Locator Poetry took 521.417µs 2024-10-10 17:21:40.730 [info] Locator PyEnv took 410.956µs 2024-10-10 17:21:40.730 [info] Locator Venv took 48.538µs 2024-10-10 17:21:40.731 [info] Locator VirtualEnv took 60.195µs 2024-10-10 17:21:40.731 [info] Locator VirtualEnvWrapper took 160.511µs 2024-10-10 17:21:40.731 [info] Locator GlobalVirtualEnvs took 314.678µs 2024-10-10 17:21:40.731 [info] Locator Locators took 95.223924ms 2024-10-10 17:21:40.731 [info] Locator Path took 217.63266ms 2024-10-10 17:21:40.731 [info] Locator Workspaces took 8.472448ms 2024-10-10 17:21:40.731 [info] Refresh completed in 217ms 2024-10-10 17:21:46.780 [info] Discovered manager: (Conda) /home/arc/miniconda3/bin/conda 2024-10-10 17:21:46.781 [info] Discovered env: /home/arc/miniconda3/envs/crc/bin/python 2024-10-10 17:21:46.785 [info] Discovered env: /home/arc/miniconda3/bin/python 2024-10-10 17:21:46.790 [info] Discovered env: /home/arc/miniconda3/envs/nsa/bin/python 2024-10-10 17:21:46.794 [info] Discovered env: /home/arc/miniconda3/envs/NSA/bin/python 2024-10-10 17:21:46.796 [info] Discovered env: /bin/python3 2024-10-10 17:21:46.799 [info] Discovered env: /home/arc/miniconda3/envs/MSE/bin/python 2024-10-10 17:21:46.803 [info] Discovered env: /home/arc/miniconda3/envs/sr/bin/python 2024-10-10 17:21:46.805 [info] Discovered env: /usr/bin/python3 2024-10-10 17:21:46.886 [info] Locator Conda took 74.19215ms 2024-10-10 17:21:46.886 [info] Locator Homebrew took 382.551µs 2024-10-10 17:21:46.886 [info] Locator LinuxGlobal took 76.009799ms 2024-10-10 17:21:46.886 [info] Locator PipEnv took 168.237µs 2024-10-10 17:21:46.886 [info] Locator Poetry took 609.376µs 2024-10-10 17:21:46.886 [info] Locator PyEnv took 794.519µs 2024-10-10 17:21:46.886 [info] Locator Venv took 107.863µs 2024-10-10 17:21:46.886 [info] Locator VirtualEnv took 192.302µs 2024-10-10 17:21:46.886 [info] Locator VirtualEnvWrapper took 186.149µs 2024-10-10 17:21:46.886 [info] Locator GlobalVirtualEnvs took 484.801µs 2024-10-10 17:21:46.886 [info] Locator Locators took 77.678467ms 2024-10-10 17:21:46.886 [info] Locator Path took 173.534129ms 2024-10-10 17:21:46.886 [info] Locator Workspaces took 5.055958ms 2024-10-10 17:21:46.886 [info] Refresh completed in 173ms 2024-10-10 17:22:52.775 [info] Resolved Python Environment /home/arc/miniconda3/envs/MSE/bin/python 2024-10-10 17:30:31.548 [info] Resolved Python Environment /home/arc/miniconda3/envs/MSE/bin/python 2024-10-10 17:33:38.775 [info] Resolved Python Environment /home/arc/miniconda3/envs/MSE/bin/python ```

Here is the env info.

env info ``` active environment : MSE active env location : /home/arc/miniconda3/envs/MSE shell level : 1 user config file : /home/arc/.condarc populated config files : /home/arc/.condarc conda version : 23.11.0 conda-build version : not installed python version : 3.11.5.final.0 solver : libmamba (default) virtual packages : __archspec=1=skylake_avx512 __conda=23.11.0=0 __cuda=12.2=0 __glibc=2.31=0 __linux=5.4.0=0 __unix=0=0 base environment : /home/arc/miniconda3 (writable) conda av data dir : /home/arc/miniconda3/etc/conda conda av metadata url : None channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /home/wu/miniconda3/pkgs /home/wu/.conda/pkgs envs directories : /home/wu/miniconda3/envs /home/wu/.conda/envs platform : linux-64 user-agent : conda/23.11.0 requests/2.31.0 CPython/3.11.5 Linux/5.4.0-196-generic ubuntu/20.04.6 glibc/2.31 solver/libmamba conda-libmamba-solver/23.12.0 libmambapy/1.5.3 UID:GID : 1001:1001 netrc file : None offline mode : False ```
karthiknadig commented 1 hour ago

@DonJayamanne looks like a case pet is failing to resolve micromamba. I need to see why it is blocking the rest of the flow.