facebook-sdk-for-unity
facebook-sdk-for-unity copied to clipboard
Unable to start activity ComponentInfo{com.companyname/com.facebook.unity.FBUnityLoginActivity}
Checklist
- [x] I've updated to the latest released version of the SDK
- [x] I've searched for existing GitHub issues
- [x] I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- [x] I've read the Code of Conduct
- [x] This issue is not security related and can safely be disclosed publicly on GitHub
Environment
Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:
- Unity Editor Version:
2022.3.4
- Unity SDK Version:
16.0.1
- Installation Platform & Verison:
[iOS|Android|WebGL]
Nexus 5X Android8.1.0
Goals
Allow users to connect to Facebook
Expected Results
Facebook Login to work properly
Actual Results
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.company/com.facebook.unity.FBUnityLoginActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.facebook.unity.FBUnityLoginActivity$LoginType.ordinal()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) at android.app.ActivityThread.-wrap11() at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'int com.facebook.unity.FBUnityLoginActivity$LoginType.ordinal()' on a null object reference at com.facebook.unity.FBUnityLoginActivity.onCreate(FBUnityLoginActivity.java:38) at android.app.Activity.performCreate(Activity.java:7009) at android.app.Activity.performCreate(Activity.java:7000) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) at android.app.ActivityThread.-wrap11() at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)