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

Extension vscode-gitlens - unzipping - invalid comment length #18422

Closed
4 tasks done
dariodsa opened this issue Nov 20, 2020 · 1 comment
Closed
4 tasks done

Extension vscode-gitlens - unzipping - invalid comment length #18422

dariodsa opened this issue Nov 20, 2020 · 1 comment
Labels
area/plugins kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.

Comments

@dariodsa
Copy link

Describe the bug

As noted here there are some flaws in zip specification around comment length. As far as I know, this comment section doesn't interact with zip integrity. File vscode-gitlens.vsix taken from here can be unzipped locally.

Che version

  • other: 7.18.3

Steps to reproduce

  1. Add vscode-gitlens to your plugin registry according to the pull request
  2. Run any workspace
  3. Install vscode-gitlens and restart your workspace
  4. See error log from your theia-idee container

Expected behavior

I think that this error should be caught and ignored as the first link suggestes. That vsix file is a regular file, but only because of invalid comment length, it can't be unzipped normally.

Runtime

  • Openshift - 4.5.18

Installation method

  • OperatorHub

Environment

  • Other - OCP4, on-perm (CodeReady Workspaces)

Eclipse Che Logs

2020-11-20 11:51:10.041 root INFO [task_plugin.theia]: trying to decompress into "/tmp/theia-unpacked/task_plugin.theia"... 
2020-11-20 11:51:10.041 root INFO [theia_yeoman_plugin.theia]: trying to decompress into "/tmp/theia-unpacked/theia_yeoman_plugin.theia"... 
2020-11-20 11:51:10.042 root INFO [apis-it.eamodio-gitlens.10.2.1.qbvfuouzln.plugin.vsix]: trying to decompress into "/tmp/vscode-unpacked/apis-it.eamodio-gitlens.10.2.1.qbvfuouzln.plugin.vsix"... 
2020-11-20 11:51:10.094 root INFO Configuring to accept webviews on 'routebzy2n3dj-codeready-workspaces.apps.poc.openshift.local' hostname. 
2020-11-20 11:51:10.152 root ERROR Failed to resolve plugins from 'local-dir:///plugins' Params: Error: invalid comment length. expected: 2. found: 23
    at /home/theia/node_modules/decompress-unzip/node_modules/yauzl/index.js:133:25
    at /home/theia/node_modules/decompress-unzip/node_modules/yauzl/index.js:631:5
    at Immediate.<anonymous> (/home/theia/node_modules/decompress-unzip/node_modules/fd-slicer/index.js:202:5)
    at processImmediate (internal/timers.js:456:21)
@dariodsa dariodsa added the kind/bug Outline of a bug - must adhere to the bug report template. label Nov 20, 2020
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Nov 20, 2020
@themr0c themr0c added severity/P1 Has a major impact to usage or development of the system. area/plugins and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Nov 20, 2020
@fasho
Copy link

fasho commented Nov 24, 2020

I checked this in my environment OCP 4.5 and it works:

2020-11-23 20:42:26.688 root INFO Theia app listening on http://127.0.0.1:3100. 2020-11-23 20:42:26.696 root INFO [eclipse_che_github_auth_plugin.theia]: trying to decompress into "/tmp/theia-unpacked/eclipse_che_github_auth_plugin.theia"... 2020-11-23 20:42:26.696 root INFO [eclipse_che_ports_plugin.theia]: trying to decompress into "/tmp/theia-unpacked/eclipse_che_ports_plugin.theia"... 2020-11-23 20:42:26.696 root INFO [eclipse_che_telemetry_plugin.theia]: trying to decompress into "/tmp/theia-unpacked/eclipse_che_telemetry_plugin.theia"... 2020-11-23 20:42:26.696 root INFO [eclipse_che_theia_containers_plugin.theia]: trying to decompress into "/tmp/theia-unpacked/eclipse_che_theia_containers_plugin.theia"... 2020-11-23 20:42:26.696 root INFO [eclipse_che_theia_ssh_plugin.theia]: trying to decompress into "/tmp/theia-unpacked/eclipse_che_theia_ssh_plugin.theia"... 2020-11-23 20:42:26.696 root INFO [eclipse_che_welcome_plugin.theia]: trying to decompress into "/tmp/theia-unpacked/eclipse_che_welcome_plugin.theia"... 2020-11-23 20:42:26.696 root INFO [eclipse_che_workspace_plugin.theia]: trying to decompress into "/tmp/theia-unpacked/eclipse_che_workspace_plugin.theia"... 2020-11-23 20:42:26.698 root INFO [task_plugin.theia]: trying to decompress into "/tmp/theia-unpacked/task_plugin.theia"... 2020-11-23 20:42:26.698 root INFO [theia_yeoman_plugin.theia]: trying to decompress into "/tmp/theia-unpacked/theia_yeoman_plugin.theia"... 2020-11-23 20:42:26.699 root INFO [eamodio.vscode-gitlens.10.2.1.baufsxapwm.gitlens-10.2.1.vsix]: trying to decompress into "/tmp/vscode-unpacked/eamodio.vscode-gitlens.10.2.1.baufsxapwm.gitlens-10.2.1.vsix"... 2020-11-23 20:42:26.785 root INFO Configuring to on 'routetq2jxltw-openshift-workspaces.openshift.com' hostname. 2020-11-23 20:42:26.786 root WARN Backend PluginApiContributionIntercepted.onStart is slow, took: 98.0 ms 2020-11-23 20:42:27.034 root INFO [eclipse_che_github_auth_plugin.theiaaccept webviews]: decompressed 2020-11-23 20:42:27.034 root INFO [eclipse_che_telemetry_plugin.theia]: decompressed 2020-11-23 20:42:27.094 root INFO [eclipse_che_theia_containers_plugin.theia]: decompressed 2020-11-23 20:42:27.256 root INFO [eclipse_che_ports_plugin.theia]: decompressed 2020-11-23 20:42:27.577 root INFO [eclipse_che_workspace_plugin.theia]: decompressed 2020-11-23 20:42:27.787 root INFO [eclipse_che_theia_ssh_plugin.theia]: decompressed 2020-11-23 20:42:28.620 root INFO [eamodio.vscode-gitlens.10.2.1.baufsxapwm.gitlens-10.2.1.vsix]: decompressed 2020-11-23 20:42:28.620 root INFO PluginTheiaDirectoryHandler: accepting plugin with path Params: /tmp/vscode-unpacked/eamodio.vscode-gitlens.10.2.1.baufsxapwm.gitlens-10.2.1.vsix 2020-11-23 20:42:28.620 root INFO Resolved "eamodio.vscode-gitlens.10.2.1.baufsxapwm.gitlens-10.2.1.vsix" to a VS Code extension "[email protected]" with engines: Params: [object Object]

For @dariodsa the issue is due to jenkins(maybe). He can pitch in with more details if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugins kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

4 participants