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

Failed to construct 'ImageData': The input data length is not equal to (4 * width * height). #465

Open
1 task done
taylorhelene opened this issue Feb 6, 2025 · 9 comments
Assignees
Labels
bug Something isn't working react

Comments

@taylorhelene
Copy link

taylorhelene commented Feb 6, 2025

Image

Overview

After adding the code to my program, I am getting this error when the page loads and after I navigate back to the page:

Uncaught runtime errors:
×
ERROR
Failed to construct 'ImageData': The input data length is not equal to (4 * width * height).
IndexSizeError: Failed to construct 'ImageData': The input data length is not equal to (4 * width * height).
    at C._render (http://localhost:3000/static/js/bundle.js:44140:148)
    at C._draw (http://localhost:3000/static/js/bundle.js:44153:16)

I am getting this issue when using both version: 0.12.3 and 0.12.2. Here is my code:

//...
<div className="row about ">
        <DotLottieReact
          src="https://lottie.host/2a881668-7aa8-4bfe-a235-f68888a2bceb/dGmyFGxjSL.lottie"
          loop
          autoplay
          className="col-sm-4 about-img object-fit-contain"      
          />
//...
<div

I am using Windows Subsystem for Linux during development

Consuming repo

What repo were you working in when this issue occurred?

@lottiefiles/dotlottie-react

Labels

  • Add the Type: Bug label to this issue.
@theashraf theashraf self-assigned this Feb 7, 2025
@theashraf theashraf added bug Something isn't working react labels Feb 7, 2025
@nokia1054g
Copy link

Getting this also

@EvHaus
Copy link

EvHaus commented Feb 13, 2025

I'm also seeing this after upgrading to the latest version of @lottiefiles/dotlottie-react.

@faahim
Copy link

faahim commented Feb 20, 2025

Having the same issue here as well! :(

@miladehghani
Copy link

Having same issue!

@process-pca
Copy link

seeing the same issue

@eladkolet
Copy link

Getting it too!

@surejainam
Copy link

Same issue - although doesn't break any UI

@theashraf
Copy link
Member

@surejainam, could you share a reproducible CodeSandbox or CodePen example?

@surejainam
Copy link

@surejainam, could you share a reproducible CodeSandbox or CodePen example?

I am unable to reproduce the error in codesandbox.
ALthough this is how it looks https://codesandbox.io/p/devbox/vj9q7x
Also i noticed i am not on the latest version. Using this.
"@lottiefiles/dotlottie-react": "^0.12.3",

For some reason i am not seeing this error now in my logs. But had been seeing this since the longest time i remember and i used to ignore it as i couldn't see any visible issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working react
Projects
None yet
Development

No branches or pull requests

9 participants