react-native-vision-camera: 🐛 "Camera View" is not Fabric compatible yet

What were you trying to do?

I am using vision camera in rn 0.71.4. There I am, getting this error message. Is that possible to run the vision camera with fabric enabled?

Screenshot_1681098993

Reproduceable Code

I used the code from the demo application in this repo.

What happened instead?

Camera not opening because of this.

Relevant log output

No response

Device

Pixel 5(Android 11), Nokia 5.3(Android 12)

VisionCamera Version

2.15.4

Additional information

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 20 (4 by maintainers)

Commits related to this issue

Most upvoted comments

I overcame the issue with the help of this discussion article. https://github.com/reactwg/react-native-new-architecture/discussions/135

It may not be an absolute fix but it doesn’t hurt to try. This approach could work until this library supports for fabric.

I created react-native.config.js file and updated it like here; if you want to know why I use this config file find the discussion article above.

module.exports = {
  project: {
    android: {
      unstable_reactLegacyComponentNames: ['CameraView'],
    },
    ios: {
      unstable_reactLegacyComponentNames: ['CameraView'],
    },
  },
};

no solution for about a year?!

module.exports = { project: { android: { unstable_reactLegacyComponentNames: [‘CameraView’], }, ios: { unstable_reactLegacyComponentNames: [‘CameraView’], }, }, };

@mrousavy Somehow I am able to build the library with this inter-op layer change with Fabric on React Native 0.72.6, but still I see few issues with Events, please check the screenshot MicrosoftTeams-image