expo-camera - OnBarCodeScanned not working on web

Hi I’m trying to do a QR code scanner on expo for a web app. It’s working perfectly on IOS and android, but when I’m trying on web, the camera show up but it’s does not detect any QR code.

Hey @louisneats, can you share your version information as well as a reproduction case that we can run on our end and also a publicly accessible QR code that you are using to test with?


Hi @adamjnav, thank you very much for your answer. I’m using expo-camera 9.1.0 and expo 40.0.0
and here is my code that I use to run the camera :

 React.useEffect(() => {
    (async () => {
      if (Platform.OS === 'web') {
        setHasPermission(status === 'granted');
      } else {
        const { status } = await Permissions.getAsync(Permissions.CAMERA);
        setHasPermission(status === 'granted');
  }, []);

   onCameraReady={() => getRatio()}
    position: 'absolute',
    width: deviceWidth,
    height: deviceHeight,
    zIndex: 1,

I have tried to debug the onBarCodeScanned on the expo-camera package, and it’s seems that even though I’m showing a qr code to the screen, the decode function always return null, but it does work on IOS and android.

I fixed the problem by forking expo-camera 11.0.2, and updated the dependancy @koale/useworker to 4.0.1 and by upgrading expo sdk to 41