Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strings written into Chrome trace JSON output are not escaped properly #541

Open
quijote opened this issue Feb 1, 2024 · 1 comment
Open

Comments

@quijote
Copy link

quijote commented Feb 1, 2024

gradle-profiler did not produce valid JSON when I ran it with --profile chrome-trace on one of my builds. Specifically the "name" property contained special characters like " and new lines that were not escaped. The result is invalid JSON that Chrome can't parse.

@Dracyr
Copy link

Dracyr commented Nov 7, 2024

Also faced this, in my case caused by parameterized tests.

As a workaround I quickly edited the output file with ripgrep, but it would be nice if it was handled by default.

rg '"name": "(".+?)", "cat"' -r '"name": "rename-me-test", "cat"' bad_file.json > fixed_file.json

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

No branches or pull requests

2 participants