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

Tabnine vscode extension installation fails on Theia #10880

Closed
fyudanov opened this issue Mar 14, 2022 · 8 comments
Closed

Tabnine vscode extension installation fails on Theia #10880

fyudanov opened this issue Mar 14, 2022 · 8 comments
Labels
vscode issues related to VSCode compatibility

Comments

@fyudanov
Copy link

fyudanov commented Mar 14, 2022

Attempt to install Tabnine plugin fails on Theia (browser version) with error:
Class extends value undefined is not a constructor or null

Reproducible on Theia versions 1.19-1.23

Also checked the configuration from #10447.
Fails the same way on my side.

Screen Shot 2022-03-14 at 23 03 58

  1. In Theia open Extensions tab
  2. Input "tabnine" as search line
  3. Install Tabnine extension from search results
  • Operating System: Debian stretch (on Docker)
  • Theia Version: 1.19-1.23
package.json
{
  "private": true,
  "name": "theia-ide",
  "description": "Theia IDE",
  "productName": "Theia IDE",
  "version": "1.0.0",
  "engines": {
    "yarn": "1.0.x || >=1.2.1",
    "node": ">=12.14.1"
  },
  "theia": {
    "frontend": {
      "config": {
        "applicationName": "Theia IDE"
      }
    },
    "backend": {
      "config": {
        "startupTimeout": -1,
        "resolveSystemPlugins": false
      }
    }
  },
  "dependencies": {
    "@theia/bulk-edit": "1.23.0",
    "@theia/callhierarchy": "1.23.0",
    "@theia/cli": "1.23.0",
    "@theia/console": "1.23.0",
    "@theia/core": "1.23.0",
    "@theia/debug": "1.23.0",
    "@theia/editor": "1.23.0",
    "@theia/editor-preview": "1.23.0",
    "@theia/file-search": "1.23.0",
    "@theia/filesystem": "1.23.0",
    "@theia/getting-started": "1.23.0",
    "@theia/keymaps": "1.23.0",
    "@theia/markers": "1.23.0",
    "@theia/messages": "1.23.0",
    "@theia/metrics": "1.23.0",
    "@theia/mini-browser": "1.23.0",
    "@theia/monaco": "1.23.0",
    "@theia/navigator": "1.23.0",
    "@theia/outline-view": "1.23.0",
    "@theia/output": "1.23.0",
    "@theia/plugin-dev": "1.23.0",
    "@theia/plugin-ext": "1.23.0",
    "@theia/plugin-ext-vscode": "1.23.0",
    "@theia/preferences": "1.23.0",
    "@theia/process": "1.23.0",
    "@theia/property-view": "1.23.0",
    "@theia/scm": "1.23.0",
    "@theia/scm-extra": "1.23.0",
    "@theia/search-in-workspace": "1.23.0",
    "@theia/task": "1.23.0",
    "@theia/terminal": "1.23.0",
    "@theia/timeline": "1.23.0",
    "@theia/typehierarchy": "1.23.0",
    "@theia/userstorage": "1.23.0",
    "@theia/variable-resolver": "1.23.0",
    "@theia/vsx-registry": "1.23.0",
    "@theia/workspace": "1.23.0",
    "fs-extra": "^9.0.1"
  },
  "devDependencies": {
    "@types/js-yaml": "^3.12.0",
    "@types/yargs": "^17.0.2",
    "js-yaml": "^3.12.0",
    "rimraf": "^2.7.1",
    "ts-node": "^10.0.0",
    "yargs": "^17.0.1"
  },
  "scripts": {
    "prepare": "yarn build && yarn download:plugins",
    "clean": "theia clean && rimraf node_modules",
    "clean:dist": "rimraf dist",
    "build": "theia build",
    "watch": "concurrently -n compile,bundle \"theiaext watch --preserveWatchOutput\" \"theia build --watch --mode development\"",
    "start": "theia start --plugins=local-dir:plugins --hostname=0.0.0.0",
    "start:debug": "yarn start --log-level=debug",
    "download:plugins": "theia download:plugins"
  },
  "theiaPluginsDir": "plugins",
  "theiaPlugins": {
  },
  "theiaPluginsExcludeIds": [
  ]
}
@msujew msujew added the vscode issues related to VSCode compatibility label Mar 14, 2022
@vince-fugnitto
Copy link
Member

@fyudanov duplicate of #10447?

@msujew
Copy link
Member

msujew commented Mar 14, 2022

@vince-fugnitto I don't think so, the culprit seems to be this:

root ERROR [hosted-plugin: 3724] Activating extension 'tabnine-vscode' failed: TypeError: Class extends value undefined is not a constructor or null
    at Object.4234 (/home/gitpod/.theia/extensions/TabNine.tabnine-vscode-3.5.32.vsix/extension/out/extension.js:17:78028)
    at n (/home/gitpod/.theia/extensions/TabNine.tabnine-vscode-3.5.32.vsix/extension/out/extension.js:17:165032)
    at Object.1465 (/home/gitpod/.theia/extensions/TabNine.tabnine-vscode-3.5.32.vsix/extension/out/extension.js:17:86680)
    at n (/home/gitpod/.theia/extensions/TabNine.tabnine-vscode-3.5.32.vsix/extension/out/extension.js:17:165032)
    at Object.4624 (/home/gitpod/.theia/extensions/TabNine.tabnine-vscode-3.5.32.vsix/extension/out/extension.js:17:69658)
    at n (/home/gitpod/.theia/extensions/TabNine.tabnine-vscode-3.5.32.vsix/extension/out/extension.js:17:165032)
    at /home/gitpod/.theia/extensions/TabNine.tabnine-vscode-3.5.32.vsix/extension/out/extension.js:17:165511
    at /home/gitpod/.theia/extensions/TabNine.tabnine-vscode-3.5.32.vsix/extension/out/extension.js:17:167668
    at Object.<anonymous> (/home/gitpod/.theia/extensions/TabNine.tabnine-vscode-3.5.32.vsix/extension/out/extension.js:17:167689)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)

The extension creashes completely during its startup, since it can't resolve the extends InlineCompletionItem. Older versions of Tabnine (tested with 3.5.21) work correctly.

@msujew
Copy link
Member

msujew commented Mar 14, 2022

@vince-fugnitto Digging deeper, it seems like InlineCompletionItem is currently proposed API, which doesn't make a lot of sense, given that their pinned version of VSCode is still 1.50...

@vince-fugnitto
Copy link
Member

vince-fugnitto commented Mar 14, 2022

@msujew it seems to be a proposed api that was recently introduced, I'd suggest that an older version of tabnine should be used instead.

Edit: you beat me to it ;)

@fyudanov
Copy link
Author

So it would be a simple workaround to install on older version of Tabnine )

Probably a newbie question from my side, but does Theia allows this from UI (like e.g. VScode does https://code.visualstudio.com/updates/v1_30#_install-previous-versions)?

@vince-fugnitto
Copy link
Member

@fyudanov it is currently in-progress #9330.

@fyudanov
Copy link
Author

@fyudanov it is currently in-progress #9330.

Ok. Thanks for a quick help!

@vince-fugnitto
Copy link
Member

I believe the extension should now work, and the ability to install different versions of a plugin exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vscode issues related to VSCode compatibility
Projects
None yet
Development

No branches or pull requests

3 participants