Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-23129

Android : Facebook Module throwing error in Alloy

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 6.0.4
    • Fix Version/s: None
    • Component/s: Android
    • Labels:

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nsalahin Nazmus Salahin
                Reporter:
                aislam Aminul Islam (Inactive)
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-9583
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration