Skip to content

Sensing UI fails to load — 3 bugs block all live data visualization #760

@gangov

Description

@gangov

The sensing server receives ESP32 data perfectly, but the web UI is completely broken by three separate bugs. None of the tabs, buttons, or visualizations work. You just see a blank or half-loaded page.

all in main branch

Bug 1: 3D visualization crashes with "THREE.OrbitControls is not a constructor"

Three.js r160 removed the old-style OrbitControls script. The viz.html page loads it the old way, so it crashes instantly. No 3D view loads at all.

Bug 2: WebSocket connects to wrong port and wrong URL

viz.html hardcodes ws://localhost:8000/ws/pose. The server uses port 3001 for WebSocket (when HTTP is 3000) and the endpoint is /ws/sensing, not /ws/pose. Result: no live data ever reaches the UI, it stays stuck in "MOCK DATA - DEMO MODE" forever.

Bug 3: Toast notification crashes the entire app

When the backend is alive, the app tries to show a "backend connected" toast. But toast.js calls appendChild on a null container because init() was never called first. This throws a TypeError that kills the rest of the page initialization. After that, nothing works — tabs, buttons, live data, everything is dead.

Image

How to reproduce:

  1. Start server: cargo run -p wifi-densepose-sensing-server -- --http-port 3000 --ws-port 3001 --source esp32
  2. Open http://localhost:3000/ui/index.html
  3. Page loads partially, then crashes. Console shows this.container is null

quick and dirty fix that solved the issue locally on my end
sensing-ui-fix.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions