question

fiveampsoftware avatar image
fiveampsoftware asked

Crash with PlayFab push plugin

Hello,

I'm seeing a crash when initializing the playfab push plugin. The following is the callstack, it's happening pretty frequently on this specific device (https://www.amazon.com/gp/product/B00HWMPSL0/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1)

Caused by: java.lang.RuntimeException: Unable to create service com.playfab.unityplugin.PlayFabUnityAndroidPlugin: java.lang.NullPointerException at android.app.ActivityThread.handleCreateService(ActivityThread.java:2625) at android.app.ActivityThread.access$1700(ActivityThread.java:158) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1384) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5365) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at com.google.android.gms.common.zze.isGooglePlayServicesAvailable(Unknown Source) at com.google.android.gms.common.zzc.isGooglePlayServicesAvailable(Unknown Source) at com.google.android.gms.common.GoogleApiAvailability.isGooglePlayServicesAvailable(Unknown Source) at com.playfab.unityplugin.GCM.PlayServicesUtils.isPlayServicesAvailable(PlayServicesUtils.java:28) at com.playfab.unityplugin.PlayFabUnityAndroidPlugin.onCreate(PlayFabUnityAndroidPlugin.java:58) at android.app.ActivityThread.handleCreateService(ActivityThread.java:2615) ... 10 more

----

The device uses Android 4.2.2 (device model SM-T110, Unity 5.6.0.p4). I don't see any issues on my Nexus6 (Android 7.0, Unity 5.6.0.p4). It looks like it's able to receive and register for push notifications for the initial launch but after the first registration and a relaunch, it crashes.

Any tips or guidance would be greatly appreciated :)

Thanks,

-Kevin

Push Notifications
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1807605288 avatar image
1807605288 answered

No version of our push plugin currently supports a device this old. It's in our road map to set up some compatibility for older devices, probably through a separate plugin download. Until we explicitly release a new plugin targeting devices this old, you will have to stick with newer devices.

I have made a note that there is interest in compatibility going so far back, but note, you're the only customer who has requested a version this old.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

marcowilliamspf avatar image
marcowilliamspf answered

Known Issue:


I will have to look into this. It looks like for some reason the context for the Unity Activity is not being retained when it passes it to the isGooglePlayServiceAvailable API call. I don't know when I'll have an answer for why this is happening, but I am investigating the issue as it has been reported a few times.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

fiveampsoftware avatar image fiveampsoftware commented ·

Okay we'll be waiting for a fix, please let us know. We're going to have to disable PlayFab push right now as we are seeing more crash reports - http://imgur.com/a/YK1rk

-Kevin

0 Likes 0 ·
Hamza Lazaar avatar image Hamza Lazaar fiveampsoftware commented ·

hey @fiveampsoftware

the graphs from the screenshot are from Firebase Crash Reports or something else?

I use Fabric's Crashyltics and I already posted my crash report on github.

I think @Paul Gilmore wrapped the method in try/catch to avoid the crash but the root cause is still there.

0 Likes 0 ·
fiveampsoftware avatar image
fiveampsoftware answered

Hi @MarcoWilliamsPF - checking in to see if there's an update here. Thanks!

-Kevin

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Chris avatar image Chris commented ·

Hi, I don't know if it helps but it seems that we also have those especially on 4.2 and 4.3 versions

0 Likes 0 ·
marcowilliamspf avatar image
marcowilliamspf answered

I believe a fix has been pushed and will be deployed on Monday.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1807605288 avatar image 1807605288 ♦ commented ·

Unfortunately, the fix will not be ready today, apologies.

We will have a bunch of fixes coming next week though.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.