[TIMOB-23129] Android : Facebook Module throwing error in Alloy
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2017-07-10T13:41:33.000+0000 |
Affected Version/s | Release 6.0.4 |
Fix Version/s | n/a |
Components | Android |
Labels | alloy, facebook |
Reporter | Aminul Islam |
Assignee | Nazmus Salahin |
Created | 2016-03-31T18:55:48.000+0000 |
Updated | 2017-07-10T13:41:33.000+0000 |
Description
Hi,
Facebook module with latest SDK throwing error in Alloy on android. I tested this using the SDK 5..2.1 , Facbook Module 5.0.0 , alloy 1.8.2 and android 5.0.2. Facebook module working fine in classic project. This is an alloy issue.
app/alloy.js:
Alloy.Globals.Facebook = require('facebook');
app/views/index.xml:
<Alloy>
<Window backgroundColor="white">
<LoginButton id="fbLogin" module="facebook" top="25" />
<LikeButton id="fbLike" module="facebook" top="100" />
</Window>
</Alloy>
app/controllers/index.js:
$.fbLike.objectID = "http://www.facebook.com/appcelerator";
if (OS_ANDROID) {
$.index.fbProxy = Alloy.Globals.Facebook.createActivityWorker({lifecycleContainer: $.index});
}
$.index.open();
Error Log :
[ERROR] : TiApplication: (main) [14,644] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{ch.inaffect.legi/org.appcelerator.titanium.TiActivity}: Unexpected CallbackManager, please use the provided Factory.; Titanium 5.2.1,2016/03/18 22:51,23e1c7d
[ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{ch.inaffect.legi/org.appcelerator.titanium.TiActivity}: Unexpected CallbackManager, please use the provided Factory.
[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2411)
[ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2474)
[ERROR] : TiApplication: at android.app.ActivityThread.access$800(ActivityThread.java:144)
[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1359)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:155)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5696)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:372)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1029)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
[ERROR] : TiApplication: Caused by: Unexpected CallbackManager, please use the provided Factory.
[ERROR] : TiApplication: at com.facebook.login.LoginManager.registerCallback(LoginManager.java:128)
[ERROR] : TiApplication: at com.facebook.login.widget.LoginButton.registerCallback(LoginButton.java:445)
[ERROR] : TiApplication: at facebook.LoginButtonView.<init>(LoginButtonView.java:40)
[ERROR] : TiApplication: at facebook.LoginButtonProxy.createView(LoginButtonProxy.java:34)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:492)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:478)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:516)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:500)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:478)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:679)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:573)
[ERROR] : TiApplication: at ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:258)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:33)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:524)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:638)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
[ERROR] : TiApplication: at android.app.Activity.performCreate(Activity.java:5958)
[ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1129)
[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
*Environment:*
1. Android Devices: Nexus 7 (android 6.0) ,HTC (android 5.0.2)
2. Facebook 5.0.0
3. Operating System: Mac OS X, Version 10.10.5
4. Node.js Version 0.10.37
5. Titanium SDK Version 5.2.1.GA
Thanks
Hello, I have tested the issue with the SDK 5.2.1.GA. I was able to reproduce the issue. This is a valid bug. Module version is 5.0.0. *Environment*
Regards, Sharif
I am also seeing this as well
Hi, We have been unable to reproduce this issue with latest SDK 6.1.1.GA. So far we have been unable to reproduce this issue. Please add the following code in *app/controllers/index.js*
Environment: 1. Android Devices: Nexus 7 (Android 6.0). 2. Facebook 6.2.0 3. Operating System: Mac OS X, Version 10.10.5 4. Node.js Version 0.10.37 5. Titanium SDK Version 6.1.1.GA