How to debug JUnit XML parsing errors?

Replace this template with your information

Describe your question in as much detail as possible:

Suddenly the pipeline with RSpec fails without test output. Apparently there’s an error with the XML:
JUnit XML parsing failed: 78:224: FATAL: Couldn't find end of Start Tag failure line 78

although that’s difficult to believe. Because when checking with tidy they seem to be valid except a few replacing invalid character code ... warnings. But this is certainly not about missing end tags.

Furthermore the error message apparently gives a line number but doesn’t mention where the file is located or how to access it.
Therefore the information about the line number is pretty useless if there are many files. :disappointed:

I also found this thread / this issue where there’s a different issue on huge XML files but in our case there are just ~70 file where the biggest file has 373 KB.

Now it would be nice if the error message and the help page would give actionable advice on what to do. It would even be perfect if the JUnit file would be linked on the error message. Until then I’d kindly ask here for help on how to debug this.

Any advice on how to debug this?

  • GitLab (Hint: /help): self-managed GitLab CE 15.9.3
  • Runner (Hint: /admin/runners): 15.8.2