Describe the bug
The newly published Windows simple.webplatform executable starts correctly and connects to GAMA Server, but it fails when forwarding Unity player messages to GAMA.
As a result, Unity connects to the webplatform and the GAMA experiment starts/resumes correctly, but the Unity player is not created in GAMA and Unity receives no runtime simulation data.
The failure happens inside the webplatform executable when it tries to send messages to GAMA:
TypeError: bufferUtil$1.mask is not a function
Build context
The failing executable appears to come from this GitHub Actions run:
https://github.com/project-SIMPLE/simple.webplatform/actions/runs/26748818349
Run details:
- Workflow:
build-ci.yaml
- Trigger: push
- Branch:
dev
- Commit:
f2b2be9
- Status: success
- Artifact used:
windows-compiled-archive
The issue was observed with the Windows executable produced by this CI build.
To reproduce
- Start GAMA Server on port
1000.
- Start the Windows
simple.webplatform executable from the CI artifact.
- Open a Unity project using
com.project-simple.unity-plugin.
- Enter Play Mode in Unity.
- Observe that the GAMA experiment starts/resumes.
- Observe that no Unity player is created in GAMA and Unity receives no runtime data.
- Check the webplatform console logs.
What works
The executable starts:
info core·index Starting the SIMPLE Webplatform !
info monitor·MonitorServ… Creating monitor server on: ws://0.0.0.0:8001
info multi·PlayerManager Creating monitor server on: ws://0.0.0.0:8080
Webplatform started and is accessible
http://localhost:5173
It connects to GAMA:
info sim·GamaConnector Connected to Gama Server on ws://localhost:1000
Unity is detected:
info multi·PlayerManager New connection of the player of id Player_44
The GAMA experiment starts/resumes successfully.
What fails
The player is not created in GAMA, and Unity receives no simulation data.
The webplatform logs this error when forwarding create_player to GAMA:
error sim·GamaConnector Error while sending this message to GAMA:
{
type: 'expression',
exp_id: '0',
expr: 'do create_player("Player_44");'
}
error sim·GamaConnector TypeError: bufferUtil$1.mask is not a function
In earlier tests, the same error also happened when forwarding send_init_data:
error sim·GamaConnector Error while sending this message to GAMA:
{
type: 'ask',
action: 'send_init_data',
args: '{"id":"Player_44"}',
agent: 'simulation[0].unity_linker[0]'
}
error sim·GamaConnector TypeError: bufferUtil$1.mask is not a function
The player WebSocket then closes:
error multi·PlayerManager Can't find which WebSocket been closed...
warning multi·PlayerManager WebSocket for closed mid-send, marking disconnected
Actual behavior
The webplatform executable connects to GAMA and detects Unity, but fails internally when sending WebSocket messages to GAMA.
The Unity player is never created in GAMA, and runtime communication does not start.
Environment
- OS: Windows
- Webplatform: Windows executable from
windows-compiled-archive
- GAMA Server:
ws://localhost:1000
- Webplatform monitor socket:
ws://localhost:8001
- Webplatform player socket:
ws://localhost:8080
- Web UI:
http://localhost:5173
- Unity package:
com.project-simple.unity-plugin
- Unity player id:
Player_44
Describe the bug
The newly published Windows
simple.webplatformexecutable starts correctly and connects to GAMA Server, but it fails when forwarding Unity player messages to GAMA.As a result, Unity connects to the webplatform and the GAMA experiment starts/resumes correctly, but the Unity player is not created in GAMA and Unity receives no runtime simulation data.
The failure happens inside the webplatform executable when it tries to send messages to GAMA:
TypeError: bufferUtil$1.mask is not a function
Build context
The failing executable appears to come from this GitHub Actions run:
https://github.com/project-SIMPLE/simple.webplatform/actions/runs/26748818349
Run details:
build-ci.yamldevf2b2be9windows-compiled-archiveThe issue was observed with the Windows executable produced by this CI build.
To reproduce
1000.simple.webplatformexecutable from the CI artifact.com.project-simple.unity-plugin.What works
The executable starts:
info core·index Starting the SIMPLE Webplatform !
info monitor·MonitorServ… Creating monitor server on: ws://0.0.0.0:8001
info multi·PlayerManager Creating monitor server on: ws://0.0.0.0:8080
Webplatform started and is accessible
http://localhost:5173
It connects to GAMA:
info sim·GamaConnector Connected to Gama Server on ws://localhost:1000
Unity is detected:
info multi·PlayerManager New connection of the player of id Player_44
The GAMA experiment starts/resumes successfully.
What fails
The player is not created in GAMA, and Unity receives no simulation data.
The webplatform logs this error when forwarding
create_playerto GAMA:error sim·GamaConnector Error while sending this message to GAMA:
{
type: 'expression',
exp_id: '0',
expr: 'do create_player("Player_44");'
}
error sim·GamaConnector TypeError: bufferUtil$1.mask is not a function
In earlier tests, the same error also happened when forwarding
send_init_data:error sim·GamaConnector Error while sending this message to GAMA:
{
type: 'ask',
action: 'send_init_data',
args: '{"id":"Player_44"}',
agent: 'simulation[0].unity_linker[0]'
}
error sim·GamaConnector TypeError: bufferUtil$1.mask is not a function
The player WebSocket then closes:
error multi·PlayerManager Can't find which WebSocket been closed...
warning multi·PlayerManager WebSocket for closed mid-send, marking disconnected
Actual behavior
The webplatform executable connects to GAMA and detects Unity, but fails internally when sending WebSocket messages to GAMA.
The Unity player is never created in GAMA, and runtime communication does not start.
Environment
windows-compiled-archivews://localhost:1000ws://localhost:8001ws://localhost:8080http://localhost:5173com.project-simple.unity-pluginPlayer_44