Skip to content

System.ArgumentException: Handle must be valid. Parameter name: instance on CrossSecureStorage #51

Description

@HadiHas

Lately the xamarin android app is crashing randomly on CrossSecureStorage with error as below:

public static string CrossSecureUserTypeKey { get; } = "UserType"; //Located in Statics.cs var UserType = Plugin.SecureStorage.CrossSecureStorage.Current.GetValue(Statics.CrossSecureUserTypeKey);

Error:

System.ArgumentException: Handle must be valid. Parameter name: type at Java.Interop.JniEnvironment+InstanceMethods.GetMethodID (Java.Interop.JniObjectReference type, System.String name, System.String signature) [0x00009] in :0 at Android.Runtime.JNIEnv.GetMethodID (System.IntPtr kls, System.String name, System.String signature) [0x00007] in :0 at Android.Content.ISharedPreferencesInvoker.Contains (System.String key) [0x00012] in :0 at Plugin.SecureStorage.SecureStorage.HasKey (System.String key) [0x0000d] in :0 at drappme.MainActivity.b__40_0 () [0x00018]

any thoughts?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions