moaazsidat / react-native-qrcode-scanner

A QR code scanner component for React Native.
MIT License
2.04k stars 516 forks source link

[Release] App Show White Screen #402

Open shiroze opened 1 year ago

shiroze commented 1 year ago

When using the package My App Show White Screen When app failed scan the Code.

Code :

<QRCodeScanner
  onRead={onSuccess}
  reactivate={true}
  reactivateTimeout={3000}
  cameraType={'front'}
  showMarker={true}
  cameraProps={{captureAudio: false}}
  fadeIn
/>

Logic:

const onSuccess = e => {
  if(!visible) {
    axios.post(`${api}/GetData`, {
      "EncryptStr": e.data
    }).then((respJson) => {
      var resp = respJson.data;
      if(!resp.Err) {
        setData(resp.Data);
      }
    }).catch((err) => {
      Alert("Something Wrong")
    })
  }
}

Package.json

"axios": "1.2.0-alpha.1",
"react": "18.1.0",
"react-native": "0.70.5",
"react-native-camera": "react-native-camera/react-native-camera#3443/head",
"react-native-qrcode-scanner": "^1.5.5",

Solution for now is exit the app then re-Open. this is not a solution but a Bug. Did anyone facing this Issue ?

Package last maintenance is 10 Month - Last Year and more Coming Issue here. If this package doesn't have maintainer please Archive and Put Notice at Description so people know.

Thanks for this great package @moaazsidat

ninjaroot-509 commented 1 year ago

me tooo!

huanguolin commented 1 year ago

same issue here.