react-native-qrcode-scanner icon indicating copy to clipboard operation
react-native-qrcode-scanner copied to clipboard

Scanner crashes the app (libsystem_kernel.dylib__abort_with_payload:)

Open ghost opened this issue 6 years ago • 4 comments

What's happening?

When I go to the QR Scanner application, the scanner crashes the application and the following error comes up in my Xcode.

This happens AFTER I give it permission to use the camera. ( I have a NSCameraUsageDescription)

Build details?

"react": "16.6.3",
"react-native": "0.57.8",
"react-native-camera": "^1.8.0",
"react-native-qrcode-scanner": "^1.1.2",

ghost avatar Jan 10 '19 16:01 ghost

I fixed this by adding the following. I do not plan on using microphone or camera roll but it had to be there or it crashed.

<!-- Include this only if you are planning to use the camera roll -->
<key>NSPhotoLibraryUsageDescription</key>
<string>Your message to user when the photo library is accessed for the first time</string>

<!-- Include this only if you are planning to use the microphone for video recording -->
<key>NSMicrophoneUsageDescription</key>
<string>Your message to user when the microsphone is accessed for the first time</string>

ghost avatar Jan 10 '19 16:01 ghost

I've just rolled back react-native-camera to version 1.6.3. I don't want to ask for microphone permission to scan a QRCode...

fsalata avatar Jan 17 '19 17:01 fsalata

Actually it looks like for the full fix, you need to add the NSMicrophoneUsageDescription key as mentioned above and then set the cameraProps={{captureAudio: false}} as noted in https://github.com/moaazsidat/react-native-qrcode-scanner/issues/160

jinchung avatar Jan 18 '19 20:01 jinchung

should be fixed when this is released: https://github.com/moaazsidat/react-native-qrcode-scanner/pull/168

moaazsidat avatar Apr 01 '19 13:04 moaazsidat