Skip to content

Bug: Upload/Download and Run fails on modern VS Code versions #126

@julian-ramos

Description

@julian-ramos

Description

The ev3dev-browser extension fails to upload files and run programs when used with recent versions of VS Code.
Fixes #125

The upload process hangs at:

Sending: (1/1) main.py

and eventually throws an exception in the extension host.

Error

Version 1.2.1:

TypeError: rc is not a function

at ...
fsetstat(...)
fchmod(...)

Version 1.2.0:

TypeError: isDate is not a function

at attrsToBytes (.../ssh2-streams/lib/sftp.js)
at SFTPStream.fsetstat(...)
at SFTPStream.fchmod(...)

Root Cause

The extension depends on an older version of ssh2-streams that relies on deprecated Node.js APIs which are no longer available in the Node runtime bundled with current versions of VS Code.

The failure occurs during the SFTP upload phase when the extension attempts to call fchmod() after uploading a file.

Environment

  • macOS
  • Current VS Code release
  • LEGO EV3 MicroPython project
  • EV3 connected via USB
  • SSH connection works normally
  • Manual scp upload and execution work correctly

Steps to Reproduce

  1. Create a LEGO EV3 MicroPython project.
  2. Connect an EV3 brick.
  3. Select "Download and Run".
  4. Observe upload hanging or failing.

Expected Behavior

The extension uploads the file to the EV3 and launches the program.

Actual Behavior

Upload fails during SFTP file permission handling and the extension throws a runtime exception.

Additional Notes

A local patch to the SFTP dependency resolves the issue and restores normal "Download and Run" functionality on modern VS Code versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions