0

I have a problem. I am developing a game in Unity3d which uses the official Facebook SDK and NerdGPG for Google Play Game Services. However, there is an annoying bug:

WHen I want to see the Achievements or Leaderboards, it opnes the UI, but AFTER I CLOSE the UI, then the game crashes. The Logcat tells the following:

03-05 00:09:54.325: E/AndroidRuntime(10810): Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=9002, result=0, data=null} to activity {com.radioactivewasp.flyingwasp/com.facebook.unity.FBUnityPlayerActivity}: java.lang.NullPointerException
03-05 00:09:54.325: E/AndroidRuntime(10810):  at android.app.ActivityThread.deliverResults(ActivityThread.java:3182)
03-05 00:09:54.325: E/AndroidRuntime(10810):  at android.app.ActivityThread.handleSendResult(ActivityThread.java:3225)
03-05 00:09:54.325: E/AndroidRuntime(10810):  at android.app.ActivityThread.access$1100(ActivityThread.java:140)
03-05 00:09:54.325: E/AndroidRuntime(10810):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1275)
03-05 00:09:54.325: E/AndroidRuntime(10810):  at android.os.Handler.dispatchMessage(Handler.java:99)
03-05 00:09:54.325: E/AndroidRuntime(10810):  at android.os.Looper.loop(Looper.java:137)
03-05 00:09:54.325: E/AndroidRuntime(10810):  at android.app.ActivityThread.main(ActivityThread.java:4898)
03-05 00:09:54.325: E/AndroidRuntime(10810):  at java.lang.reflect.Method.invokeNative(Native Method)
03-05 00:09:54.325: E/AndroidRuntime(10810):  at java.lang.reflect.Method.invoke(Method.java:511)
03-05 00:09:54.325: E/AndroidRuntime(10810):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
03-05 00:09:54.325: E/AndroidRuntime(10810):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
03-05 00:09:54.325: E/AndroidRuntime(10810):  at dalvik.system.NativeStart.main(Native Method)
03-05 00:09:54.325: E/AndroidRuntime(10810): Caused by: java.lang.NullPointerException
03-05 00:09:54.325: E/AndroidRuntime(10810):  at com.facebook.unity.FBUnityPlayerActivity.onActivityResult(FBUnityPlayerActivity.java:15)
03-05 00:09:54.325: E/AndroidRuntime(10810):  at android.app.Activity.dispatchActivityResult(Activity.java:5390)
03-05 00:09:54.325: E/AndroidRuntime(10810):  at android.app.ActivityThread.deliverResults(ActivityThread.java:3178)

Anybody know what could be the solution?

programmer23
  • 533
  • 4
  • 15

1 Answers1

0

It looks like your Facebook plugin Activity doesn't know how to handle the onActivityResult() callback when you use the RC_UNUSED(9002) requestID.So I imagine you would want to modify your Facebook Player activity such that the NerdGPG plugin handles the callback.

dmason82
  • 399
  • 4
  • 5
  • I tried to change the onActivityResult() in the FacebookActivity (from Unity), but it doesn't changed, I will keep trying and see how can I fix this. – programmer23 Mar 05 '14 at 21:38
  • dmason82 is right, we used to use onActivityResult callback in FBUnityPlayerActivity, but thats no longer true. Download new version of Facebook SDK(5.0.3), we no longer use FBUnityPlayerActivity and you should be fine. Let me know if you need further help! – juraj Mar 05 '14 at 23:07