Closed marinbernard-pep06 closed 3 years ago
FYU, I just modified the script to remove the output line which included special characters. After this change, the success ping was sent successfully.
Is this a UTF-16 Little Endian output issue with Windows?
Runitor naïvely treats stderr and stdout as just byte streams, but the backend Healtchecks running on Django seems to be expecting it to be UTF-8.
Are you asking for a feature request from Runitor, so we keep this issue open or do you want to close it?
Is this a UTF-16 Little Endian output issue with Windows?
Yes it is.
Are you asking for a feature request from Runitor, so we keep this issue open or do you want to close it?
POSTing a simple string with special chars with the Invoke-RestMethod
PowerShell cmdlet triggers the same error. The only way to avoid it is to explicitly build a UTF-8 string object, for use as the POST body.
Since the error may be reproduced without Runitor being involved at all, I think we'd better close the issue. I'll open another at HealthChecks.
Thank you!
FYI, I opened another issue at HealthChecks' GH.
Hi,
We use Runitor to monitor scheduled tasks involving PowerShell on Windows Server boxes. Some of our scripts may output a few line of text on stdout. In that case, the success ping may fail, as Django may reject it with a
UnicodeDecodeError
. So far, it seems the exception is raised only when the logged output contains special (non-latin1) characters.We're using HealthChecks 1.23 with Runitor 0.8.0. HealthChecks 1.23 fixed a bug involving Unicode characters in webhook headers. I hoped the issue would disappear after upgrading to the new version, but it unfortunately did not. I don't know which project should deal with this issue. If this is a HealthChecks error, please let me know.
Here is the transcript of a job failing to send its success ping. The lines between the Runitor invocation and the Runitor error message were printed by the script. Note the
Espace disque lib?r??:0
string which contains mangled special (French) characters:Running the very same script without the Runitor wrapper preserves special characters:
Here is the Django exception. I removed the settings; let me know if you need them.
Many thanks for any help!