You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
Version Number of Plugin: 3.1.1
Device Tested On: Sony Xperia XZ1 with Android 9.
Simulator Tested On: -
Version of VS: -
Version of Xamarin: app was built with MonoAndroid 8.1
Versions of other things you are using: -
Steps to reproduce the Behavior
It's random. Personally I wasn't able to reproduce it but I received a few crash reports. Looking at the stacktrace I believe it may relate to xamarin/Essentials#380
Expected Behavior
App doesn't crash.
Actual Behavior
App crashes:
Java.Interop.JniEnvironment+InstanceMethods.GetMethodID(Java.Interop.JniObjectReference type, System.String name, System.String signature) in <5e2db96f839b4c6aa872f8242b2dbdfc>:0
Android.Runtime.JNIEnv.GetMethodID(System.IntPtr kls, System.String name, System.String signature) in <c9894edee12e4450bfacd1a83cdaa6fb>:0
Android.Content.ISharedPreferencesInvoker.Contains(System.String key) in <c9894edee12e4450bfacd1a83cdaa6fb>:0
Plugin.Settings.SettingsImplementation.Contains(System.String key, System.String fileName) in <4cb80ca5509444fa8d9fd4d0a436e069>:0
Plugin.Settings.SettingsImplementation.GetValueOrDefaultInternal[T](System.String key, T defaultValue, System.String fileName) in <4cb80ca5509444fa8d9fd4d0a436e069>:0
Plugin.Settings.SettingsImplementation.GetValueOrDefault(System.String key, System.String defaultValue, System.String fileName) in <4cb80ca5509444fa8d9fd4d0a436e069>:0
MyApp.Utils.Preferences.get_IsLoginInfoSaved() in <67a6630ac5984211b8d4ac1871f56342>:0
MyApp.Utils.AzureSyncTimer.Do() in <67a6630ac5984211b8d4ac1871f56342>:0
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0(System.Object state) in <e41ba7246f28401eb5844b0796036a8e>:0
Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0() in <c9894edee12e4450bfacd1a83cdaa6fb>:0
Java.Lang.Thread+RunnableImplementor.Run() in <c9894edee12e4450bfacd1a83cdaa6fb>:0
Java.Lang.IRunnableInvoker.n_Run(System.IntPtr jnienv, System.IntPtr native__this) in <c9894edee12e4450bfacd1a83cdaa6fb>:0
Code snippet
Preferences.get_IsLoginInfoSaved has the following code:
I just magically started getting this error recently. i have two apps listening to the same firebase reference. when i call the setvalue() method i get this exception.
Having this issue too. Mine happens when I try to access Xamarin.Essentials.Preferences through "ViewAppeared" lifecycle method in MvvmCross Viewmodel.
Specifically when coming back from another activity.
I found this issue and even though I'm not using Essentials, I want to share how I stopped this from occurring:
I was using just sharedPreferences as I'm working on a xamarin android app, and I was trying to write a value from inside a catch block.
I just took off that from the catch block and I stopped receiving this exception.
I hope this may be useful for someone else...
Bug Information
Version Number of Plugin: 3.1.1
Device Tested On: Sony Xperia XZ1 with Android 9.
Simulator Tested On: -
Version of VS: -
Version of Xamarin: app was built with MonoAndroid 8.1
Versions of other things you are using: -
Steps to reproduce the Behavior
It's random. Personally I wasn't able to reproduce it but I received a few crash reports. Looking at the stacktrace I believe it may relate to xamarin/Essentials#380
Expected Behavior
App doesn't crash.
Actual Behavior
App crashes:
Code snippet
Preferences.get_IsLoginInfoSaved
has the following code:_settingsInstance
is anISettings
instance.The text was updated successfully, but these errors were encountered: