[TIMOB-20528] Android: App is crashing using Facebook Module in 5.2.0.GA
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-12-03T09:54:35.000+0000 |
Affected Version/s | Release 5.2.0 |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Rakhi Mitro |
Assignee | Unknown |
Created | 2016-03-08T08:59:51.000+0000 |
Updated | 2018-12-03T09:54:35.000+0000 |
Description
App is crashing using Facebook Module in 5.2.0.GA .
*Test Environment:*
Appcelerator Studio, build: 4.5.0.201602170821
Operating System Mac OS X -EI Capitan,Versio-10.11.1
Appcelerator Command-Line Interface, version 5.2.0
SDK Version = 5.2.0.GA
Node.js Version = 4.2.2 npm Version = 2.14.7
Android Devices HTC One_M8 Ey android 5.0.2 (android-21)
Module Version: 5.0.0
*Test Steps to reproduce:*
1.Create a brand new project using 5.2.0.GA
2.Add in only one module e.g. facebook
3.Build to an Android 5.1.1 device e.g. Nexus 7
4.Run project
*Test case:*
var win = Ti.UI.createWindow({backgroundColor: 'pink'});
var fb = require('facebook');
fb.addEventListener('login', function(e) {
if (e.success) {
alert('Logged in');
}
});
fb.addEventListener('logout', function(e) {
alert('Logged out');
});
if (Ti.Platform.name === 'android') {
win.fbProxy = fb.createActivityWorker({lifecycleContainer: win});
}
// Add the button. Note that it doesn't need a click event listener.
win.add(fb.createLoginButton({
readPermissions: ['read_stream','email'],
top: 50
}));
win.open();
*Test Result:* App is crashing. Here is the console log.
[ERROR] : TiApplication: (main) [13,378] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gsl.fbtaskrakhi/org.appcelerator.titanium.TiActivity}: Unexpected CallbackManager, please use the provided Factory.; Titanium 5.2.0,2016/02/20 08:05,384775e
[ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gsl.fbtaskrakhi/org.appcelerator.titanium.TiActivity}: Unexpected CallbackManager, please use the provided Factory.
[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
[ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
[ERROR] : TiApplication: at android.app.ActivityThread.-wrap11(ActivityThread.java)
[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:148)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5417)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
[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:253)
[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(TiBaseAc
[ERROR] : TiApplication: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18
Attachments
File | Date | Size |
---|---|---|
Screenshot_20181203-154819.png | 2018-12-03T09:54:18.000+0000 | 50402 |
[~msamah] Take a look?
[~rmitro] The pre-packaged module in 5.4.0.GA was corrupt and will be resolved in 5.5.0. Please use the version from [ti.facebook](https://github.com/appcelerator-modules/ti.facebook/releases/tag/android-5.2.0) directly.
Ooo. looks like [~hansknoechel] is right. Why don't you get the latest module in github to test at the mean time? That will be the working one.