Bugs with the Lua Plugin Websocket
Tapple Gao
Tested on:
- Viewer: Second Life Release 26.5.0.42122621216 (64bit)
- Simulator: Luau 2026-11-10.42914476267
- OS: Ubuntu 26.04
- The viewer crashes when the editor websocket port is already in use. If the viewer tries to start its websocket server on a port that is already bound (by another viewer), the viewer crashes â no graceful error, no fallback. Repro: run two viewers with their editor servers configured on the same port; the second one dies.
- system.pingresponsetimestampis truncated to signed int32. Spec: "The original timestamp from the request, echoed by the editor server." We send a ms epoch (~1.795e12); the response returns -222971890, which is exactly our value mod 2^32 interpreted as signed int32 (verified arithmetically against the send time). Since any real ms epoch overflows int32, the echo is always negative.
- system.pingresponseserver_time= -2147483648 (INT32_MIN). Spec: "Unix timestamp in milliseconds when the response was generated." Every ping returns exactly INT32_MIN â looks like an uninitialised int32. The server clearly knows its time (system.getStats.uptime advances correctly).
- Compile errors return no result on the websocket. Saving a syntactically invalid script (content: just ]) viaobject.content.savereturns success: true with no compiled field and no diagnostics, and no script.compiled notification arrives â although the spec says compile diagnostics come back inline in the response.
- runtime.error's ItemRef.language reports "lsl" for Luau scripts that fail to compile. A Luau script (object.listcorrectly shows vm=luau) that faults at runtime sends item.language: "lsl"; only the lua_script stack frames reveal it's Lua. This is partially a duplicate of https://feedback.secondlife.com/slua-alpha/p/scripts-with-a-compiler-error-forget-their-vm
6. When clicking "Explore in IDE", the object is not actually published unless:
- a websocket client is already connected to the viewer's editor server, or
- launching code(VS Code) succeeds
In all other cases the click silently does nothing â no error shown, only a log warning. How to observe "not published": call
object.list
on the websocket (no parameters; returns the currently explored objects with their inventories) â it returns an empty list even though the button claims the object is being explored. The viewer log shows the cause at click time:WARNING LLProcess::launch : Could not locate 'code' on PATH -- launch will likely fail
WARNING ScriptEditorWS launchVSCode : Failed to launch VS Code. ...
with no corresponding publish entry. (With a websocket client connected, the same click publishes correctly â verified.)
7. system.getStats reports zeroed counters and an ambiguous method count
After dozens of successful calls across multiple connections (
system.status
, object.list
, object.request
, object.unpublish
), the response still shows "total_requests_handled": 0
and "total_notifications_sent": 0
. If total_notifications_sent
counts notifications sent by the server, it should be at least as high as the number of completed handshakes, since every connection receives a session.ok
notification â it stays 0
.The same response shows
"global_method_count": 1
; the server's own log shows exactly one global method registered at startup (system.getStats
) with all other methods apparently per-connection. global_method_count
may thus be as intended, but this should be clarified in the documentation. system.getStats
is not in the public protocol documentation; if any of these fields are placeholders, it should be documented in external-editor-json-rpc.md
---
These were tested with the help of an AI agent. Full notes in my repository: https://github.com/tapple/slsync
Log In