-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Xamarin.Android typeload exception with MSAL 4.5.0 #1449
Comments
Workaround - downgrade MSAL to 4.4 on the Android head but keep the iOS at 4.5. You can also keep the shared project at 4.5, it doesn't really matter. At runtime, the Android will use MSAL 4.4 and iOS will use MSAL 4.5. This should be fine because the 4.5 release has virtually no impact on Android code paths. |
I have the same issue, it seems @bgavrilMS workaround works for me for now though. |
I'm having the same issue and reverting the package works. |
@WilliamWatterson86 @mastermoe01 @norton287 |
Fixed in 4.5.1 release |
@jennyf19 @bgavrilMS sorry for the delay getting back to you. V4.5.1 works well! Thanks for getting this out so quickly :) |
Thanks for confirming @WilliamWatterson86 ! |
@jennyf19 4.5.1 also worked for me! thank you! |
Which Version of MSAL are you using ?
Note that to get help, you need to run the latest version. Preview version are also ok.
For ADAL, please log issues to https://github.com/AzureAD/azure-activedirectory-library-for-dotnet
4.5.0
Platform
android only
Repro
VS 16.3.5
Xamarin: 16.3.0.277
Xamarin.Android.SDK 10.0.3.0
UNHANDLED EXCEPTION:
10-16 13:18:43.263 I/MonoDroid(23861): System.TypeInitializationException: The type initializer for 'Attribute' threw an exception. ---> System.TypeLoadException: Could not resolve type with token 01000022 from typeref (expected class 'Microsoft.Identity.Client.Ref.Resource' in assembly 'Microsoft.Identity.Client, Version=4.5.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae')
10-16 13:18:43.263 I/MonoDroid(23861): at Android.Runtime.ResourceIdManager.UpdateIdValues () [0x00097] in <11a340ccc8de43f09c97400139266ef5>:0
10-16 13:18:43.263 I/MonoDroid(23861): at Xamarin.Forms.Platform.Android.Resource+Attribute..cctor () [0x012a2] in D:\a\1\s\Xamarin.Forms.Platform.Android\Resources\Resource.Designer.cs:1579
10-16 13:18:43.263 I/MonoDroid(23861): --- End of inner exception stack trace ---
10-16 13:18:43.263 I/MonoDroid(23861): at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
10-16 13:18:43.263 I/MonoDroid(23861): at Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.ActionBarHeight () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\NavigationPageRenderer.cs:476
10-16 13:18:43.263 I/MonoDroid(23861): at Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.OnLayout (System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0001a] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\NavigationPageRenderer.cs:392
10-16 13:18:43.263 I/MonoDroid(23861): at Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean p0, System.Int32 p1, System.Int32 p2, System.Int32 p3, System.Int32 p4) [0x00008] in D:\a\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:198
10-16 13:18:43.263 I/MonoDroid(23861): at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.40(intptr,intptr,bool,int,int,int,int)
10-16 13:18:43.278 W/zygote64(23861): JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable
The text was updated successfully, but these errors were encountered: