Closed asifma closed 5 months ago
Thanks for the filing the bug. I couldn't reproduce it with a simple JSON. We will look into it.
Hi, would be happy to give you more details on slack. Just ping me.
Fix will be included in the next release.
We have now implemented this fix in v3.3.4.
Describe the bug When attempting to edit a server in the front-end, an error occurs with the message "Invalid JSON: "[object Object]" is not valid JSON." The issue seems to be related to the initial validation of the JSON attribute when loading the edit page for the server object. The UI gives the indication that something is wrong with the json, but it's not and it further impacts the possibility to save any changes before the validation error is gone.
To Reproduce
Expected behavior Editing the server with the custom JSON attribute should not result in a JSON validation error. The JSON object has the correct format, and the validation should not raise an error when loading the edit page.
Please complete the following information about the solution:
[ ] Version: V3.3.0
[ ] Region: us-east-1
[ ] Was the solution modified from the version published on this repository? No
[ ] If the answer to the previous question was yes, are the changes available on GitHub?
[ ] Have you checked your service quotas for the sevices this solution uses? N/A
[ ] Were there any errors in the CloudWatch Logs? NO
Screenshots
Additional context Upon further investigation, I believe the issue is related to the initial validation when loading the edit page for the server object. The problem seems to be occurring in the file JsonAttribute.tsx. The validation error disappears when any character is added to a property, indicating that the JSON object is correctly formatted, and the issue might be in the validation process during the initial page load.