Skip to content

Bugfix for broken RequestUpdateScript*() functions#162

Merged
cinderblocks merged 1 commit into
cinderblocks:masterfrom
mercurylinden:bugfix/update_script_fix
Jun 5, 2026
Merged

Bugfix for broken RequestUpdateScript*() functions#162
cinderblocks merged 1 commit into
cinderblocks:masterfrom
mercurylinden:bugfix/update_script_fix

Conversation

@mercurylinden

@mercurylinden mercurylinden commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Description

When trying to use the RequestUpdateScript*Async() functions, the uploadStatus response would always be "Failed to parse capability response: Unable to deserialize data: unrecognized format." The issue is that PostStringAsync(cap, msg.Serialize(), ...) takes a string as its second parameter, but msg.Serialize() returns an OSDMap. OSDMap inherits from OSD which has public static implicit operator string(OSD value) { return value.AsString(); }, and OSDMap.AsString() falls back to the base implementation returning string.Empty, so an empty string is getting sent as the message.

The fix is to use PostCapAsync instead of PostStringAsync. It takes an OSD directly and serializes it properly as XML LLSD before posting.

Changes

  • Replaced calls to PostStringAsync with PostCapAsync in RequestUpdateScriptAgentInventoryAsync and RequestUpdateScriptTaskAsync

Testing

dotnet build project built successfully
dotnet test all tests passing

…unrecognized format. from UpdateScript functions
@cinderblocks cinderblocks merged commit 63393fc into cinderblocks:master Jun 5, 2026
1 of 11 checks passed
@cinderblocks

Copy link
Copy Markdown
Owner

A sound fix! Thank you.

@mercurylinden mercurylinden deleted the bugfix/update_script_fix branch June 5, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants