Comments (29)
I'm still getting this error when I add vision-camera-code-scanner to my project, even though 3.0.0-rc5 (with the new react-native-worklets-core) builds fine for Android on my PC.
I'm even using the updated branch (from rkmackinnon), which is supposed to work with Vision Camera v3 (circa March 2023).
I think the recent major changes to v3 are causing a problem. Maybe?
What I'm using right now:
Vision Camera: 3.0.0-rc5
This plugin: https://www.npmjs.com/package/vision-camera-v3-barcode-scanner
React-Native-Worklets-Core: 0.2.0
from vision-camera-code-scanner.
https://www.npmjs.com/package/vision-camera-v3-barcode-scanner
The readme is a bit out of date -- I renamed the package to "vision-camera-v3-barcode-scanner" when I published it publicly to NPM.
import {BarcodeFormat, useScanBarcodes, scanBarcodes} from 'vision-camera-v3-barcode-scanner';
from vision-camera-code-scanner.
check this out guys, react-native-vision-camera now does QR/Barcode scanning
https://www.react-native-vision-camera.com/docs/guides/code-scanning
from vision-camera-code-scanner.
"react-native": "0.72.5",
"react-native-vision-camera": "^3.3.1",
kotlinVersion = "1.7.21"
buildToolsVersion = "33.0.0"
minSdkVersion = 28
compileSdkVersion = 33
targetSdkVersion = 33
Gradle 8.0.1
babelconfig.js (actually think this isn't needed in v3, removing doesn't change error though):
[
'react-native-reanimated/plugin',
{
globals: ['__scanCodes'],
},
],
For bar codes (not using a package just this lib and works on iOS):
<application ...>
...
<meta-data
android:name="com.google.mlkit.vision.DEPENDENCIES"
android:value="barcode" />
</application>
But I still get errors trying to build android (in RN CLI) π€
<projectPath>/node_modules/vision-camera-code-scanner/android/src/main/java/com/visioncameracodescanner/VisionCameraCodeScannerPluginPackage.java:19: error: cannot find symbol
FrameProcessorPlugin.register(new VisionCameraCodeScannerPlugin());
^
symbol: method register(VisionCameraCodeScannerPlugin)
location: class FrameProcessorPlugin
<projectPath>/node_modules/vision-camera-code-scanner/android/src/main/java/com/visioncameracodescanner/VisionCameraCodeScannerPlugin.java:40: error: VisionCameraCodeScannerPlugin is not abstract and does not override abstract method callback(Frame,Map<String,Object>) in FrameProcessorPlugin
public class VisionCameraCodeScannerPlugin extends FrameProcessorPlugin {
^
<projectPath>/node_modules/vision-camera-code-scanner/android/src/main/java/com/visioncameracodescanner/VisionCameraCodeScannerPlugin.java:62: error: method does not override or implement a method from a supertype
@Override
^
<projectPath>/node_modules/vision-camera-code-scanner/android/src/main/java/com/visioncameracodescanner/VisionCameraCodeScannerPlugin.java:251: error: constructor FrameProcessorPlugin in class FrameProcessorPlugin cannot be applied to given types;
super("scanCodes");
^
required: no arguments
found: String
reason: actual and formal argument lists differ in length
4 errors
from vision-camera-code-scanner.
Using RKMacKinnon's latest changes, I got everything to build successfully. However, when I try to use the library, I get some new errors now:
ERROR Error: Exception in HostFunction: java.lang.NullPointerException: getPlugin(name, options) must not be null, js engine: hermes
ERROR Error: Exception in HostFunction: java.lang.NullPointerException: getPlugin(name, options) must not be null, js engine: hermes
ERROR TypeError: Cannot read property 'scanBarcodes' of undefined
from vision-camera-code-scanner.
@natemartins I had android issues as well in the past but they went away, can you try the latest version v0.5.1 and see if you still encounter issues building vision-camera?
from vision-camera-code-scanner.
Updating minSdkVersion to 26 solved this issue for me for now in android.
Looking for a better solution if available.
from vision-camera-code-scanner.
Currently facing the same problem, did you manage to solve it?
from vision-camera-code-scanner.
Same error π
from vision-camera-code-scanner.
any advance in this ?
from vision-camera-code-scanner.
@DeveloperMCD Unfortunately, we're still facing the same issue even after using your v3 barcode scanner.
from vision-camera-code-scanner.
Yes, as I said in the OP, the updated fork which is supposed to work with the "March 2023 version" of Vision Camera v3 does not currently build. I tried RC3 and the latest RCs as well.
Someone's going to have to dig into the code and update it again, I guess.
Let's be clear; I didn't do any of the coding on this fork. I just grabbed RKMackinnon's fork so I could publish it to a public NPM registry (and thus easily include it in React Native projects).
Now the real hard work begins though -- someone needs to help fix this library (Vision Camera Code Scanner) which is been completely abandoned -- and apparently there are < 1 current contributors to this project: i.e., people who know the code and/or willing to contribute and/or have the skills to bring it up to speed.
from vision-camera-code-scanner.
I'll tell you what though: the MacKinnon fork is certainly the starting point you want to start from. It's the best version or collection of code for "Vision Camera Code Scanner" on the planet right now. It has all the fixes that currently exist somewhere. MacKinnon started out by bringing the whole thing up to speed with V3, albeit the March 2023 version. If you started from the original Vision Camera Code Scanner, you'd have a lot more work to do.
The problem is, there's more fixing to do now. But it's not like those needed fixes can be found completed in some other repository out there. No, that is work yet-to-be-done.
from vision-camera-code-scanner.
any updates?
from vision-camera-code-scanner.
I'm still getting this error when I add vision-camera-code-scanner to my project, even though 3.0.0-rc5 (with the new react-native-worklets-core) builds fine for Android on my PC.
I'm even using the updated branch (from rkmackinnon), which is supposed to work with Vision Camera v3 (circa March 2023). I think the recent major changes to v3 are causing a problem. Maybe?
What I'm using right now: Vision Camera: 3.0.0-rc5 This plugin: https://www.npmjs.com/package/vision-camera-v3-barcode-scanner React-Native-Worklets-Core: 0.2.0
This doesn't seem to work also
from vision-camera-code-scanner.
Facing the same issue here. any solution yet?
My vision Camera version - 3.0.0
I got this issue after upgrading from RN 0.71.10 to RN 0.72.4
from vision-camera-code-scanner.
Still encountering this error.
from vision-camera-code-scanner.
same error
from vision-camera-code-scanner.
https://www.npmjs.com/package/vision-camera-v3-barcode-scanner
The readme is a bit out of date -- I renamed the package to "vision-camera-v3-barcode-scanner" when I published it publicly to NPM.
import {BarcodeFormat, useScanBarcodes, scanBarcodes} from 'vision-camera-v3-barcode-scanner';
I tried and it built successfully, Great Job!
I noticed that mrousavy/react-native-vision-camera#1466 (comment), __scanQRCodes(frame) is deprecated in v3, and I assume that the globals: ['__scanCodes'] config can be removed, right?
from vision-camera-code-scanner.
anyone have solution for this error, still facing error
from vision-camera-code-scanner.
VisionCamera: Frame Processors enabled!
CMake Error in CMakeLists.txt:
Imported target "react-native-worklets-core::rnworklets" includes
non-existent path
i am still geting this error while building android
from vision-camera-code-scanner.
https://www.npmjs.com/package/vision-camera-v3-barcode-scanner
The readme is a bit out of date -- I renamed the package to "vision-camera-v3-barcode-scanner" when I published it publicly to NPM.
import {BarcodeFormat, useScanBarcodes, scanBarcodes} from 'vision-camera-v3-barcode-scanner';
VisionCamera: Frame Processors enabled!
CMake Error in CMakeLists.txt:
Imported target "react-native-worklets-core::rnworklets" includes
non-existent path
i am still facing this issue
from vision-camera-code-scanner.
same error
from vision-camera-code-scanner.
same error
+1
from vision-camera-code-scanner.
+1
from vision-camera-code-scanner.
I've also just released a frame processor rebuilt for vision-camera 3+ that can do high (configurable) fps scanning and provides highlighting of detected barcodes out-of-the-box.
You can check a working demo on GitHub @mgcrea/vision-camera-barcode-scanner.
Hope it can help others.
from vision-camera-code-scanner.
I've also just released a frame processor rebuilt for vision-camera 3+ that can do high (configurable) fps scanning and provides highlighting of detected barcodes out-of-the-box.
You can check a working demo on GitHub @mgcrea/vision-camera-barcode-scanner.
Hope it can help others.
Does this work on apps that use react-native-reanimated
v3
and above? I have been stuck on getting this to work for the past 5 hours but no head way.
This is the error I'm getting
Execution failed for task ':react-native-vision-camera:buildCMakeDebug[arm64-v8a]'
UPDATE
I removed react-native-reanimated
and retried. Same error.
from vision-camera-code-scanner.
@mgcrea Updating to v0.5.1 fixed it.
Note that you would have to set minSdkVersion
to 26
if you're on a version lower than 26. Thanks to @manish0707 for pointing this out
from vision-camera-code-scanner.
Nevermind, somehow vision-camera-code-scanner
was still in my yarn.lock
, explicitly removing it fixed the error
from vision-camera-code-scanner.
Related Issues (20)
- XCode build failure with "ld: symbol(s) not found for architecture arm64" HOT 10
- Should we create a new public fork for this repository? HOT 8
- ERROR ReferenceError: Can't find variable: _setGlobalConsole HOT 3
- Canβt recognize the QR code of Etherscan. HOT 2
- Does not work. Doesn't recognize QR code HOT 8
- Could not build Objective-C module 'vision_camera_code_scanner' HOT 9
- scanBarcodes returns undefined upon scanning a QR code HOT 6
- The camera flickers when using frameProcessor HOT 1
- Warning: Can't perform a React state update on an unmounted component. HOT 2
- Add Auto zoom to Scan QR code HOT 1
- Port to react-native-vision-camera v3 HOT 10
- Failed to build in Apple M1 HOT 4
- DO NOT USE THIS LIBRARY, THIS DOES NOT WORK AT ALL HOT 6
- This Package needs update to support RNVC v3 HOT 4
- MRZ Scan ? HOT 2
- Crashes on startup on Xcode 15 HOT 7
- Problem with react native vision camera v3 HOT 7
- ERROR Frame Processor threw an error: Property '__scanOCR' doesn't exist HOT 2
- [ios] Crash when app reloads
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vision-camera-code-scanner.