Skip to content

TypeError in Web UI - Cannot read properties of undefined (reading 'length') #16473

Closed

Description

@HuaiminHuang

Description

Stack Trace:

TypeError: Cannot read properties of undefined (reading 'length')
    at Object.fn (http://127.0.0.1:4096/assets/session-Cg8YeoLd.js:14:50663)
    at Mk (http://127.0.0.1:4096/assets/index-Dl3PGFdp.js:2:6835)
    at Pl (http://127.0.0.1:4096/assets/index-Dl3PGFdp.js:2:6592)
    at Object._6 (http://127.0.0.1:4096/assets/index-Dl3PGFdp.js:2:5606)
    at get style (http://127.0.0.1:4096/assets/session-Cg8YeoLd.js:14:51075)
    at jL (http://127.0.0.1:4096/assets/index-Dl3PGFdp.js:2:24146)
    at Object.fn (http://127.0.0.1:4096/assets/index-Dl3PGFdp.js:2:23793)
    at Mk (http://127.0.0.1:4096/assets/index-Dl3PGFdp.js:2:6835)
    at Pl (http://127.0.0.1:4096/assets/index-Dl3PGFdp.js:2:6592)
    at Oe (http://127.0.0.1:4096/assets/index-Dl3PGFdp.js:2:1831)

Environment:

  • opencode: 1.2.20
  • Node: v24.12.0
  • npm: 11.6.2
  • OS: WSL Ubuntu 22.04.5 LTS (jammy)
  • Browser: Chrome auto-redirect

!  OPENCODE_SERVER_PASSWORD is not set; server is unsecured.

                                   ▄
  █▀▀█ █▀▀█ █▀▀█ █▀▀▄ █▀▀▀ █▀▀█ █▀▀█ █▀▀█
  █  █ █  █ █▀▀▀ █  █ █    █  █ █  █ █▀▀▀
  ▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀

  Web interface:      http://127.0.0.1:4096/

Plugins

superpower

OpenCode version

1.2.20

Steps to reproduce

Steps to Reproduce:
Run opencode web command in terminal, error appears immediately after Chrome browser opens

Screenshot and/or share link

Image

Operating System

OS: WSL Ubuntu 22.04.5 LTS (jammy)

Terminal

WSL Ubuntu terminal

Activity

  1. github-actions commented on Mar 7, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. Eric-Guo commented on Mar 7, 2026

    @Eric-Guo
    Contributor

    Same issue, thanks reporting as I just fix my self by GPT 5.4, so save me open another issue.

  3. cyberprophet commented on Mar 7, 2026

    @cyberprophet
    Contributor

    Root Cause

    The crash is in packages/ui/src/components/text-shimmer.tsx lines 40 and 47:

    const shimmerSize = createMemo(() => {
      const len = Math.max(props.text.length, 1)  // crashes if props.text is undefined
      ...
    })
    const shimmerDuration = createMemo(() => {
      const len = Math.max(props.text.length, 1)  // same
      ...
    })

    props.text is typed as string but can be undefined at runtime when the reactive value feeding it (e.g. i18n translation) hasn't resolved yet during initial evaluation.

    Two PRs addressing this

    Both are valid. PR #16475's approach is slightly more idiomatic for SolidJS (memoized fallback) and eliminates the duplicated len computation.

  4. HRronaldo commented on Mar 7, 2026

    @HRronaldo

    Same issue, Windows 11

  5. lzss433 commented on Mar 7, 2026

    @lzss433

    Same issue, Windows 11 with oh my opencode

  6. jeremyakers commented on Mar 7, 2026

    @jeremyakers

    Same issue. Ubuntu 22.04

    I see a fix was merged. Any idea when it will be released?

  7. PengMai1998 commented on Mar 7, 2026

    @PengMai1998

    Same issue. Windows 11.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwebRelates to opencode on web / desktop

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions