aws-samples / aws-sdk-unity-samples

This repository has samples that demonstrate various aspects of the AWS Mobile SDK for Unity, you can get the SDK source on Github (https://github.com/aws/aws-sdk-net)
Other
161 stars 107 forks source link

SNSExample gets crashed after calling AWSSDK.Examples.GCM.Register(...) method. #15

Open hattori opened 8 years ago

hattori commented 8 years ago

Hi there,

I'm playing with SNSExample but it gets crashed when tested on Nexus 5x.

That happened right after calling AWSSDK.Examples.GCM.Register(...) method but I couldn't figure out what was wrong since it did not provide any stacktrace information. It only says "FATAL EXCEPTION". that's it. Here is the log. 03-31 18:54:03.634 3939-5563/? D/GCM: GcmService start Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms cmp=com.google.android.gms/.gcm.GcmService (has extras) } com.google.android.c2dm.intent.REGISTER 03-31 18:54:03.884 25366-25366/myapp.share D/AndroidRuntime: Shutting down VM 03-31 18:54:03.890 25366-25397/myapp.share I/AWSUnityGCMWrapper: Saving regId on app version 1 03-31 18:54:03.900 25366-25397/myapp.share I/Unity: regId = APA91bH343lkjDfPiep970Jay95y-bKygVTRlcK0I4mdEREJkjkl3342uldN9LlhArRfJuwKHBe89YM4DXcS5UXP1qPPVM1qDlzbPxukbV7cLBzWzdB2EMRELKEmFDKFJEREi8VT-W0 UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object) UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object) AWSSDK.Examples.GCM:Register(Action`1, String[]) (at C:\Users\user1\Documents\personal\projects\Share\Assets\Examples\GCM.cs:36) AWSSDK.Examples.SNSExample:RegisterDevice() (at C:\Users\user1\Documents\personal\projects\Share\Assets\Examples\SNSExample.cs:103) UnityEngine.Events.InvokableCall:Invoke(Object[]) (at /Users/builduser/buildslave/unity/build/Runtime/Export/UnityEvent.cs:144) UnityEngine.Events.InvokableCallList:Invoke(Object[]) (at /Users/builduser/buildslave/unity/build/Runtime/Export/UnityEvent.cs:621) UnityEngine.Events.UnityEventBase:Invoke(Object[]) (at /Users/builduser/buildslave/unity/build/Runtime/Export/UnityEvent.cs:756) UnityEngine 03-31 18:54:03.902 25366-25366/myapp.share E/AndroidRuntime: FATAL EXCEPTION: main Process: myapp.share, PID: 25366 java.lang.Error: FATAL EXCEPTION [main] Unity version : 5.3.4f1 Device model : LGE Nexus 5X Device fingerprint: google/bullhead/bullhead:6.0.1/MMB29P/2473553:user/release-keys

I'm using Unity 5.2.4f1.

Cheers

hattori commented 8 years ago

Oops, my Unity version is 5.3.4f1 but 5.2.4f1.

kyriakos96 commented 6 years ago

Hello @hattori Did you resolve you SNS issue? I am facing a similar issue

Exception: JNI: Init'd AndroidJavaClass with null ptr!

I get the above in GCM.cs class

private const string CLASS_NAME = "com.amazonaws.unity.AWSUnityGCMWrapper"; using(var cls = new AndroidJavaClass(CLASS_NAME))