Github Actions log preview crashes the browser tab in some specific cases

For some reason, the Actions log preview does not work properly if the script being run displays a lot of colorized content.

The preview of the problematic step displays an “Error:” label and an empty space.

When looking into the browser’s console, Chrome displays the Maximum call stack size exceeded error and crashes the page after scrolling it.

template-instance.js:44 Uncaught (in promise) RangeError: Maximum call stack size exceeded
    at TemplateInstance._clone (template-instance.js:44)
    at NodePart.__commitTemplateResult (parts.js:244)
    at NodePart.commit (parts.js:186)
    at TemplateInstance.update (template-instance.js:40)
    at NodePart.__commitTemplateResult (parts.js:245)
    at NodePart.commit (parts.js:186)
    at TemplateInstance.update (template-instance.js:40)
    at NodePart.__commitTemplateResult (parts.js:245)
    at NodePart.commit (parts.js:186)
    at TemplateInstance.update (template-instance.js:40)

Firefox displays the too much recursion error but does not crash.

The script I’m trying to run is fairly simple: it prints a large amount of green-colored dots, to simulate a Jasmine reporter which initially caused the errors.

for (let i = 0; i < 10000; i++) {
  process.stdout.write('\x1B[32m.\x1B[0m');
}

Removing the coloring part seems to bypass the problem.

I’m assuming this might be caused by packing large amounts of DOM elements in the “viewport” of the log previewer, which eventually crashed the browser? If the colored elements would be spread vertically, the lazy loading mechanism would probably take care of the issue.


I made a dummy repo for easier reproduction: GitHub - jansiegel/gha-log-crash-test

Steps to reproduce:

  1. Go to Increase the number of displayed 'dots' to 10k. · jansiegel/gha-log-crash-test@6948560 · GitHub
  2. Click on the Run node ./mock-test-runner.js step.
  3. See the browser console.