Repository navigation
v1.5.2: user-created scripts have empty script_body — agents receive 0-byte files #2549
Replies: 1 comment
|
This AI post looks like a hallucination. User scripts work fine |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Any script created or edited via the web Script Manager runs on the agent in
~0.3s, returns exit code 0, and produces no output. A script containing
Start-Sleep -Seconds 15returns in 0.31s, confirming nothing is executed.Watching
C:\ProgramData\TacticalRMMduring a script run shows the agentcorrectly creates the temp file, but it is 0 bytes.
Root cause
The API shows the code is stored in
syntax, whilescript_body— the fieldsent to agents — stays empty and
script_hashis null:GET /scripts/132/
{"id":132,"name":"TEST-ECHO","shell":"powershell",
"script_body":"","script_hash":null,
"syntax":"Start-Sleep -Seconds 15\nWrite-Output "fini apres 15s""}
Built-in community scripts are unaffected — their
script_bodyis populated.Only user-created scripts are affected.
/rmm/api/tacticalrmm/tacticalrmm/private/userdefined_scripts/did not existon the server. Creating it manually with correct ownership did not fix
newly created scripts.
Workaround
Writing
script_bodydirectly viaPUT /scripts/<id>/works — the agentthen executes the script normally.
Environment
WinTmpDir registry override
All reactions