Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android - issue w/ setProcessEveryNthFrame #33

Closed
DanielDent opened this issue Oct 8, 2022 · 11 comments
Closed

Android - issue w/ setProcessEveryNthFrame #33

DanielDent opened this issue Oct 8, 2022 · 11 comments
Labels
bug Something isn't working

Comments

@DanielDent
Copy link

I have an application which works fine on iOS, but crashes on Android. I get the following error:

JS: [Vue warn]: Error in nextTick: "TypeError: __classPrivateFieldGet(...).setProcessEveryNthFrame is not a function"

Was Android tested when support for setProcessEveryNthFrame was added?

@DanielDent
Copy link
Author

I have further details about this crash: it seems to occur specifically when processEveryNthFrame gets attached to a variable, and that variable is changed. I.e. in Vue, :processEveryNthFrame="testVariable", and then testVariable is mutated.

@DanielDent
Copy link
Author

I am mistaken about my prior comment, this crash seems to still occur even if testVariable is not mutated.

@DanielDent
Copy link
Author

For what it's worth, when I tried removing setProcessEveryNthFrame from the app entirely, the build ran on Android, but did not detect any barcodes. The exact same codebase on iOS works great.

@brooklax
Copy link

@DanielDent were you able to find a workaround or resolve the issue? it seems that adding the "setProcessEveryNthFrame" prop improves barcode scanner accuracy but it's still resulting in a crash when the prop is added on android.

We're using:

"@nativescript/mlkit-barcode-scanning": "^1.0.6",
"@nativescript/mlkit-core": "^1.0.6",
"@nativescript/android": "8.4.0",
"@nativescript/ios": "8.4.0",
"nativescript-vue": "^2.9.3",

@devlinpadayachee
Copy link

Anybody found a workaround?

@triniwiz
Copy link
Member

Finally got change to fix this so it now works in the latest release, thanks for reporting.

@brooklax
Copy link

@triniwiz apologies but I just tested with a new android build on my side and although I don't get an exception anymore like before, it also seems like adding the property now results in no results returned for the detection event. When I remove the property scanning works but it's not accurate with Code39 barcode types especially.

<MLKitView
cameraPosition="back"
:detectionType="type || 'all'"
:barcodeFormats="formats"
:processEveryNthFrame="60"
@detection="onScanResult"
:pause="pauseScanner"
:torchOn="torchOn"
/>

@brooklax
Copy link

Sorry I see this issue is closed, will open a new one

@devlinpadayachee
Copy link

@triniwiz apologies but I just tested with a new android build on my side and although I don't get an exception anymore like before, it also seems like adding the property now results in no results returned for the detection event. When I remove the property scanning works but it's not accurate with Code39 barcode types especially.

<MLKitView cameraPosition="back" :detectionType="type || 'all'" :barcodeFormats="formats" :processEveryNthFrame="60" @detection="onScanResult" :pause="pauseScanner" :torchOn="torchOn" />

+1

@devlinpadayachee
Copy link

Any updates?

@triniwiz
Copy link
Member

Nothing yet, but I'll look into it soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants