LottieFiles / lottie-react

lottie web player as a react component
https://lottiefiles.com
MIT License
721 stars 80 forks source link

Cannot read error of null #24

Closed adelin-b closed 2 years ago

adelin-b commented 3 years ago

Hello, I have a very simple lottie player componnent that sometime stop and throw an error on component mount / unmount

const LoaderIcon = ({ size = '1.5rem' }: { size?: string }) => (
    <Player
        autoplay
        style={{ height: size, width: size }}
        loop
        src="https://assets5.lottiefiles.com/private_files/lf30_tjqo85qt.json"
    >
        <Controls visible={false} buttons={['play', 'repeat', 'frame', 'debug']} />
    </Player>
)
lottie-react.esm.js:1 Uncaught TypeError: Cannot read property 'error' of null
    at AnimationItem.triggerEvent (lottie-react.esm.js:1)
    at AnimationItem../node_modules/@lottiefiles/react-lottie-player/dist/lottie-react.esm.js.AnimationItem.triggerRenderFrameError (lottie-react.esm.js:9)
    at AnimationItem../node_modules/@lottiefiles/react-lottie-player/dist/lottie-react.esm.js.AnimationItem.renderFrame (lottie-react.esm.js:9)
    at AnimationItem../node_modules/@lottiefiles/react-lottie-player/dist/lottie-react.esm.js.AnimationItem.gotoFrame (lottie-react.esm.js:9)
    at AnimationItem../node_modules/@lottiefiles/react-lottie-player/dist/lottie-react.esm.js.AnimationItem.setCurrentRawFrameValue (lottie-react.esm.js:9)
    at AnimationItem../node_modules/@lottiefiles/react-lottie-player/dist/lottie-react.esm.js.AnimationItem.advanceTime (lottie-react.esm.js:9)
    at f (lottie-react.esm.js:9)
github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.

martsie commented 3 years ago

We're having the same issue. Here's a snapshot of the error on our end, looks identical image appears to be an issue with lottie-web and not lottie-react

karamalie commented 3 years ago

which framework is this? could you help me replicate this issue? @martsie @adelin-b

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.

samuelOsborne commented 2 years ago

Closing issue due to inactivity.