EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 445 forks source link

MLKitBarcodeScanner crashing on iOS on NS7 #1702

Open dammynex opened 3 years ago

dammynex commented 3 years ago

I have "@nativescript/firebase": "^11.0.0"

Then: import { MLKitBarcodeScanner } from '@nativescript/firebase/mlkit/barcodescanning'

And on the scan page: <MLKitBarcodeScanner width="320" height="320" @scanResult="onBarcodeScanningResult"> </MLKitBarcodeScanner>

And it just crashes after page is opened

dammynex commented 3 years ago

Update:

I switched "@nativescript/ios": 7.x.x to "@nativescript/ios": "JSC"

And it works fine. So I think the issue is with the new iOS V8 engine.

@EddyVerbruggen

timdoege commented 3 years ago

I get a crash on iOS running V8 as well while it works with JSC / using

"@nativescript/ios": "6.5.3",

instead.

The stack trace is this

====== Assertion failed ======
Native stack trace:
1          0x10104612c tns::Assert(bool, v8::Isolate*) + 128
2          0x100fa9f7c tns::ArgConverter::Invoke(v8::Local<v8::Context>, objc_class*, v8::Local<v8::Object>, tns::V8Args&, tns::MethodMeta const*, bool) + 100
3          0x101008100 tns::MetadataBuilder::InvokeMethod(v8::Local<v8::Context>, tns::MethodMeta const*, v8::Local<v8::Object>, tns::V8Args&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool) + 88
4          0x10100798c tns::MetadataBuilder::MethodCallback(v8::FunctionCallbackInfo<v8::Value> const&) + 220
5          0x101183e10 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) + 536
6          0x1011833dc v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 516
7          0x101182b7c v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 224
8          0x101914d8c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 108
9          0x1018ad6b4 Builtins_InterpreterEntryTrampoline + 244
10         0x1018aaf64 Builtins_JSEntryTrampoline + 164
11         0x1018aac08 Builtins_JSEntry + 168
12         0x105990000 12  ???                                 0x0000000105990000 0x0 + 4388880384
JavaScript stack trace:
at push.../node_modules/@nativescript/firebase/mlkit/mlkit-cameraview.js.TNSMLKitCameraViewDelegateImpl.cameraDidOutputImage (file: node_modules/@nativescript/firebase/mlkit/mlkit-cameraview.ios.js:182:0)

line 182 being

181         if (this.detector.detectInImageCompletion) {
182             this.detector.detectInImageCompletion(this.uiImageToFIRVisionImage(image), function (result, error) {
183                 _this.onSuccessListener(result, error);
184                 onComplete();
185             });
186         }
SmailHammour commented 3 years ago

@EddyVerbruggen could you have a look, please?

SmailHammour commented 3 years ago

@EddyVerbruggen could you please have a look at this? This is really blocking for some of us.

vallemar commented 3 years ago

@SmailHammour @EddyVerbruggen I am in the same situation, has someone found a solution?

SmailHammour commented 3 years ago

@SmailHammour @EddyVerbruggen I am in the same situation, has someone found a solution?

The only thing you can do is use JSC instead of v7. We will have to wait until @EddyVerbruggen finds the time to fix this.

vallemar commented 3 years ago

Thank you very much @SmailHammour, with this version it works perfect but the performance of components such as RadListView is much lower... I am waiting to correct this

SmailHammour commented 3 years ago

@EddyVerbruggen whats the status on this?