When using AI Staging with the starter prompt, the app fails with the following error:
Failed to decode action envelope: DecodingError.dataCorrupted: Data was corrupted. Debug description: The given data was not valid JSON.. Underlying error: Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected character 's' after top-level value around line 1, column 5." UserInfo={NSJSONSerializationErrorIndex=4, NSDebugDescription=Unexpected character 's' after top-level value around line 1, column 5.}
Steps to reproduce:
- Open BetterStage
- Go to AI Staging
- Use the default/starter prompt
- Trigger the action
Observed behavior:
The action envelope returned by the model fails JSON decoding — the underlying NSJSONSerializationErrorIndex=4 / "Unexpected character 's' after top-level value around line 1, column 5" suggests the AI response is not valid JSON (e.g. it may contain a stray non-JSON token such as the start of a second value or trailing text right after the first JSON value ends).
Expected behavior:
AI Staging should either produce valid JSON reliably, or handle/report malformed model output gracefully instead of erroring out on the raw decode.
When using AI Staging with the starter prompt, the app fails with the following error:
Steps to reproduce:
Observed behavior:
The action envelope returned by the model fails JSON decoding — the underlying
NSJSONSerializationErrorIndex=4/ "Unexpected character 's' after top-level value around line 1, column 5" suggests the AI response is not valid JSON (e.g. it may contain a stray non-JSON token such as the start of a second value or trailing text right after the first JSON value ends).Expected behavior:
AI Staging should either produce valid JSON reliably, or handle/report malformed model output gracefully instead of erroring out on the raw decode.