Microsoft-authentication-library-for-dotnet: System.MissingMethodException: Method 'Android.Support.CustomTabs.CustomTabsIntent.LaunchUrl' not found.

Created on 31 Oct 2017  路  18Comments  路  Source: AzureAD/microsoft-authentication-library-for-dotnet

Hi,

Experiencing exception in Azure B2C Directory login by using MSAL Library on Android platform with the following two libraries when updated to latest version (26.1.0.1)

  1. Xamarin.Android.Support.CustomTabs (version 26.1.0.1)
  2. Xamarin.Android.Support.v4 (version 26.1.0.1)

Please download sample from the following Link:

https://github.com/Azure-Samples/active-directory-b2c-android-native-msal

Exception:

System.MissingMethodException: Method 'Android.Support.CustomTabs.CustomTabsIntent.LaunchUrl' not found.

StackTrace:

MonoDroid( 7659): UNHANDLED EXCEPTION:
MonoDroid( 7659): System.MissingMethodException: Method 'Android.Support.CustomTabs.CustomTabsIntent.LaunchUrl' not found.
MonoDroid( 7659): at Android.App.Activity.n_OnResume (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] :0
MonoDroid( 7659): at (wrapper dynamic-method) S
An unhandled exception occured.

Fixed

Most helpful comment

Guys, where's that hotfix? It has been 17days now. Using the dev branch nuget results in referencing a gazillion of alpha packages which is really not in anyones interest.
Any reliable 'eta' would be appreciated.

Cheers

All 18 comments

Hi, your question seems to be a duplicate of #462 and others. However, one workaround suggested is to update the package to the latest alpha build, which doesn't work for me...
D茅veloppement of this library seems nothing but abandonned...

It's a real shame. This package made using B2C a breeze, and it would definitely be worth maintaining from a marketing point of view.

@maddentist @melwil : the library is far from being abandoned. Sorry if we gave you this impression. This issue is already fixed in the dev branch, if you want to try it. We just need to release a new version of the preview.

Please release a new version of preview asap with this fix. Thank you!

@jmprieur Which dev branch? The branch called dev, or some feature branch? I would like to test it.

EDIT: Is there an ETA on a new preview package?

The dev branch.
We are looking at when we could release a preview

How do I get access to the dev branch? Are you referring to "aad-clients-nightly"?
This issue is a real show stopper for my team unfortunately:

12-04 15:09:08.681 I/MonoDroid( 7872): UNHANDLED EXCEPTION:
12-04 15:09:08.716 I/MonoDroid( 7872): System.MissingMethodException: Method 'Android.Support.CustomTabs.CustomTabsIntent.LaunchUrl' not found.
12-04 15:09:08.716 I/MonoDroid( 7872): at Android.App.Activity.n_OnResume (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <e975227ac8644a30bb0866117325de0d>:0
12-04 15:09:08.716 I/MonoDroid( 7872): at (wrapper dynamic-method) System.Object:531367e7-3c77-4d76-add4-698e079c95b5 (intptr,intptr)

I have tried "1.1.1-alpha0414" (and 0413) from "aad-clients-nightly" and that stopped the app even running.

12-04 15:19:50.695 I/MonoDroid( 8498): System.TypeInitializationException: The type initializer for 'Attribute' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingFieldException: Field 'Microsoft.Identity.Client.Resource/Attribute.alpha' not found.

A ballpark estimate for when we could expect a new version to be compatible with Android would be much appreciated. As it stands now, we are pushing the login on Android down the roadmap hoping an update will happen before we have to consider other options.

@jmprieur Hi, I have tried using the dev branch and also taken a look to see anything could warrant the fixed label but don't seem to see anything recently relevant?
https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/dev/src/Microsoft.Identity.Client/Platforms/Android/AuthenticationActivity.cs

Are you able to please provide a timeframe for the fix rollout as @melwil has requested? Android is a pretty major platform to have "broken".

We are going to try to release a hotfix for this issue next week
cc: @kpanwar

@jmprieur Hi there, I just wanted to get an update on when this issue will be released to preview (I noticed it is "Fixed" now) as your previous comment suggested a hotfix would be made available last week. I have tried to grab an alpha build but these are not installing:

Failed to add reference. The package 'Microsoft.Identity.Client' tried to add a framework reference to 'System.Collections' which was not found in the GAC. This is possibly a bug in the package. Please contact the package owners for assistance.
Error HRESULT E_FAIL has been returned from a call to a COM component.

Thanks in advance

Guys, where's that hotfix? It has been 17days now. Using the dev branch nuget results in referencing a gazillion of alpha packages which is really not in anyones interest.
Any reliable 'eta' would be appreciated.

Cheers

Guys, Waiting on hotfix from so many days. Can you please give ETA so that we can think to find some other solution if it takes long time.

Thanks in advance

Thanks for your patience. We will release the hotfix today

Hi Guys, waiting on updates.please message the status

Thanks for your patience.
We released Microsoft.Identity.Client 1.1.1-preview0040 yesterday: See https://www.nuget.org/packages/Microsoft.Identity.Client/1.1.1-preview0040

Thank you so much Guys,It is awesome it did trick and working like charm.

Thank you! Working for me now as well.

Was this page helpful?
0 / 5 - 0 ratings