Using "Login with Amazon" v 2.1.0.0

So I'm trying to use the Xamarin's Login with Amazon [1] v2.1.0.0 library.

Thus far I see that the documentation is not up to date. The methods and classes don't quite match and appears to have been refactored somewhat. After thorough scrutiny of the library and the documentation, I do see the commonality enough to where I've "retrofitted" my code to look like the documentation [2].

So this is what I'm doing
1. I've create a PCL ContentView which shows a picture that resembles a button.
2. In the iOS project, I'm using a ViewRender where I add a tap gesture and add my retrofitted code.

Here is the code code snippet of my ViewRenderer with "retrofitting"

using Amazon.Login;
using AIMobileLib = Amazon.Login.Mobile;
[assembly: ExportRenderer(typeof(AmazonButton), typeof(AmazonButtonRenderer))]
namespace SpacelySprockets
{
    public class AmazonButtonRenderer : ViewRenderer<AmazonButton,UIView>
    {
        AmazonButton Button { get; set; }
        ...[other code]...
        protected override void OnElementChanged(ElementChangedEventArgs<AmazonButton> ev)
        {
            base.OnElementChanged(ev);

            if (ev.OldElement != null || Element == null)
            {
                return;
            }
            TapGestureRecognizer tapping = new TapGestureRecognizer();
            tapping.Tapped +=  (sender, e) => 
            {
                AIMobileLib.AuthorizeUser (new [] { "profile", "postal_code" }, new AMZNAuthorizationDelegate ());
            };
            Button = ev.NewElement;
            Button.ButtonGraphic.GestureRecognizers.Add(tapping);//ButtonGraphic is an FFImageLoading.Forms.CachedImage property of the AmazonButton Class
        }
    }
}

And here are the classes which resemble the documentations. Granted the documentation is for pre iOS 9 and I have modified it for iOS 9 and higher. I've commented the UIAlertView lines which are from the documentation and I've added my own.

using Amazon.Login;
using AIMobileLib = Amazon.Login.Mobile;
// Class that handles Authentication Success/Failure
public class AMZNAuthorizationDelegate : IAuthenticationDelegate
{
    public IntPtr Handle { get; }

    public void RequestDidSucceed(ApiResult apiResult)
    {
        // Your code after the user authorizes application for
        // requested scopes.
        AIMobileLib.GetProfile(new AMZNGetProfileDelegate());
    }

    public void RequestDidFail(ApiError errorResponse)
    {
        // Your code when the authorization fails.
        errorResponse.InvokeOnMainThread(() => new UIAlertController("User Authorization Failed", null));
                                        // new UIAlertView("User Authorization Failed", errorResponse.Error.Message, null, "Ok", null).Show());
    }

    public void Dispose()
    {
    }
}

// Class that handles AIMobileLib.GetProfile success/failure
public class AMZNGetProfileDelegate : IAuthenticationDelegate
{
    public IntPtr Handle { get; }

    public void RequestDidSucceed(ApiResult apiResult)
    {
        // If request succeeded we retrieve the results from our request
        var name = (NSString)apiResult["name"];
        var email = (NSString)apiResult["email"];
        var userId = (NSString)apiResult["user_id"];
        var postalCode = (NSString)apiResult["postal_code"];

        var result = string.Format("Name: {0}\nEmail: {1}\nUser Id: {2}\nZip: {3}", name, email, userId, postalCode);
        apiResult.InvokeOnMainThread(() => new UIAlertController("Success", null));
                           //new UIAlertView("Success", result, null, "Ok", null).Show());
    }

    public void RequestDidFail(ApiError errorResponse)
    {
        // Get Profile request failed for profile scope.

        if (errorResponse.Error.Code == ErrorCode.ApplicationNotAuthorized)
            errorResponse.InvokeOnMainThread(() => new UIAlertController("Error", null));
                                             //new UIAlertView("Error", "App Not Authorized: " + errorResponse.Error.Message, null, "Ok", null).Show());

        else
        {
            // Handle other errors
            errorResponse.InvokeOnMainThread(() => new UIAlertController("Error", null));
                                             //new UIAlertView("Error", errorResponse.Error.Message, null, "Ok", null).Show());
        }
    }

    public void Dispose()
    {
    }
}

This is where everything goes wrong

The other things I've had to implement are Dispose() and an IntPtr Handle property for Visual Studio 2017 for Mac to compile. These class members are different from the documentation. So when I launch this on the iphone simulator:
1. visual studio debugger connects to the iphone simulator
2. the app loads
3. I click the button
4. In the debugger I see it calling AIMobileLib.AuthorizeUser () in my Tapping event, I see the AMZNAuthorizationDelegate () get "initialized"
5. And then the debugger just disconnects!

I have no idea why this is. I appreciate any help with this.

I think what should happen is that on button tap, it takes me to the amazon portal to login into an amazon account. Upon successfully passing login credentials, I receive an access token back.

Because I'm a newb on this forum I can't post links so I've added them as reference below and with spaces

[1] - components. xamarin. com /view/amazonlogin?version=2.1.0.0
[2] - components. xamarin. com /gettingstarted/amazonlogin?version=2.1.0.0

Answers

  • Ah okay so I just check my application output. This is the output that I got:

    Thread finished: <Thread Pool> #7
    Resolved pending breakpoint at 'AmazonButtonRenderer.cs:56,1' to void SpaceSprockets.AMZNAuthorizationDelegate.RequestDidFail (Amazon.Login.ApiError errorResponse) [0x00001].
    Resolved pending breakpoint at 'AmazonButtonRenderer.cs:50,1' to void SpaceSprockets.AMZNAuthorizationDelegate.RequestDidSucceed (Amazon.Login.ApiResult apiResult) [0x00001].
    2017-12-20 22:39:20.703 SpaceSprockets[12585:389583] critical: Stacktrace:
    
    2017-12-20 22:39:20.703 SpaceSprockets[12585:389583] critical:   at <unknown> <0xffffffff>
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at (wrapper managed-to-native) ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr (intptr,intptr,intptr,intptr) [0x0000c] in <5ae7a5f5841b4f3399332f3f910197c6>:0
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at Amazon.Login.Mobile.AuthorizeUser (string[],Amazon.Login.IAuthenticationDelegate) [0x00044] in <5ae7a5f5841b4f3399332f3f910197c6>:0
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at SpaceSprockets.AmazonButtonRenderer/<>c.<OnElementChanged>b__5_0 (object,System.EventArgs) [0x00001] in /Users/torrho/Projects/Talli/SpaceSprockets/Views/Logins/AmazonButtonRenderer.cs:34
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at Xamarin.Forms.TapGestureRecognizer.SendTapped (Xamarin.Forms.View) [0x0002e] in D:\agent\_work\1\s\Xamarin.Forms.Core\TapGestureRecognizer.cs:48
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at Xamarin.Forms.Platform.iOS.EventTracker/<>c__DisplayClass12_0.<GetNativeRecognizer>b__0 () [0x00047] in <f321195339234cc7a2f7f1d5fa08167d>:0
    2017-12-20 22:39:20.705 SpaceSprockets[12585:389583] critical:   at UIKit.UIGestureRecognizer/ParameterlessDispatch.Activated () [0x00000] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIGestureRecognizer.cs:71
    2017-12-20 22:39:20.705 SpaceSprockets[12585:389583] critical:   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x00020] in <bdb3aaa208384edf9f1266721cf8f9c1>:0
    2017-12-20 22:39:20.705 SpaceSprockets[12585:389583] critical:   at <unknown> <0xffffffff>
    2017-12-20 22:39:20.706 SpaceSprockets[12585:389583] critical:   at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) [0x0005c] in <e9ea199ae7c04df1b1527be56b61ef6d>:0
    2017-12-20 22:39:20.706 SpaceSprockets[12585:389583] critical:   at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIApplication.cs:79
    2017-12-20 22:39:20.706 SpaceSprockets[12585:389583] critical:   at UIKit.UIApplication.Main (string[],string,string) [0x00038] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIApplication.cs:63
    2017-12-20 22:39:20.707 SpaceSprockets[12585:389583] critical:   at SpaceSprockets.Application.Main (string[]) [0x00001] in /Users/torrho/Projects/Talli/SpaceSprockets/Main.cs:12
    2017-12-20 22:39:20.707 SpaceSprockets[12585:389583] critical:   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) [0x00051] in <ce27f3837e1748929bd4f927dbc475c5>:0
    2017-12-20 22:39:20.707 SpaceSprockets[12585:389583] critical: 
    Native stacktrace:
    
    2017-12-20 22:39:20.719 SpaceSprockets[12585:389583] critical:   0   SpaceSprockets                       0x000000010107d6d4 mono_handle_native_crash + 244
    2017-12-20 22:39:20.719 SpaceSprockets[12585:389583] critical:   1   SpaceSprockets                       0x000000010108a4fe mono_sigill_signal_handler + 46
    2017-12-20 22:39:20.719 SpaceSprockets[12585:389583] critical:   2   libsystem_platform.dylib            0x0000000111963f5a _sigtramp + 26
    2017-12-20 22:39:20.720 SpaceSprockets[12585:389583] critical:   3   SpaceSprockets                       0x0000000101519ac7 my_charset + 46535
    2017-12-20 22:39:20.720 SpaceSprockets[12585:389583] critical:   4   SpaceSprockets                       0x0000000100f249af -[AIRSASigner verifyMessage:forSignature:andPublicKey:] + 337
    2017-12-20 22:39:20.720 SpaceSprockets[12585:389583] critical:   5   SpaceSprockets                       0x0000000100f1ce2c +[AIAPIKeyHelper verifyAPIKey:forPackage:] + 234
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   6   SpaceSprockets                       0x0000000100f1f998 -[AIAppIdentifier isAPIKey:validForPackage:] + 114
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   7   SpaceSprockets                       0x0000000100f25416 +[AIMobileLibHelper validateAPIKey:] + 97
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   8   SpaceSprockets                       0x0000000100f1b4da +[AIMobileLib authorizeUserForScopes:delegate:options:] + 149
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   9   SpaceSprockets                       0x000000010123fe69 xamarin_dyn_objc_msgSend + 217
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   10  ???                                 0x000000013069aa75 0x0 + 5107198581
    2017-12-20 22:39:20.722 SpaceSprockets[12585:389583] critical: 
    =================================================================
    Got a SIGILL while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries 
    used by your application.
    =================================================================
    
  • Ah okay so I just check my application output and I got this:

    Thread finished: <Thread Pool> #7
    Resolved pending breakpoint at 'AmazonButtonRenderer.cs:56,1' to void SpaceSprockets.AMZNAuthorizationDelegate.RequestDidFail (Amazon.Login.ApiError errorResponse) [0x00001].
    Resolved pending breakpoint at 'AmazonButtonRenderer.cs:50,1' to void SpaceSprockets.AMZNAuthorizationDelegate.RequestDidSucceed (Amazon.Login.ApiResult apiResult) [0x00001].
    2017-12-20 22:39:20.703 SpaceSprockets[12585:389583] critical: Stacktrace:
    
    2017-12-20 22:39:20.703 SpaceSprockets[12585:389583] critical:   at <unknown> <0xffffffff>
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at (wrapper managed-to-native) ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr (intptr,intptr,intptr,intptr) [0x0000c] in <5ae7a5f5841b4f3399332f3f910197c6>:0
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at Amazon.Login.Mobile.AuthorizeUser (string[],Amazon.Login.IAuthenticationDelegate) [0x00044] in <5ae7a5f5841b4f3399332f3f910197c6>:0
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at SpaceSprockets.AmazonButtonRenderer/<>c.<OnElementChanged>b__5_0 (object,System.EventArgs) [0x00001] in /Users/torrho/Projects/Talli/SpaceSprockets/Views/Logins/AmazonButtonRenderer.cs:34
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at Xamarin.Forms.TapGestureRecognizer.SendTapped (Xamarin.Forms.View) [0x0002e] in D:\agent\_work\1\s\Xamarin.Forms.Core\TapGestureRecognizer.cs:48
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at Xamarin.Forms.Platform.iOS.EventTracker/<>c__DisplayClass12_0.<GetNativeRecognizer>b__0 () [0x00047] in <f321195339234cc7a2f7f1d5fa08167d>:0
    2017-12-20 22:39:20.705 SpaceSprockets[12585:389583] critical:   at UIKit.UIGestureRecognizer/ParameterlessDispatch.Activated () [0x00000] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIGestureRecognizer.cs:71
    2017-12-20 22:39:20.705 SpaceSprockets[12585:389583] critical:   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x00020] in <bdb3aaa208384edf9f1266721cf8f9c1>:0
    2017-12-20 22:39:20.705 SpaceSprockets[12585:389583] critical:   at <unknown> <0xffffffff>
    2017-12-20 22:39:20.706 SpaceSprockets[12585:389583] critical:   at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) [0x0005c] in <e9ea199ae7c04df1b1527be56b61ef6d>:0
    2017-12-20 22:39:20.706 SpaceSprockets[12585:389583] critical:   at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIApplication.cs:79
    2017-12-20 22:39:20.706 SpaceSprockets[12585:389583] critical:   at UIKit.UIApplication.Main (string[],string,string) [0x00038] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIApplication.cs:63
    2017-12-20 22:39:20.707 SpaceSprockets[12585:389583] critical:   at SpaceSprockets.Application.Main (string[]) [0x00001] in /Users/torrho/Projects/Talli/SpaceSprockets/Main.cs:12
    2017-12-20 22:39:20.707 SpaceSprockets[12585:389583] critical:   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) [0x00051] in <ce27f3837e1748929bd4f927dbc475c5>:0
    2017-12-20 22:39:20.707 SpaceSprockets[12585:389583] critical: 
    Native stacktrace:
    
    2017-12-20 22:39:20.719 SpaceSprockets[12585:389583] critical:   0   SpaceSprockets                       0x000000010107d6d4 mono_handle_native_crash + 244
    2017-12-20 22:39:20.719 SpaceSprockets[12585:389583] critical:   1   SpaceSprockets                       0x000000010108a4fe mono_sigill_signal_handler + 46
    2017-12-20 22:39:20.719 SpaceSprockets[12585:389583] critical:   2   libsystem_platform.dylib            0x0000000111963f5a _sigtramp + 26
    2017-12-20 22:39:20.720 SpaceSprockets[12585:389583] critical:   3   SpaceSprockets                       0x0000000101519ac7 my_charset + 46535
    2017-12-20 22:39:20.720 SpaceSprockets[12585:389583] critical:   4   SpaceSprockets                       0x0000000100f249af -[AIRSASigner verifyMessage:forSignature:andPublicKey:] + 337
    2017-12-20 22:39:20.720 SpaceSprockets[12585:389583] critical:   5   SpaceSprockets                       0x0000000100f1ce2c +[AIAPIKeyHelper verifyAPIKey:forPackage:] + 234
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   6   SpaceSprockets                       0x0000000100f1f998 -[AIAppIdentifier isAPIKey:validForPackage:] + 114
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   7   SpaceSprockets                       0x0000000100f25416 +[AIMobileLibHelper validateAPIKey:] + 97
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   8   SpaceSprockets                       0x0000000100f1b4da +[AIMobileLib authorizeUserForScopes:delegate:options:] + 149
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   9   SpaceSprockets                       0x000000010123fe69 xamarin_dyn_objc_msgSend + 217
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   10  ???                                 0x000000013069aa75 0x0 + 5107198581
    2017-12-20 22:39:20.722 SpaceSprockets[12585:389583] critical: 
    =================================================================
    Got a SIGILL while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries 
    used by your application.
    =================================================================
    

    To me this looks like a bunch of pointer arithmetic going on in the background of Amazon.Login.dll and something is failing. Since this is a xamarin library, is this something I can report to on Bugzilla??

  • Ah okay so I just check my application output and I got this:

    Thread finished: <Thread Pool> #7
    Resolved pending breakpoint at 'AmazonButtonRenderer.cs:56,1' to void SpaceSprockets.AMZNAuthorizationDelegate.RequestDidFail (Amazon.Login.ApiError errorResponse) [0x00001].
    Resolved pending breakpoint at 'AmazonButtonRenderer.cs:50,1' to void SpaceSprockets.AMZNAuthorizationDelegate.RequestDidSucceed (Amazon.Login.ApiResult apiResult) [0x00001].
    2017-12-20 22:39:20.703 SpaceSprockets[12585:389583] critical: Stacktrace:
    
    2017-12-20 22:39:20.703 SpaceSprockets[12585:389583] critical:   at <unknown> <0xffffffff>
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at (wrapper managed-to-native) ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr (intptr,intptr,intptr,intptr) [0x0000c] in <5ae7a5f5841b4f3399332f3f910197c6>:0
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at Amazon.Login.Mobile.AuthorizeUser (string[],Amazon.Login.IAuthenticationDelegate) [0x00044] in <5ae7a5f5841b4f3399332f3f910197c6>:0
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at SpaceSprockets.AmazonButtonRenderer/<>c.<OnElementChanged>b__5_0 (object,System.EventArgs) [0x00001] in /Users/torrho/Projects/Talli/SpaceSprockets/Views/Logins/AmazonButtonRenderer.cs:34
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at Xamarin.Forms.TapGestureRecognizer.SendTapped (Xamarin.Forms.View) [0x0002e] in D:\agent\_work\1\s\Xamarin.Forms.Core\TapGestureRecognizer.cs:48
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at Xamarin.Forms.Platform.iOS.EventTracker/<>c__DisplayClass12_0.<GetNativeRecognizer>b__0 () [0x00047] in <f321195339234cc7a2f7f1d5fa08167d>:0
    2017-12-20 22:39:20.705 SpaceSprockets[12585:389583] critical:   at UIKit.UIGestureRecognizer/ParameterlessDispatch.Activated () [0x00000] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIGestureRecognizer.cs:71
    2017-12-20 22:39:20.705 SpaceSprockets[12585:389583] critical:   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x00020] in <bdb3aaa208384edf9f1266721cf8f9c1>:0
    2017-12-20 22:39:20.705 SpaceSprockets[12585:389583] critical:   at <unknown> <0xffffffff>
    2017-12-20 22:39:20.706 SpaceSprockets[12585:389583] critical:   at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) [0x0005c] in <e9ea199ae7c04df1b1527be56b61ef6d>:0
    2017-12-20 22:39:20.706 SpaceSprockets[12585:389583] critical:   at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIApplication.cs:79
    2017-12-20 22:39:20.706 SpaceSprockets[12585:389583] critical:   at UIKit.UIApplication.Main (string[],string,string) [0x00038] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIApplication.cs:63
    2017-12-20 22:39:20.707 SpaceSprockets[12585:389583] critical:   at SpaceSprockets.Application.Main (string[]) [0x00001] in /Users/torrho/Projects/Talli/SpaceSprockets/Main.cs:12
    2017-12-20 22:39:20.707 SpaceSprockets[12585:389583] critical:   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) [0x00051] in <ce27f3837e1748929bd4f927dbc475c5>:0
    2017-12-20 22:39:20.707 SpaceSprockets[12585:389583] critical: 
    Native stacktrace:
    
    2017-12-20 22:39:20.719 SpaceSprockets[12585:389583] critical:   0   SpaceSprockets                       0x000000010107d6d4 mono_handle_native_crash + 244
    2017-12-20 22:39:20.719 SpaceSprockets[12585:389583] critical:   1   SpaceSprockets                       0x000000010108a4fe mono_sigill_signal_handler + 46
    2017-12-20 22:39:20.719 SpaceSprockets[12585:389583] critical:   2   libsystem_platform.dylib            0x0000000111963f5a _sigtramp + 26
    2017-12-20 22:39:20.720 SpaceSprockets[12585:389583] critical:   3   SpaceSprockets                       0x0000000101519ac7 my_charset + 46535
    2017-12-20 22:39:20.720 SpaceSprockets[12585:389583] critical:   4   SpaceSprockets                       0x0000000100f249af -[AIRSASigner verifyMessage:forSignature:andPublicKey:] + 337
    2017-12-20 22:39:20.720 SpaceSprockets[12585:389583] critical:   5   SpaceSprockets                       0x0000000100f1ce2c +[AIAPIKeyHelper verifyAPIKey:forPackage:] + 234
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   6   SpaceSprockets                       0x0000000100f1f998 -[AIAppIdentifier isAPIKey:validForPackage:] + 114
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   7   SpaceSprockets                       0x0000000100f25416 +[AIMobileLibHelper validateAPIKey:] + 97
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   8   SpaceSprockets                       0x0000000100f1b4da +[AIMobileLib authorizeUserForScopes:delegate:options:] + 149
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   9   SpaceSprockets                       0x000000010123fe69 xamarin_dyn_objc_msgSend + 217
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   10  ???                                 0x000000013069aa75 0x0 + 5107198581
    2017-12-20 22:39:20.722 SpaceSprockets[12585:389583] critical: 
    =================================================================
    Got a SIGILL while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries 
    used by your application.
    =================================================================
    

    To me this looks like a bunch of pointer arithmetic going on in the background of Amazon.Login.dll and something is failing. Since this is a xamarin library, is this something I can report to on Bugzilla??

  • Ah okay so I just check my application output and I got this:

    Thread finished: <Thread Pool> #7
    Resolved pending breakpoint at 'AmazonButtonRenderer.cs:56,1' to void SpaceSprockets.AMZNAuthorizationDelegate.RequestDidFail (Amazon.Login.ApiError errorResponse) [0x00001].
    Resolved pending breakpoint at 'AmazonButtonRenderer.cs:50,1' to void SpaceSprockets.AMZNAuthorizationDelegate.RequestDidSucceed (Amazon.Login.ApiResult apiResult) [0x00001].
    2017-12-20 22:39:20.703 SpaceSprockets[12585:389583] critical: Stacktrace:
    
    2017-12-20 22:39:20.703 SpaceSprockets[12585:389583] critical:   at <unknown> <0xffffffff>
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at (wrapper managed-to-native) ApiDefinition.Messaging.void_objc_msgSend_IntPtr_IntPtr (intptr,intptr,intptr,intptr) [0x0000c] in <5ae7a5f5841b4f3399332f3f910197c6>:0
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at Amazon.Login.Mobile.AuthorizeUser (string[],Amazon.Login.IAuthenticationDelegate) [0x00044] in <5ae7a5f5841b4f3399332f3f910197c6>:0
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at SpaceSprockets.AmazonButtonRenderer/<>c.<OnElementChanged>b__5_0 (object,System.EventArgs) [0x00001] in /Users/torrho/Projects/Talli/SpaceSprockets/Views/Logins/AmazonButtonRenderer.cs:34
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at Xamarin.Forms.TapGestureRecognizer.SendTapped (Xamarin.Forms.View) [0x0002e] in D:\agent\_work\1\s\Xamarin.Forms.Core\TapGestureRecognizer.cs:48
    2017-12-20 22:39:20.704 SpaceSprockets[12585:389583] critical:   at Xamarin.Forms.Platform.iOS.EventTracker/<>c__DisplayClass12_0.<GetNativeRecognizer>b__0 () [0x00047] in <f321195339234cc7a2f7f1d5fa08167d>:0
    2017-12-20 22:39:20.705 SpaceSprockets[12585:389583] critical:   at UIKit.UIGestureRecognizer/ParameterlessDispatch.Activated () [0x00000] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIGestureRecognizer.cs:71
    2017-12-20 22:39:20.705 SpaceSprockets[12585:389583] critical:   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x00020] in <bdb3aaa208384edf9f1266721cf8f9c1>:0
    2017-12-20 22:39:20.705 SpaceSprockets[12585:389583] critical:   at <unknown> <0xffffffff>
    2017-12-20 22:39:20.706 SpaceSprockets[12585:389583] critical:   at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) [0x0005c] in <e9ea199ae7c04df1b1527be56b61ef6d>:0
    2017-12-20 22:39:20.706 SpaceSprockets[12585:389583] critical:   at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIApplication.cs:79
    2017-12-20 22:39:20.706 SpaceSprockets[12585:389583] critical:   at UIKit.UIApplication.Main (string[],string,string) [0x00038] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIApplication.cs:63
    2017-12-20 22:39:20.707 SpaceSprockets[12585:389583] critical:   at SpaceSprockets.Application.Main (string[]) [0x00001] in /Users/torrho/Projects/Talli/SpaceSprockets/Main.cs:12
    2017-12-20 22:39:20.707 SpaceSprockets[12585:389583] critical:   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) [0x00051] in <ce27f3837e1748929bd4f927dbc475c5>:0
    2017-12-20 22:39:20.707 SpaceSprockets[12585:389583] critical: 
    Native stacktrace:
    
    2017-12-20 22:39:20.719 SpaceSprockets[12585:389583] critical:   0   SpaceSprockets                       0x000000010107d6d4 mono_handle_native_crash + 244
    2017-12-20 22:39:20.719 SpaceSprockets[12585:389583] critical:   1   SpaceSprockets                       0x000000010108a4fe mono_sigill_signal_handler + 46
    2017-12-20 22:39:20.719 SpaceSprockets[12585:389583] critical:   2   libsystem_platform.dylib            0x0000000111963f5a _sigtramp + 26
    2017-12-20 22:39:20.720 SpaceSprockets[12585:389583] critical:   3   SpaceSprockets                       0x0000000101519ac7 my_charset + 46535
    2017-12-20 22:39:20.720 SpaceSprockets[12585:389583] critical:   4   SpaceSprockets                       0x0000000100f249af -[AIRSASigner verifyMessage:forSignature:andPublicKey:] + 337
    2017-12-20 22:39:20.720 SpaceSprockets[12585:389583] critical:   5   SpaceSprockets                       0x0000000100f1ce2c +[AIAPIKeyHelper verifyAPIKey:forPackage:] + 234
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   6   SpaceSprockets                       0x0000000100f1f998 -[AIAppIdentifier isAPIKey:validForPackage:] + 114
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   7   SpaceSprockets                       0x0000000100f25416 +[AIMobileLibHelper validateAPIKey:] + 97
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   8   SpaceSprockets                       0x0000000100f1b4da +[AIMobileLib authorizeUserForScopes:delegate:options:] + 149
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   9   SpaceSprockets                       0x000000010123fe69 xamarin_dyn_objc_msgSend + 217
    2017-12-20 22:39:20.721 SpaceSprockets[12585:389583] critical:   10  ???                                 0x000000013069aa75 0x0 + 5107198581
    2017-12-20 22:39:20.722 SpaceSprockets[12585:389583] critical: 
    =================================================================
    Got a SIGILL while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries 
    used by your application.
    =================================================================
    

    To me this looks like a bunch of pointer arithmetic going on in the background of Amazon.Login.dll and something is failing. Since this is a xamarin library, is this something I can report to on Bugzilla??

Sign In or Register to comment.