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

Runtime failure when trying to enable Ansi blocks #33

Open
ssbarnea opened this issue Apr 1, 2020 · 1 comment
Open

Runtime failure when trying to enable Ansi blocks #33

ssbarnea opened this issue Apr 1, 2020 · 1 comment

Comments

@ssbarnea
Copy link

ssbarnea commented Apr 1, 2020

Why trying to enable <Ansi> via https://review.opendev.org/#/c/716251/4/web/src/containers/build/BuildOutput.jsx I observed that this produces failures like https://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_aa6/716251/4/check/zuul-build-dashboard/aa6b67f/npm/html/build/f88a6e20be834d5a8245b5473e609a8e

TypeError: "e.split is not a function"
    value index.js:291
    value index.js:251
    value index.js:99
    default index.js:28
    default index.js:115
    React 6
    unstable_runWithPriority scheduler.production.min.js:19
    React 6
    Redux 7
    N build.js:280
react-dom.production.min.js:209:194
    React 5
    unstable_runWithPriority scheduler.production.min.js:19
    React 4
    unstable_runWithPriority scheduler.production.min.js:19
    React 6
    Redux 7
    N build.js:280

This error happens only on this proposed change so it should have something to so with how I tried to use it.

@captainsafia
Copy link
Member

The ansi-to-react package uses the split method here.

Typically, this error will occur if no children are passed to the ansi-to-react component or no valid contents are parsed. I would confirm that the data based is valid.

Regardless, we should probably add a try-catch around the code referenced above so that errors like this don't happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants