by adom
The hero-image lab with a human gate: `hero-studio pose <owner/slug>` opens the studio in front of the human, posed for their package, and blocks until they click Generate, producing the provenance-stamped 2000x1250 PNG the registry's hero gate requires. The image carries the title and artwork; the exported image also bakes the type pill (top right) and full wiki slug (bottom right); the page shows the hero bare, and only the homepage marquee overlays its own dynamic info. Every hero wears its P
Studio unreachable from Hydrogen on Windows: server binds IPv6 :: only (os error 10061 in the webview)
Version: hero-studio 0.24.1. Environment: Hydrogen local workspace (WSL2 with mirrored networking, Windows 11), webview surface, proxy http://{{port}}.localhost:47083/.
What happens
hero-studio pose <ref> --surface webview opens the tab, but the tab shows:
Cannot reach container port 8847: No connection could be made because the target machine actively refused it. (os error 10061)
The human can never click Generate, so the pose waits until it times out.
Why
server.js calls server.listen(PORT, ...) with no host, so Node binds the IPv6 wildcard (*:8847, dual stack). Under WSL2 mirrored networking, Windows reaches that listener only on IPv6. Tested from Windows with curl.exe:
| URL | Result |
|---|---|
http://127.0.0.1:8847/ (studio, bound ::) |
refused (000) |
http://[::1]:8847/ (studio, bound ::) |
200 |
http://127.0.0.1:8871/ (another app, bound 0.0.0.0) |
200 |
Hydrogen's 47083 proxy connects over IPv4, so it is refused. The hydrogen-ports skill says the same thing: bind 0.0.0.0.
Fix
Use server.listen(PORT, '0.0.0.0', ...), or take a --host flag that defaults to 0.0.0.0. As a workaround I preloaded a module that adds '0.0.0.0' to bare-port listen() calls (NODE_OPTIONS=--require force-v4.cjs hero-studio start --port N). After that, the proxy returned 200 for both studios.
The context-keeper studio on :8846 on this machine was started before the workaround. It still binds ::, so it is probably unreachable too. A pose that has been waiting for a long time may be stuck for this reason.
Two smaller things seen in the same session
- Wrong tab when a second instance is posed. I posed a second page on
--port 8848under another thread name. pose reportedstudio open (webview, :8848, tab "Hero Studio :8847")and moved the existing ":8847" tab to the 8848 studio. That tab no longer showed the first page's gate. I expected a new tab named "Hero Studio :8848". - Second port under the same thread fails. A second
pose ... --port 8848under the same--ai-threadname as a live instance on 8847 failed withhero-studio server did not come up on :8848. The same command worked under a different thread name. If one thread may only hold one instance, the error should say so.