vision-camera-code-scanner
vision-camera-code-scanner copied to clipboard
iOS 14.8.1 - Frame Processor threw an error: Can't find variable: __scanQRCodes
Hi there,
So we are currently implementing this great plugin! For some reason the exact same code works on one device (iPhone 6s with most up-to-date iOS 15.x), but does NOT work on a newer iPhone 12 Mini with iOS 14.8.1. The babel config is obviously the same - again: the whole code is exactly the same!
When running the project on latter device, the following error is thrown in the xCode logs:
[javascript] Frame Processor threw an error: Can't find variable: __scanQRCodes
Can anyone help? It is quite obvious that for some reason the global variable __scanQRCodes
is somehow undefined, but how is that possible?
Thanks, best Patrick
That’s really weird issue, you can get any more erros from Xcode between those two devices?
you are running the version from this repo or from npm?
We are running the master branch from this repo here! Nope sorry no more logs. The camera opens properly, and 5 times per second this error occurs in the logs. No scanning happens whatsoever. In my opinion this has to be some problem with the babel setup?! Do you have any tips on further debugging?
So, little update: With a fresh build it suddenly works on the IP12 Mini. No idea why, we did not really change anything. When we have further infos I will post it here!
I had the same issue. Fixed it by using "react-native-reanimated": "2.3.0-beta.4",
.
add the babel config module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: [ [ 'react-native-reanimated/plugin', { globals: ['__scanCodes','__scanFaces'], }, ],
],
};
and try to rebuild using xcode
@veris-kamaraj not working to me, i dont know why, here is my babel file:
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
// "@babel/plugin-proposal-decorators", { "legacy": true },
['react-native-reanimated/plugin',
{
globals: ['__scanCodes'],
}
]
]
};
index.js:
import 'react-native-reanimated'
import {AppRegistry} from 'react-native'
import App from './App'
import 'react-native-image-keyboard'
import Realm from 'realm'
import uuid from 'react-native-uuid'
import {name as appName} from './app.json'
import messaging from '@react-native-firebase/messaging'
import RNCallKeep from 'react-native-callkeep'