Skip to content

Always Include Plugin Field Error(s) #105 - #107

Open
Ralumbi wants to merge 4 commits into
wise-old-man:masterfrom
Ralumbi:Always-Include-Plugin-Field-Error(s)
Open

Always Include Plugin Field Error(s) #105#107
Ralumbi wants to merge 4 commits into
wise-old-man:masterfrom
Ralumbi:Always-Include-Plugin-Field-Error(s)

Conversation

@Ralumbi

@Ralumbi Ralumbi commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Fixing issue #105

@rorro

rorro commented Jun 10, 2026

Copy link
Copy Markdown
Member

I'm not 100% sure this solves our issue here. The value that was sent to the server was "\u0000\u0000\u0000\u0000" which is a string and not an actual null value. I'm not sure if the data sent was actual null values or not.

I think we should instead add some better logging to this so we can catch the client side of things and maybe we can fix the root cause of it. It happens so infrequently that I don't think it's urgent to fix immediately.

@Ralumbi

Ralumbi commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

You are correct, I was not thinking too bright here.
The only thing that would make this work if it was an issue which happens a lot would be something like
myString.replace("\u0000", "");

But then that would be an hotfix not a true permanent solution.
I will go over it a bit more once I get a brighter idea and have more knowledge about the codebase.

@Ralumbi

Ralumbi commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

I have done some research and this would be the best explanation now why it sometimes put \u0000 back as response towards json.

The API response sometimes contained null characters (\u0000), which caused JsonSyntaxException when parsing the JSON response.
This issue likely stems from okhttp3 defaulting to the ISO-8859-1 charset when the server's Content-Type header does not specify a charset. If the response is actually UTF-8, this mismatch can lead to incorrect character decoding.
To resolve this, the parseResponse method in WomClient has been updated to read the response body as a byte array and then explicitly decode it using UTF-8. This ensures the response is always interpreted correctly, preventing character-encoding issues.

I know this isn't top prio, but I started this PR and now I feel obligated to fix it.

@rorro

rorro commented Jul 9, 2026

Copy link
Copy Markdown
Member

Sorry for a super late reply to this.
Your current fix is changing the response that is received from the API. The issue is that the client itself is sending garbage username. I think we should fix the usernames before they are sent to the API. I don't know what the best way to do this would be. Maybe strip the null characters from the string before sending the request. Also, the only error message we have is from the API so I don't know if simply stripping out \u0000 from the string would do it. We don't know exactly what the client is sending.

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