microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.72k stars 765 forks source link

Pylance fails to load in vscode.dev #2752

Closed debonte closed 2 years ago

debonte commented 2 years ago

Environment data

Repro steps

  1. Open https://vscode.dev in browser
  2. Work around bug that currently prevents Python extension from being installed in vscode.dev ("Cannot add 'Jupyter' because this extension is not a web extension") 2a. Clone vscode-python 2b. npm i 2c. npm run package 2d. npx serve --cors -l 5000 (more details here) 2e. In a different terminal window: npx localtunnel -p 5000 2f. Visit the URL that it spits out ("your url is...") in your browser and click the "Click to Continue" button. 2f. Ctrl-Shift-P in vscode-dev 2g. Find and select "Developer: Install Web Extension..." 2h. Use the "your url is" output of "npx localtunnel" as the location of the web extension.
  3. Install Pylance via the Extensions pane
  4. Open a Python file

Expected behavior

Pylance initializes successfully.

Actual behavior

Python Language Server log says: [Error - 2:54:22 PM] Client Python Language Server: connection to server is erroring. Shutting down server.

And browser dev tools show: Client Python Language Server: connection to server is erroring. Shutting down server.

Failed to load resource: the server responded with a status of 404 () ms-python.vscode-unpkg.net/ms-python/vscode-pylance/2022.4.3/extension/package.nls.en-us.json

debonte commented 2 years ago

This repros for me all the way back to 2021.10.0. Maybe VS Code changed something that broke this?

heejaechang commented 2 years ago

this is what dev tool console said on failure

Failed to execute 'importScripts' on 'WorkerGlobalScope': The URL 'ms-pythonscode-pylance‚2.4.3extension/dist/browser.server.bundle.js' is invalid.
luabud commented 2 years ago

Is https://github.com/microsoft/pylance-release/issues/2760 a dupe of this as well?

debonte commented 2 years ago

Is https://github.com/microsoft/pylance-release/issues/2760 a dupe of this as well?

From talking with Karthik about these, I believe they are different.

luabud commented 2 years ago

This is now fixed by https://github.com/microsoft/vscode-python/pull/19076, released on v2022.6.1 of the Python extension 🥳

luabud commented 2 years ago

Sorry, closed the wrong one 🤦‍♀️

debonte commented 2 years ago

@karthiknadig, I guess this nls issue isn't reproing anymore?

karthiknadig commented 2 years ago

This is still happening: image

judej commented 2 years ago

This error is expected since we do not have a loc file. Pylance functionality is not affected. If it is affected, please reopen the issue.