lottie-react-native icon indicating copy to clipboard operation
lottie-react-native copied to clipboard

LottieAnimationView resume & pause did not have a corresponding prop

Open infomus opened this issue 4 years ago • 10 comments

Description

There are actually two yellow box warnings I'm seeing- one for resume and one for pause:

"ReactNative.NativeModules.LottieAnimationView.pause did not have a corresponding prop defined in the mock provided to SafeModule."

Steps to Reproduce

  1. yarn add lottie-react-native
  2. yarn add [email protected]
  3. cd ./ios && pod install
  4. import LottieView from 'lottie-react-native';
  5. react-native run-ios

Versions

"react-native": "0.62.2",
"lottie-ios": "3.1.3",
"lottie-react-native": "^3.4.0"

Worth noting that I'm experiencing no issues apart from the warning.

It looks like this issue was acknowledged and addressed in 09afe4fa82797fe85a2155186a0cfa1fa48b082a but I'm seeing it here now in v3.1.3.

infomus avatar Jun 15 '20 03:06 infomus

The PR https://github.com/react-native-community/lottie-react-native/pull/655 for this problem was merged 28 days ago. The latest release was 29 days ago. So I think with the next release we'll be good. 🚀

luisaverza avatar Jun 18 '20 15:06 luisaverza

I would also like to use the resume but it is not available in the ref

Rhomennik avatar Jul 01 '20 14:07 Rhomennik

I've upgraded to "lottie-ios": "^3.1.8", "lottie-react-native": "^3.5.0", "react-native": "0.61.4", and am still getting the same issue @spooksmus reported I re-ran pod install --repo-update and restarted metro bundler with npm start --clear-cache in case there was a caching issue.

image

connorpmullins avatar Jul 21 '20 21:07 connorpmullins

Follow up to my comment,

I had run npm update lottie-ios lottie-react-native and was still getting the above issue. The yellow box warnings were resolved after running npm i --save lottie-react-native npm i --save [email protected]

My less-than-perfect understanding of package.json notation is probably to blame here.

For anyone else struggling though, this is what resolved things for me.

connorpmullins avatar Jul 21 '20 21:07 connorpmullins

Any updates to dismiss this warning?

My env: "lottie-ios": "^3.1.8", "lottie-react-native": "^3.5.0", "react-native": "0.63.1",

Receiving 2 warnings:

[Wed Jul 22 2020 12:10:33.173]  WARN     ReactNative.NativeModules.LottieAnimationView.pause did not have a corresponding prop defined
in the mock provided to SafeModule.
[Wed Jul 22 2020 12:10:33.174]  WARN     ReactNative.NativeModules.LottieAnimationView.resume did not have a corresponding prop defined
in the mock provided to SafeModule.

kockok avatar Jul 22 '20 04:07 kockok

as per @connorpmullins this issue should be resolved on 3.5.0. Please, make sure old versions of lottie-react-native and lottie-ios are not cached in your project.

emilioicai avatar Jul 22 '20 11:07 emilioicai

@emilioicai - I know this is actually an NPM thing, but why would running npm update lottie-react-native with version ^3.5.0 specified in package.json not work? Shouldn't this at least be downloading 3.5? My understanding of the caret comes from here: https://blog.npmjs.org/post/115305091285/introducing-the-npm-semantic-version-calculator#:~:text=The%20basics%3A%20caret%20and%20tilde,that%20you%20want%20either%201.3.

connorpmullins avatar Jul 23 '20 07:07 connorpmullins

@connorpmullins yes, that should work but there are many places (npm, packager, watchman) where cache is not cleared and an old version of the package is being used. You could try running this command to make sure all cache is properly cleared:

rm -rf node_modules && rm -rf ios/build/* && rm -rf android/build/* && rm -rf $TMPDIR/react-* && yarn cache clean && rm -rf /tmp/haste-map-react-native-packager-* && yarn && npx jetify

emilioicai avatar Jul 23 '20 07:07 emilioicai

npm start -- --reset-cache

For me.

kyle-ssg avatar Nov 18 '20 19:11 kyle-ssg

I edit my package.json:

"lottie-ios": "^3.1.8",

after that: yarn install or npm install

It works for me! Thank u

cristianeto avatar Apr 16 '21 01:04 cristianeto

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 14 '22 09:08 stale[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

stale[bot] avatar Aug 30 '22 18:08 stale[bot]