[Bug] Crash: IllegalArgumentException: Receiver not registered: android.hardware.camera2.CameraManager
Description
I am using Microsoft AppCenter and I have received the following crash report for my application. The application uses Xamarin.Essentials to turn on/off the flashlight. The app itself does not use a camera in any other way.
Exception: java.lang.IllegalArgumentException: Receiver not registered: android.hardware.camera2.CameraManager$1@8bacc91 Stack trace:
android.app.LoadedApk.forgetReceiverDispatcher LoadedApk.java:789
android.app.ContextImpl.unregisterReceiver ContextImpl.java:1200
android.hardware.camera2.CameraManager$3.run CameraManager.java:1266
android.os.Handler.handleCallback Handler.java:815
android.os.Handler.dispatchMessage Handler.java:104
android.os.Looper.loop Looper.java:207
android.app.ActivityThread.main ActivityThread.java:5769
java.lang.reflect.Method.invoke Method.java
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run ZygoteInit.java:789
com.android.internal.os.ZygoteInit.main ZygoteInit.java:679
Android version: 6.0
The app works fine on the phones that I use for testing but all of them have a newer Android version (10). It is possible that the crash appears only in older Android versions.
Steps to Reproduce
I am not able to reproduce it on my phone.
Basic Information
-
Version with issue: 1.6.1
-
Last known good version: ?
-
IDE: VS 2019
-
Platform Target Frameworks: Android: 10
-
Nuget Packages: Microsoft.AppCenter.Crashes (4.1.0) Xamarin.AndroidX.MediaRouter (1.2.0) Xamarin.Essentials (1.6.1) Xamarin.Forms (5.0.0.2012)
-
Affected Devices: crash reported for Lenovo PHAB2
Is there any progress on this bug? I have received several other crash reports. This time the device is AllView A5 Ready and the Android version is 6.0.
Any progress? I keep receiving other crash reports on various devices. The Android version is always 6.0 so the bug is probably specific to this version.