eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
19.83k stars 2.48k forks source link

VSX extension: Disposable.dispose() is not a function #13906

Open arnaudvergnet opened 1 month ago

arnaudvergnet commented 1 month ago

Bug Description:

When using the Mercurial extension in the Theia IDE from the Open Vsx registry, the extension fails to start with the message Activating extension 'Hg' failed: TypeError: _a.dispose is not a function (see below for detailed stack trace).

The same extension from the same registry works on VSCodium.

Steps to Reproduce:

  1. Open the Theia IDE
  2. Install the extension https://open-vsx.org/extension/mrcrowl/hg
  3. Restart Theia IDE
  4. See the error popup on the bottom right image

Stack trace

Opening the IDE with the console provides the following stack trace:

2024-07-10T09:11:32.835Z root ERROR [hosted-plugin: 22540] Activating extension 'Hg' failed: TypeError: _a.dispose is not a function
    at CurrentLineAnnotationProvider.stop (/home/avergnet/.theia-ide/deployedPlugins/mrcrowl.hg-1.8.1/extension/out/annotations.js:100:72)
    at CurrentLineAnnotationProvider.applyConfiguration (/home/avergnet/.theia-ide/deployedPlugins/mrcrowl.hg-1.8.1/extension/out/annotations.js:111:18)
    at new BaseAnnotationProvider (/home/avergnet/.theia-ide/deployedPlugins/mrcrowl.hg-1.8.1/extension/out/annotations.js:71:14)
    at new CurrentLineAnnotationProvider (/home/avergnet/.theia-ide/deployedPlugins/mrcrowl.hg-1.8.1/extension/out/annotations.js:105:1)
    at /home/avergnet/.theia-ide/deployedPlugins/mrcrowl.hg-1.8.1/extension/out/main.js:55:136
    at Generator.next (<anonymous>)
    at fulfilled (/home/avergnet/.theia-ide/deployedPlugins/mrcrowl.hg-1.8.1/extension/out/main.js:10:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Looking at the extensions's code, it seems this line is throwing the error, which means Theia does not properly implement the Disposable class.

But looking at the extension API support report, it seems the Disposable class should be fully supported.

Additional Information

I can provide more information if necessary, thank you for this project.

sgraband commented 1 month ago

I can take a look