question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS 15.4 - Xamarin.iOS - Crash when scanning with AVCaptureEngine

See original GitHub issue

Hello.

Once I updated my device to iOS 15.4, I get the following runtime exception when trying to scan using the AVCaptureEngine. I use the latest available stable version 2.4.1.

System.Exception: System.NotSupportedException: Codabar has no associated enum value on this platform. at AVFoundation.AVMetadataObjectTypeExtensions.GetValue (Foundation.NSString constant) [0x0015b] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/ios/native/AVFoundation/AVMetadataObjectType.g.cs:420 at AVFoundation.AVMetadataObject.ArrayToEnum (Foundation.NSString[] arr) [0x00016] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/AVFoundation/AVMetadataObject.cs:51 at AVFoundation.AVCaptureMetadataOutput.get_AvailableMetadataObjectTypes () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/AVFoundation/AVCaptureMetadataOutput.cs:39 at ZXing.Mobile.AVCaptureScannerView.SetupCaptureSession () [0x0041b] in <04e0b9ffeac840b494808f043a3ab5ba>:0 at ZXing.Mobile.AVCaptureScannerView.<StartScanning>b__36_0 () [0x00001] in <04e0b9ffeac840b494808f043a3ab5ba>:0 at Foundation.NSActionDispatcher.Apply () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSAction.cs:62 at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_IntPtr_IntPtr_bool(intptr,intptr,intptr,intptr,bool) at Foundation.NSObject.InvokeOnMainThread (System.Action action) [0x00007] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:619 at ZXing.Mobile.AVCaptureScannerView.StartScanning (System.Action`1[T] scanResultHandler, ZXing.Mobile.MobileBarcodeScanningOptions options) [0x00047] in <04e0b9ffeac840b494808f043a3ab5ba>:0 at ZXing.Mobile.AVCaptureScannerViewController.ViewDidAppear (System.Boolean animated) [0x0006a] in <04e0b9ffeac840b494808f043a3ab5ba>:0 at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
Glorfindel83commented, Mar 30, 2022

I had a similar problem (not using ZXing but rather iOS built-in scanning) with the same error message (Codabar has no associated enum value on this platform) but I could solve it by simply rebuilding the application with the latest version of Xamarin.iOS (15.8).

1reaction
MFinkBKcommented, Mar 30, 2022

I have the impression that the AVCaptureEngine is faster than the ZXing library when specifying all barcodes, so I try to continue using it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Intermittent Xamarin.iOS crash with no exception thrown
I have created a Xamarin.Forms barcode scanning app with Android and iOS projects. The Android build appears to run fine, but the iOS...
Read more >
Xamarin forms IOS app crashing in iOS 15 beta
We have existing working app for both iOS and Android. App was developed in Xamarin Forms. We also use intune for wrapping the...
Read more >
Xamarin iOS example crashes with "Object reference not set ...
I tested the app on two iPhone with iOS 15.5 and 15.6. ... Xamarin iOS example crashes with "Object reference not set to...
Read more >
Xamarin Forms iOS App Crashing on Startup
We have a user that is unable to open our app on their iPhone. They have uninstalled and reinstalled several times with multiple...
Read more >
Crashes in 3D with iOS 15.4 and the ArcGIS Runtime SDK ...
We have identified an issue displaying a scene view with the ArcGIS Runtime SDK for iOS and the ArcGIS Runtime SDK for .NET...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found