Closed TheRogue76 closed 7 months ago
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
:warning: | Newer Version of React Native is Available! |
---|---|
:information_source: | You are on a supported minor version, but it looks like there's a newer patch available - 0.73.2. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
⚠️ Missing Reproducible Example ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
- If your bug is UI related: a Snack
- If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
The reproducer is not under my name, but the package itself. Ignoring this error.
The pull request that is currently in the works is https://github.com/lottie-react-native/lottie-react-native/pull/1160/files so if you do not wish to read the whole thing, just the changes, you can read them there
@cortinico @cipolleschi (Sorry for pinging you guys directly) any thoughts and help on this is appreciated. I guess the Issue tracker is not pinging since it is still saying there is no reproducible.
We discussed this internally briefly. We'll get back to you in the next future to see what we can do to support 👍
Sounds good. Putting this on hold for now
(NOBRIDGE) ERROR Native Component 'LottieAnimationView' that calls codegenNativeComponent was not code generated at build time. Please check its definition.
👆This issue has been already fixed by adding support for the as
expression for TypeScript: https://github.com/facebook/react-native/blob/main/packages/babel-plugin-codegen/index.js#L87-L95
The fix should be available with react-native 0.74. Alternatively you can try the latest nightly version of @react-native/babel-plugin-codegen
, the fix is there.
(NOBRIDGE) ERROR Error: Unsupported top level event type "topAnimationFinish" dispatched
👆And I'm currently investigating this.
Thank you @dmytrorykun. I guess that means there is no plans to backport this change for 0.73?
@TheRogue76 I guess we should do this, yeah. https://github.com/reactwg/react-native-releases/discussions/98#discussioncomment-8222951
@TheRogue76 the quick fix would be to delete the 'onAnimationFinish', 'onAnimationFailure', and 'onAnimationLoaded' arguments from here. I'm currently investigating the underlying problem.
@dmytrorykun That's intriguing. I'll test it out locally. Please keep me posted on the investigation. Update: works like a charm.
Hi @dmytrorykun, is it ok if i update the PR? Now that 73.3 is out i want to move things forward, but i would totally understand if you need more time with this. I can redo this in another PR so that you would have the branch to investigate freely as well
Hi @TheRogue76 , sorry, I forgot to post the update here. This other issue has also been fixed, and pick is requested for 0.73.4 (https://github.com/reactwg/react-native-releases/discussions/101#discussioncomment-8290856).
Hi @TheRogue76 , sorry, I forgot to post the update here. This other issue has also been fixed, and pick is requested for 0.73.4 (https://github.com/reactwg/react-native-releases/discussions/101#discussioncomment-8290856).
Perfect! Thank you! Marking the issue as resolved, since every variant has been addressed.
Description
Hi there.
I have been working on adding bridgeless support for Lottie React Native, and i have hit a rather strange issue. When i export my fabric component using
The app succeeds in running in bridgeless mode, and shows the UI and the Fabric events are sent back correctly, but i get a console.error:
Native Component 'LottieAnimationView' that calls codegenNativeComponent was not code generated at build time. Please check its definition
(I have traced this console error to here in React Native internals) But it runs correctly and both shows the Fabric component and sends back the correct eventsLooking at the generated LottieAnimationView, the output seems correct to me as far as i can tell. if i change the signature to
The bridgeless console error goes away, but it throws an error when the event needs to come back:
What am i missing here? The only way i have found to register the events without this error has been to put them in
customDirectEventTypes
fromreact-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry
, but that looks like a very internal API, and from what i understood it registers it at the global scope, which is not ideal because someone else might also have the same event name or some other thing might happenSteps to reproduce
yarn
in the rootbundle install && RCT_NEW_ARCH_ENABLED=1 pod update --project-directory=ios
yarn start
package.json
)React Native Version
0.73.1
Affected Platforms
Runtime - Android, Runtime - iOS
Areas
Bridgeless - The New Initialization Flow
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/lottie-react-native/lottie-react-native/tree/feature/add-experimental-bridgeless
Screenshots and Videos
Running in Bridgeless mode, with the default export cast
as HostComponent<NativeProps>
Running in Bridgeless mode, WITHOUT the default export cast
as HostComponent<NativeProps>