eclipse-theia / theia

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

Activating extension 'Python Debugger' failed: r.workspace.registerPortAttributesProvider is not a function #13881

Closed zoof closed 6 days ago

zoof commented 1 week ago

Bug Description:

I have a variety of Python related extensions installed (Python, Python Debugger, Jupyter related extensions and Micromamba). When opening a Python script, I get the above error.

Steps to Reproduce:

  1. Start Theia
  2. Open a Python script
2024-07-03T22:18:37.479Z root INFO [hosted-plugin: 4600] calling activation function on NPM support for VS Code (built-in)
2024-07-03T22:18:37.516Z root INFO [hosted-plugin: 4600] Debug configuration provider has been registered: python, trigger: 1
2024-07-03T22:18:37.559Z root INFO [hosted-plugin: 4600] calling activation function on Python
2024-07-03T22:18:37.559Z root INFO [hosted-plugin: 4600] PLUGIN_HOST(4600): PluginManagerExtImpl/loadPlugin(/home/user/.theia-ide/deployedPlugins/ms-python.debugpy-2024.6.0/extension/dist/extension.js)
2024-07-03T22:18:37.672Z root INFO [hosted-plugin: 4600] Debug configuration provider has been registered: debugpy, trigger: 1
2024-07-03T22:18:37.672Z root INFO [hosted-plugin: 4600] Debug configuration provider has been registered: debugpy, trigger: 2
2024-07-03T22:18:37.680Z root ERROR [hosted-plugin: 4600] Activating extension 'Python Debugger' failed: TypeError: r.workspace.registerPortAttributesProvider is not a function
    at t.registerDebugger (/home/user/.theia-ide/deployedPlugins/ms-python.debugpy-2024.6.0/extension/dist/extension.js:2:880557)
    at e.activate (/home/user/.theia-ide/deployedPlugins/ms-python.debugpy-2024.6.0/extension/dist/extension.js:2:1128292)
    at C.startPlugin (/tmp/.mount_TheiaIl61IPG/resources/app/lib/backend/339.js:1:494875)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /tmp/.mount_TheiaIl61IPG/resources/app/lib/backend/339.js:1:492508

Additional Information

tjk144 commented 1 week ago

Yup, I got the exact same issue too on same versions, however the extension that appears to be causing the issue on my end is just the Python one. There was a kinda similar experience over here https://github.com/theia-ide/theia-apps/issues/441 but rolling back the extension versions has not changed this error.

2024-07-06T20:43:10.398Z [Info] Name: Python Debugger
2024-07-06T20:43:10.398Z [Info] Module: debugpy
2024-07-06T20:43:10.403Z [Error] sendDebugpySuccessActivationTelemetry() failed. TypeError: r.workspace.registerPortAttributesProvider is not a function
    at t.registerDebugger (/home/user/.theia-ide/deployedPlugins/ms-python.debugpy-2024.6.0/extension/dist/extension.js:2:880557)
    at e.activate (/home/user/.theia-ide/deployedPlugins/ms-python.debugpy-2024.6.0/extension/dist/extension.js:2:1128292)
    at C.startPlugin (/opt/TheiaIDE/resources/app/lib/backend/339.js:1:494875)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /opt/TheiaIDE/resources/app/lib/backend/339.js:1:492508
msujew commented 1 week ago

but rolling back the extension versions has not changed this error.

I believe older versions from last year still work.

Anyway, this will be fixed once https://github.com/eclipse-theia/theia/pull/13894 is merged.