chromaui/chromatic-cli

Specifying junitReport: true makes chromatic crash when reporting build status

Closed this issue · 5 comments

Bug report

I just enabled junitReport: true in my chromatic config file, mainly to explore what it can be used for. After that, every chromatic build started to fail with

TypeError: ✖ Failed to generate build report
n.replace is not a function
at sbn (PATH\node_modules\chromatic\dist\chunk-EEJPR7JT.js:995:143)
at TW.task (PATH\node_modules\chromatic\dist\chunk-EEJPR7JT.js:638:24698)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Disabling junitReport works around the issue.

A solution to this ticket could be to check if junitReport is defined, and report a warning or error if it's not - instead of a runtime error.

I'm not using junit myself (yet?), so I don't be able to provide any further information.

Thanks, I'm able to reproduce this using CLI v11.0.0. Is that the version you are using?

@woutervanvliet to be specific, when the CLI command fails for me, it only fails after tests complete and a build is produced that I can access on www.chromatic.com. Is that your experience as well?

For now, a workaround that I was able to use is to use the --junit-report CLI flag instead of specifying the option in the config file.

@andrewortwein That's exactly what I experience as well, on the same version of Chromatic CLI

@woutervanvliet this should be fixed now. Can you try it with the latest patch release?

Yes, works now. Thanks!

May I also direct your attention to #933 (and it's associated PR) - which is blocking our team from doing some configuration cleanups.