-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
unstable_reactLegacyComponentNames IOS Issue #37905
Comments
|
We would need a full repro to look into this. Also: what is |
@cortinico the library could be this one. I'm, getting the exact same error with the package's latest release 2.7.3. |
@cpintos-sc thanks for the update. Does the issue happen on both Android & iOS? |
@cortinico sorry for late reply, i just tested on Android with version 0.72.0, its working fine. project: { Update : @cortinico i guess the problem is with this package https://github.com/react-native-linear-gradient/react-native-linear-gradient i just use unstable_reactLegacyComponentNames only with RNSVGImage for IOS. it works fine. |
is the actionable that something needs to be changed in linear-gradient, or in the interop layer? |
not 100% Percent sure! i guess need to change in linear-gradient package. |
Hi, just to let you know. There is already a forked version of that project that supports the fabric renderer, rnx-gradient. |
Given this, I'd probably close this issue and ask @affansk to eventually open an issue in the |
Yup let's close this as multiple alternatives have been raised. |
Actually, this highlighted a shortcoming of the Interop Layer for iOS, so I'm looking into this. |
Summary: In [this issue](facebook#37905), the community detected a strict assumption in the interop layer for which, given a component `XXXView`, its ViewManager must be called `RCTXXXViewManager`. That's not the case for some components, for example, `BVLinearGradient`, which View manager is `BVLinearGradientManager` and not `RCTBVLinearGradientManager`. This diff adds a secondary lookup logic: 1. We look for the `RCTXXXViewManager`. 2. If not found, we look for `XXXViewManager`. We will assess whether to generalize this logic once and for all or to expand other lookup cases on an example/failure basis as it's not a goal to have a 100% accurate interop layer. The Goal is to cover most use cases. ## Changelog: [iOS][Added] - Allow to lookup for ViewManager without the RCT prefix in the Interop Layer Differential Revision: D47055969 fbshipit-source-id: da158bdabcbcab848d735dc6b2d5c5ccb492d20e
Summary: Pull Request resolved: facebook#38093 In [this issue](facebook#37905), the community detected a strict assumption in the interop layer for which, given a component `XXXView`, its ViewManager must be called `RCTXXXViewManager`. That's not the case for some components, for example, `BVLinearGradient`, which View manager is `BVLinearGradientManager` and not `RCTBVLinearGradientManager`. This diff adds a secondary lookup logic: 1. We look for the `RCTXXXViewManager`. 2. If not found, we look for `XXXViewManager`. We will assess whether to generalize this logic once and for all or to expand other lookup cases on an example/failure basis as it's not a goal to have a 100% accurate interop layer. The Goal is to cover most use cases. ## Changelog: [iOS][Added] - Allow to lookup for ViewManager without the RCT prefix in the Interop Layer Reviewed By: sammy-SC Differential Revision: D47055969 fbshipit-source-id: b648c79e54d37d571a0ee8c490745f587b1327a1
Summary: Pull Request resolved: #38093 In [this issue](#37905), the community detected a strict assumption in the interop layer for which, given a component `XXXView`, its ViewManager must be called `RCTXXXViewManager`. That's not the case for some components, for example, `BVLinearGradient`, which View manager is `BVLinearGradientManager` and not `RCTBVLinearGradientManager`. This diff adds a secondary lookup logic: 1. We look for the `RCTXXXViewManager`. 2. If not found, we look for `XXXViewManager`. We will assess whether to generalize this logic once and for all or to expand other lookup cases on an example/failure basis as it's not a goal to have a 100% accurate interop layer. The Goal is to cover most use cases. ## Changelog: [iOS][Added] - Allow to lookup for ViewManager without the RCT prefix in the Interop Layer Reviewed By: sammy-SC Differential Revision: D47055969 fbshipit-source-id: 1d31f3f4bc6f1f543edbd157ce04ad9daf23dbc6
Summary: Pull Request resolved: #38093 In [this issue](#37905), the community detected a strict assumption in the interop layer for which, given a component `XXXView`, its ViewManager must be called `RCTXXXViewManager`. That's not the case for some components, for example, `BVLinearGradient`, which View manager is `BVLinearGradientManager` and not `RCTBVLinearGradientManager`. This diff adds a secondary lookup logic: 1. We look for the `RCTXXXViewManager`. 2. If not found, we look for `XXXViewManager`. We will assess whether to generalize this logic once and for all or to expand other lookup cases on an example/failure basis as it's not a goal to have a 100% accurate interop layer. The Goal is to cover most use cases. [iOS][Added] - Allow to lookup for ViewManager without the RCT prefix in the Interop Layer Reviewed By: sammy-SC Differential Revision: D47055969 fbshipit-source-id: 1d31f3f4bc6f1f543edbd157ce04ad9daf23dbc6
Summary: Pull Request resolved: facebook#38093 In [this issue](facebook#37905), the community detected a strict assumption in the interop layer for which, given a component `XXXView`, its ViewManager must be called `RCTXXXViewManager`. That's not the case for some components, for example, `BVLinearGradient`, which View manager is `BVLinearGradientManager` and not `RCTBVLinearGradientManager`. This diff adds a secondary lookup logic: 1. We look for the `RCTXXXViewManager`. 2. If not found, we look for `XXXViewManager`. We will assess whether to generalize this logic once and for all or to expand other lookup cases on an example/failure basis as it's not a goal to have a 100% accurate interop layer. The Goal is to cover most use cases. [iOS][Added] - Allow to lookup for ViewManager without the RCT prefix in the Interop Layer Reviewed By: sammy-SC Differential Revision: D47055969 fbshipit-source-id: 1d31f3f4bc6f1f543edbd157ce04ad9daf23dbc6
@renyufei8023 can you share which library are you using? I guess it is react-native-fastimage but could be wrong. What's happening here is that FastImage is probably not following one of the supported convention to define the ViewManager and, therefore, the InteropLayer fails to create it. I can look into how the view manager is called and see if we can extend the interop layer somehow. |
I am currently using react native fast image,repo:https://github.com/DylanVann/react-native-fast-image#readme |
…k#41207) Summary: This should fix facebook#37905 (comment) When working on react-native-fast-image, we realized that the interop layer does not work for components where the exported name is different from the iOS class. To fix this, we can use the Bridge to retrieve the actual view manager, given the component name. This solution should be much more robust than making assumptions on the ViewManager name, given the ComponentName. On top of that, we realized tha the interop layer was not calling `didSetProps` after setting the props, so we are invoking that. bypass-github-export-checks ## Changelog: [iOS][Fixed] - Add support for Components with custom names in the interop layer. Pull Request resolved: facebook#41207 Test Plan: Tested locally on an app created in 0.72 and 0.73 in Bridge and Bridgeless mode. Reviewed By: cortinico Differential Revision: D50698172 Pulled By: cipolleschi fbshipit-source-id: 49aee905418515b0204febbbe6a67c0114f37029
Summary: This should fix #37905 (comment) When working on react-native-fast-image, we realized that the interop layer does not work for components where the exported name is different from the iOS class. To fix this, we can use the Bridge to retrieve the actual view manager, given the component name. This solution should be much more robust than making assumptions on the ViewManager name, given the ComponentName. On top of that, we realized tha the interop layer was not calling `didSetProps` after setting the props, so we are invoking that. bypass-github-export-checks [iOS][Fixed] - Add support for Components with custom names in the interop layer. Pull Request resolved: #41207 Test Plan: Tested locally on an app created in 0.72 and 0.73 in Bridge and Bridgeless mode. Reviewed By: cortinico Differential Revision: D50698172 Pulled By: cipolleschi fbshipit-source-id: 49aee905418515b0204febbbe6a67c0114f37029
Summary: This should fix #37905 (comment) When working on react-native-fast-image, we realized that the interop layer does not work for components where the exported name is different from the iOS class. To fix this, we can use the Bridge to retrieve the actual view manager, given the component name. This solution should be much more robust than making assumptions on the ViewManager name, given the ComponentName. On top of that, we realized tha the interop layer was not calling `didSetProps` after setting the props, so we are invoking that. bypass-github-export-checks [iOS][Fixed] - Add support for Components with custom names in the interop layer. Pull Request resolved: #41207 Test Plan: Tested locally on an app created in 0.72 and 0.73 in Bridge and Bridgeless mode. Reviewed By: cortinico Differential Revision: D50698172 Pulled By: cipolleschi fbshipit-source-id: 49aee905418515b0204febbbe6a67c0114f37029
Summary: This should fix #37905 (comment) When working on react-native-fast-image, we realized that the interop layer does not work for components where the exported name is different from the iOS class. To fix this, we can use the Bridge to retrieve the actual view manager, given the component name. This solution should be much more robust than making assumptions on the ViewManager name, given the ComponentName. On top of that, we realized tha the interop layer was not calling `didSetProps` after setting the props, so we are invoking that. bypass-github-export-checks [iOS][Fixed] - Add support for Components with custom names in the interop layer. Pull Request resolved: #41207 Test Plan: Tested locally on an app created in 0.72 and 0.73 in Bridge and Bridgeless mode. Reviewed By: cortinico Differential Revision: D50698172 Pulled By: cipolleschi fbshipit-source-id: 49aee905418515b0204febbbe6a67c0114f37029
* Make the interop-layer work with components with custom name (#41207) Summary: This should fix #37905 (comment) When working on react-native-fast-image, we realized that the interop layer does not work for components where the exported name is different from the iOS class. To fix this, we can use the Bridge to retrieve the actual view manager, given the component name. This solution should be much more robust than making assumptions on the ViewManager name, given the ComponentName. On top of that, we realized tha the interop layer was not calling `didSetProps` after setting the props, so we are invoking that. bypass-github-export-checks [iOS][Fixed] - Add support for Components with custom names in the interop layer. Pull Request resolved: #41207 Test Plan: Tested locally on an app created in 0.72 and 0.73 in Bridge and Bridgeless mode. Reviewed By: cortinico Differential Revision: D50698172 Pulled By: cipolleschi fbshipit-source-id: 49aee905418515b0204febbbe6a67c0114f37029 * Remove references to RCTBridgeProxy --------- Co-authored-by: Riccardo Cipolleschi <riccardo.cipolleschi@gmail.com> Co-authored-by: Riccardo Cipolleschi <cipolleschi@meta.com>
Description
i get this Failure Error in IOS when i make use of this unstable_reactLegacyComponentNames: ['BVLinearGradient'] to support in new architecture
Thread Performance Checker: Thread running at QOS_CLASS_USER_INTERACTIVE waiting on a lower QoS thread running at QOS_CLASS_DEFAULT. Investigate ways to avoid priority inversions
Assertion failed: (module), function constructCoordinator, file LegacyViewManagerInteropComponentDescriptor.mm, line 64.
React Native Version
0.72.0
Output of
npx react-native info
Assertion failed: (module), function constructCoordinator, file LegacyViewManagerInteropComponentDescriptor.mm, line 64
Steps to reproduce
Snack, code example, screenshot, or link to a repository
just add this in react-native config file
project: {
ios: {
unstable_reactLegacyComponentNames: ['BVLinearGradient'],
},
android: {}, // grouped into "project"
},
The text was updated successfully, but these errors were encountered: