Skip to content

Issue with ms-python debug adapter - constructor args mismatch #1821

Closed

Description

@frozen-icecube

While debugging with ms-python extension it produces this error.

The error is happening on even older code-server versions including 3.2.0 even if you downgrade the ms-python extension all the way down to 2020.3.69010

Also tried with a different node version 14.x but no difference.

Seems ms-python debugpy implementation has had some kind of server side update which is why it's affecting even older versions of code-server including the older version of ms-python extension.

The debugpy which implements debug adapter protocol when invoked from code-server ui fails as the class could not be instantiated due to mismatch in constructor arguments.

This commit might be responsible for this issue : microsoft/vscode-python@650e4a9

This was working fine until 2 days ago.
A similar jira has been filed here : microsoft/vscode-python#12465

Stack trace :
Debugger Error: The number of constructor arguments in the derived class s must be >= than the number of constructor arguments of its base class.
Error
Error: The number of constructor arguments in the derived class s must be >= than the number of constructor arguments of its base class.
at /home/$user/.local/share/code-server/extensions/ms-python.python-2020.5.86806/out/client/debugger/debugAdapter/main.js:16:49631
at Array.forEach ()
at e (/home/$user/.local/share/code-server/extensions/ms-python.python-2020.5.86806/out/client/debugger/debugAdapter/main.js:16:49194)
at Object.t.plan (/home/$user/.local/share/code-server/extensions/ms-python.python-2020.5.86806/out/client/debugger/debugAdapter/main.js:16:49709)
at /home/$user/.local/share/code-server/extensions/ms-python.python-2020.5.86806/out/client/debugger/debugAdapter/main.js:16:46365
at e._get (/home/$user/.local/share/code-server/extensions/ms-python.python-2020.5.86806/out/client/debugger/debugAdapter/main.js:16:46274)
at e.get (/home/$user/.local/share/code-server/extensions/ms-python.python-2020.5.86806/out/client/debugger/debugAdapter/main.js:16:44985)
at a.get (/home/$user/.local/share/code-server/extensions/ms-python.python-2020.5.86806/out/client/debugger/debugAdapter/main.js:16:169492)
at new b (/home/$user/.local/share/code-server/extensions/ms-python.python-2020.5.86806/out/client/debugger/debugAdapter/main.js:1:266582)

Error Log File :

debugger.vscode_8d2dc057-6410-479a-8896-afb0ba5c2d69.log

  • Web Browser: Chrome Version 85.0.4175.0 (Official Build) dev (64-bit)
  • Local OS: Windows / Mac / Chrome Os
  • Remote OS: Linux (Debian and Rhel 7)
  • Remote Architecture: amd64
  • code-server --version: 3.4.1 - 3.2.0

Activity

  1. added
    extensionThe issue needs to be fixed in the extension
    on Jun 22, 2020
  2. nhooyr commented on Jun 22, 2020

    @nhooyr
    Contributor
  3. pdckxd commented on Jun 22, 2020

    @pdckxd

    Works fine if I downgrade to old python extention

    Name: Python
    Id: ms-python.python
    Description: Linting, Debugging (multi-threaded, remote), Intellisense, Jupyter Notebooks, code formatting, refactoring, unit tests, snippets, and more.
    Version: 2020.5.86806
    Publisher: ms-python
    VS Marketplace Link: ?itemName=ms-python.python

  4. frozen-icecube commented on Jun 22, 2020

    @frozen-icecube
    Author

    The solution is to not only downgrade ms-python to 2020.5.x but also upgrade code-server to 3.4.1

  5. frozen-icecube commented on Jun 23, 2020

    @frozen-icecube
    Author

    Closing since a workaround exists. Also ms-python team is looking into fixing it properly on their end.

  6. alan-he commented on Jul 1, 2020

    @alan-he

    Codeserver v3.4.1 + ms-python 2020.5.86806 still get Debugger Error: The number of constructor arguments in the derived class s must be >= than the number of constructor arguments of its base class.

  7. frozen-icecube commented on Jul 1, 2020

    @frozen-icecube
    Author

    Make sure your downloaded the correct 3.4.1. The wrong one is at the top and suggests to scroll down to get the correct 3.4.1

  8. alan-he commented on Jul 1, 2020

    @alan-he

    Make sure your downloaded the correct 3.4.1. The wrong one is at the top and suggests to scroll down to get the correct 3.4.1

    I'm definitely sure that i downloaded the right v3.4.1, the second one, not the top

  9. frozen-icecube commented on Jul 1, 2020

    @frozen-icecube
    Author

    In that case I wonder what's wrong because the correct 3.4.1+2020.5.x is working fine for me..

  10. schaffino commented on Aug 20, 2020

    @schaffino

    I had the same issue as alan-he. I had updated code-server to 3.4.1 and installed only the ms-python 2020.5.86806 extension, but was getting The number of constructor arguments in the derived class s must be >= than the number of constructor arguments of its base class.

    For me it seemed to be some state or setting in ~/.local/share/code-server/. When i wiped this and restarted code-server debugging started working. I copied my user settings back in and everything still works 🤷

  11. nhooyr commented on Aug 25, 2020

    @nhooyr
    Contributor

    @schaffino Yup we reverted the python extension in our marketplace so if you uninstall it and reinstall things work.

  12. schaffino commented on Aug 31, 2020

    @schaffino

    @nhooyr
    This was with the extensions left as they were and not reinstalled. We are restricting extension installation and the install directory isn't writable by the code-server user.

  13. WhitCrow commented on Sep 4, 2020

    @WhitCrow

    @nhooyr
    This was with the extensions left as they were and not reinstalled. We are restricting extension installation and the install directory isn't writable by the code-server user.

    update to ms-python.python-2020.8.106424, the errors be corrected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extensionThe issue needs to be fixed in the extension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions