infinitered / ignite-cookbook

Ignite Cookbook for React Native
https://ignitecookbook.com
MIT License
88 stars 14 forks source link

Camera Recipe: react-native-vision-camera recipe doesn't work. #136

Open vishalenrique opened 7 months ago

vishalenrique commented 7 months ago

Describe the bug

CodeScanner functionality doesn't work. The camera setup and everything else works perfectly such that if I comment out the codeScanner code I am able to see the camera preview but if I uncomment the codeScanner prop on <Camera /> component then there's an error

Camera.onError(code-scanner/not-compatible-with-outputs): [code-scanner/not-compatible-with-outputs] CodeScanner can only be enabled when both video and frameProcessor are disabled! Use a Frame Processor Plugin for code scanning instead. [code-scanner/not-compatible-with-outputs: [code-scanner/not-compatible-with-outputs] CodeScanner can only be enabled when both video and frameProcessor are disabled! Use a Frame Processor Plugin for code scanning instead.]


         <Camera
            isActive={isActive}
            device={device}
            codeScanner={codeScanner} // Here's that prop
            style={StyleSheet.absoluteFill}
            photo
            video
          />
cdanwards commented 7 months ago

@vishalenrique thanks for reporting this! Are you using a physical device? And if so, what type of device?

vishalenrique commented 7 months ago

Hey @cdanwards, yes I'm using a physical device - Samsung Galaxy S10e - Android 12.