Bug 40821 - Getting System.NotSupportedException on GooglePLus authentification
Summary: Getting System.NotSupportedException on GooglePLus authentification
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2016-05-03 12:52 UTC by Chama
Modified: 2017-06-28 11:07 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Chama 2016-05-03 12:52:26 UTC
Hi,

My app crash when I try to get Google Plus authentification.
I am using the latest stable Xamarin.GooglePlayServices.Ads (version 29.0.0.1). It looks like a bug in Xamarin binding of Android component GooglePlayServices.Auth.

Stack trace:

System.NotSupportedExceptionUnable to activate instance of type Android.Gms.Auth.Api.SignIn.Internal._InternalSignInHubActivity from native handle 0xbec1aab0 (key_handle 0x3cb86e6f).

Java.Interop.TypeManager.CreateInstance(IntPtr handle, JniHandleOwnership transfer, Type targetType)TypeManager.cs:284
Java.Lang.Object.GetObject(IntPtr handle, JniHandleOwnership transfer, Type type)Object.cs:371
Java.Lang.Object._GetObject<T>(IntPtr handle, JniHandleOwnership transfer)Object.cs:342
Java.Lang.Object.GetObject<T>(IntPtr handle, JniHandleOwnership transfer)Object.cs:334
Android.App.Application.IActivityLifecycleCallbacksInvoker.n_OnActivityCreated_Landroid_app_Activity_Landroid_os_Bundle_(IntPtr jnienv, IntPtr native__this, IntPtr native_activity, IntPtr native_savedInstanceState)Android.App.Application.cs:140
at (wrapper dynamic-method) System.Object:6d94bfc9-7d7d-4067-8666-be81f61e3b76 (intptr,intptr,intptr,intptr)
System.MissingMethodExceptionNo constructor found for Android.Gms.Auth.Api.SignIn.Internal._InternalSignInHubActivity::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership)
Java.Interop.TypeManager.CreateProxy(Type type, IntPtr handle, JniHandleOwnership transfer)TypeManager.cs:299
Java.Interop.TypeManager.CreateInstance(IntPtr handle, JniHandleOwnership transfer, Type targetType)TypeManager.cs:277
Java.Lang.ErrorException of type 'Java.Interop.JavaLocationException' was thrown.
Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.

--- End of managed exception stack trace ---

java.lang.Error: Java callstack:
md5b264402a183415c5bc9c92af3aa24a36.MainApplication.n_onActivityCreated(Native Method)
at md5b264402a183415c5bc9c92af3aa24a36.MainApplication.onActivityCreated(MainApplication.java:50)
at android.app.Application.dispatchActivityCreated(Application.java:213)
at android.app.Activity.onCreate(Activity.java:1040)
at android.support.v4.app.BaseFragmentActivityDonut.onCreate(BaseFragmentActivityDonut.java:39)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:298)
com.google.android.gms.auth.api.signin.internal.SignInHubActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:6575)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1134)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3137)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3294)
at android.app.ActivityThread.access$1000(ActivityThread.java:210)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1704)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6934)
java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Comment 1 Joe 2016-09-05 20:14:21 UTC
Looks like this was fixed in 29.0.0.2. I had to clean and delete the obj folder.
Comment 2 Prashant [MSFT] 2017-06-28 11:07:10 UTC
Unfortunately, we’re unable to reproduce this report. If this issue is still occurring for you, please reopen this issue and attach a reproduction to the bug by starting with a clean Xamarin.Android project adding just the code necessary to demonstrate the issue.