Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python language server crashed by Libzip on 2021.8.1 #1692

Closed
FireBrother opened this issue Aug 19, 2021 · 4 comments
Closed

Python language server crashed by Libzip on 2021.8.1 #1692

FireBrother opened this issue Aug 19, 2021 · 4 comments
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@FireBrother
Copy link

Environment data

  • Language Server version: 2021.8.1
  • OS and version: linux x64
  • Python version (and distribution if applicable, e.g. Anaconda): Miniconda Python 3.7.10 64-bit
  • python.analysis.indexing: undefined
  • python.analysis.typeCheckingMode: off

Expected behaviour

If it's hard to fix, will there be a switch to disable this feature?

Actual behaviour

In fact, I'm still facing the same issue as #1421 and #1417 since version of 6.1. I tried to not bothering you after 6.2 by freezing my pylance to 5.4 and disabling extension auto-update, but it's quite inconvenient to disable all updates.

Logs

[Info  - 11:13:53 AM] Server root directory: /~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist
Libzip Error: Not a zip archive
    at h.makeLibzipError (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipFS.js:149:29)
    at new h (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipFS.js:121:28)
    at I.getZipSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js:816:28)
    at I.makeCallSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js:697:21)
    at I.readdirSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js:614:21)
    at c.readdirSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ProxiedFS.js:201:28)
    at C.readdirSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ProxiedFS.js:201:28)
    at D.readdirEntriesSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/src/common/realFileSystem.ts:212:23)
    at t.PyrightFileSystem.processPartialStubPackages (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/src/pyrightFileSystem.ts:187:46)
    at _0x4e647c.ensurePartialStubPackages (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/src/analyzer/importResolver.ts:587:25)
Libzip Error: Not a zip archive
    at h.makeLibzipError (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipFS.js:149:29)
    at new h (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipFS.js:121:28)
    at I.getZipSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js:816:28)
    at I.makeCallSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js:697:21)
    at I.readdirSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js:614:21)
    at c.readdirSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ProxiedFS.js:201:28)
    at C.readdirSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ProxiedFS.js:201:28)
    at D.readdirEntriesSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/src/common/realFileSystem.ts:212:23)
    at t.PyrightFileSystem.processPartialStubPackages (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/src/pyrightFileSystem.ts:187:46)
    at _0x4e647c.ensurePartialStubPackages (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/src/analyzer/importResolver.ts:587:25)

Code Snippet / Additional information

XXX
@jakebailey
Copy link
Member

Thanks for the logs.

I tried to not bothering you after 6.2 by freezing my pylance to 5.4 and disabling extension auto-update, but it's quite inconvenient to disable all updates.

Please, do bother us, otherwise we don't know that this is still an issue!

@jakebailey
Copy link
Member

Can you provide full trace logs for this?

I'm wondering if you can find the broken zip/egg file; the current code should be ensuring that any zipfiles it opens are valid zips, but perhaps this file is broken in a way we aren't detecting.

@jakebailey jakebailey added needs investigation Could be an issue - needs investigation waiting for user response Requires more information from user bug Something isn't working labels Aug 20, 2021
@github-actions github-actions bot removed the triage label Aug 20, 2021
@jakebailey jakebailey added fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed waiting for user response Requires more information from user needs investigation Could be an issue - needs investigation labels Aug 24, 2021
@jakebailey
Copy link
Member

I've submitted a fix which should fix these lipzip errors.

@heejaechang
Copy link
Contributor

the fix is in 2021.8.3 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

3 participants