project-chip / certification-tool

A test harness and tooling designed to simplify development, testing, and certification for devices, guided by the Connectivity Standards Alliance.
https://csa-iot.org/
Apache License 2.0
42 stars 24 forks source link

[Bug] TH save button just does nothing if the json config is off #447

Open cecille opened 1 month ago

cecille commented 1 month ago

Describe the bug

There's no feedback from the TH at all if the json config file is incorrect. Humans aren't traditionally good at writing json by hand, but if you do something like miss a comma or a space, or use an incorrect tag (? in some cases?), the save button doesn't work at all. This is exacerbated by the fact that tab indentation can't be used, so we're spacing out entries by hand in a non-monospace font.

This is particularly problematic when creating a project because if you edit the config and it's not correct, the project WILL create, but it will use the original config file, which means people probably think they're running with a different config than they are.

Steps to reproduce the behavior

Two scenarios: 1) open a project, edit the config, add a comma to the end of the last entry in a block, hit update, nothing happens (ie, no feedback as to what went wrong) 2) Open a new project, edit the config with something incorrect, save. Project saves, but when you edit it, the original config will be there

Expected behavior

I would hope for some kind of feedback about what's wrong. But definitely the project should not be created with the un-edited config.

Log files

No response

PICS file

No response

Screenshots

No response

Environment

No response

Additional Information

No response

rquidute commented 1 month ago

Hi @cecille Could you provide more details regarding scenario 2.

I tried to add something incorrect and I got this error message:

Screenshot 2024-10-10 at 13 56 43