Skip to content

Command Links in Walkthrough Rendered Markdown Fail with TypeError (also any links in MD preview) #652

@mikicvi-SAP

Description

@mikicvi-SAP

Description

Command links in VS Code walkthrough markdown files fail to execute with a Cannot read properties of undefined (reading 'length') error. This breaks basic walkthrough functionality, like linking to commands in the walkthrough body or to external links.

Reproduction instructions

  1. Run OpenVSCode Server (linuxserver/openvscode-server:latest)
    docker run -d --name=openvscode-server \
      -e PUID=1000 -e PGID=100 \
      -p 3000:3000 \
      -v ./config:/config \
      lscr.io/linuxserver/openvscode-server:latest
    
  2. Open http://localhost:3000
  3. Open Command Palette → "Get Started: Open Walkthrough"
  4. Open any walkthrough with command links in markdown - you can use https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SAPSE/vsextensions/sap-ux-application-modeler-extension/latest/vspackage
  5. Click any command link (e.g. Learn More)
  6. Observe no-launch, and an accompanying error in the devtools console.
workbench.js:38   ERR Cannot read properties of undefined (reading 'length'): TypeError: Cannot read properties of undefined (reading 'length')
    at uN (http://localhost:3000/stable-072586267e68ece9a47aa43f8c108e0dcbf44622/static/out/vs/code/browser/workbench/workbench.js:29:59536)
    at wc (http://localhost:3000/stable-072586267e68ece9a47aa43f8c108e0dcbf44622/static/out/vs/code/browser/workbench/workbench.js:30:64992)
    at She.value (http://localhost:3000/stable-072586267e68ece9a47aa43f8c108e0dcbf44622/static/out/vs/code/browser/workbench/workbench.js:3987:16362)
    at E.C (http://localhost:3000/stable-072586267e68ece9a47aa43f8c108e0dcbf44622/static/out/vs/code/browser/workbench/workbench.js:29:2349)
    at E.fire (http://localhost:3000/stable-072586267e68ece9a47aa43f8c108e0dcbf44622/static/out/vs/code/browser/workbench/workbench.js:29:2568)
    at http://localhost:3000/stable-072586267e68ece9a47aa43f8c108e0dcbf44622/static/out/vs/code/browser/workbench/workbench.js:4257:12399
    at http://localhost:3000/stable-072586267e68ece9a47aa43f8c108e0dcbf44622/static/out/vs/code/browser/workbench/workbench.js:4257:17142
    at Set.forEach (<anonymous>)
    at H.onmessage (http://localhost:3000/stable-072586267e68ece9a47aa43f8c108e0dcbf44622/static/out/vs/code/browser/workbench/workbench.js:4257:17131)

Possible issue

It looks like the error occurs in the webview message handler (suggested by H.onmessage in logs) when processing command execution requests from walkthrough markdown. Then the uN function tries to read .length on an undefined args array.

Extra context

ENV

Version: 1.109.5
Commit: 0725862
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Embedder: openvscode-server

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions