[TIMOB-10099] KitchenSink: Facebook - Login failures
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-07-31T13:04:10.000+0000 |
Affected Version/s | Release 2.1.1 |
Fix Version/s | Sprint 2012-15 API, Release 2.1.1, Release 3.0.0 |
Components | Android |
Labels | api, qe-and070112, qe-nfc |
Reporter | Eric Merriman |
Assignee | Ping Wang |
Created | 2012-07-23T16:15:56.000+0000 |
Updated | 2012-07-31T13:04:10.000+0000 |
Description
While running some Facebook tests, I was unable to log in on the Droid which had no Facebook app installed. After further investigation, I could not determine if the lack of Facebook app was entirely relevant.
The console reported:
D/Module ( 2075): Loading module: ../examples/facebook_login_logout -> Resources/examples/facebook_login_logout.js
D/dalvikvm( 2075): GC_FOR_MALLOC freed 5598 objects / 354176 bytes in 61ms
D/LoginButtonProxy( 2075): (KrollRuntimeThread) [1616,136620] Second constructor called
D/TiUIView( 2075): (main) [214,136834] Nativeview is null
D/TiUIView( 2075): (main) [58,136892] Nativeview is null
I/ActivityManager( 1086): Displayed activity com.appcelerator.titanium/org.appcelerator.titanium.TiActivity: 682 ms (total 682 ms)
E/FacebookModule( 2075): (main) [3149,140041] LoginDialogListener onError: The connection to the server was unsuccessful.
E/FacebookModule( 2075): com.facebook.android.DialogError: The connection to the server was unsuccessful.
E/FacebookModule( 2075): at com.facebook.android.FbDialog$FbWebViewClient.onReceivedError(FbDialog.java:211)
E/FacebookModule( 2075): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:303)
E/FacebookModule( 2075): at android.os.Handler.dispatchMessage(Handler.java:99)
E/FacebookModule( 2075): at android.os.Looper.loop(Looper.java:123)
E/FacebookModule( 2075): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/FacebookModule( 2075): at java.lang.reflect.Method.invokeNative(Native Method)
E/FacebookModule( 2075): at java.lang.reflect.Method.invoke(Method.java:521)
E/FacebookModule( 2075): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
E/FacebookModule( 2075): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/FacebookModule( 2075): at dalvik.system.NativeStart.main(Native Method)
E/FacebookModule( 2075): (main) [12,140053] onAuthFail: The connection to the server was unsuccessful.
I/dalvikvm( 2075): Jit: resizing JitTable from 4096 to 8192
D/dalvikvm( 1424): GC_EXPLICIT freed 278 objects / 13984 bytes in 76ms
Thinking that the lack of the Facebook was the cause, I attempted to use the Droid 3 with the Facebook tests, and was unable to login with the following result in the console:
07-23 16:02:13.367 2711 2711 E FacebookModule: (main) [386503,424630] LoginDialogListener onFacebookError: invalid_key:Android key mismatch. Your key "zON/CPoDnIgHvMure4hh9HWdR58" does not match the allowed keys specified in your application settings. Check your application settings at http://www.facebook.com/developers
07-23 16:02:13.367 2711 2711 E FacebookModule: com.facebook.android.FacebookError: invalid_key:Android key mismatch. Your key "zON/CPoDnIgHvMure4hh9HWdR58" does not match the allowed keys specified in your application settings. Check your application settings at http://www.facebook.com/developers
07-23 16:02:13.367 2711 2711 E FacebookModule: at com.facebook.android.Facebook.authorizeCallback(Facebook.java:503)
07-23 16:02:13.367 2711 2711 E FacebookModule: at ti.modules.titanium.facebook.FacebookModule$4.onResult(FacebookModule.java:397)
07-23 16:02:13.367 2711 2711 E FacebookModule: at org.appcelerator.titanium.util.TiActivitySupportHelper$1.onResult(TiActivitySupportHelper.java:57)
07-23 16:02:13.367 2711 2711 E FacebookModule: at org.appcelerator.titanium.util.TiActivitySupportHelper.onActivityResult(TiActivitySupportHelper.java:79)
07-23 16:02:13.367 2711 2711 E FacebookModule: at org.appcelerator.titanium.TiBaseActivity.onActivityResult(TiBaseActivity.java:522)
07-23 16:02:13.367 2711 2711 E FacebookModule: at android.app.Activity.dispatchActivityResult(Activity.java:3988)
07-23 16:02:13.367 2711 2711 E FacebookModule: at android.app.ActivityThread.deliverResults(ActivityThread.java:2666)
07-23 16:02:13.367 2711 2711 E FacebookModule: at android.app.ActivityThread.handleSendResult(ActivityThread.java:2712)
07-23 16:02:13.367 2711 2711 E FacebookModule: at android.app.ActivityThread.access$2000(ActivityThread.java:124)
07-23 16:02:13.367 2711 2711 E FacebookModule: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1004)
07-23 16:02:13.367 2711 2711 E FacebookModule: at android.os.Handler.dispatchMessage(Handler.java:99)
07-23 16:02:13.367 2711 2711 E FacebookModule: at android.os.Looper.loop(Looper.java:130)
07-23 16:02:13.367 2711 2711 E FacebookModule: at android.app.ActivityThread.main(ActivityThread.java:3821)
07-23 16:02:13.367 2711 2711 E FacebookModule: at java.lang.reflect.Method.invokeNative(Native Method)
07-23 16:02:13.367 2711 2711 E FacebookModule: at java.lang.reflect.Method.invoke(Method.java:507)
07-23 16:02:13.367 2711 2711 E FacebookModule: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
07-23 16:02:13.367 2711 2711 E FacebookModule: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
07-23 16:02:13.367 2711 2711 E FacebookModule: at dalvik.system.NativeStart.main(Native Method)
07-23 16:02:13.367 2711 2711 E FacebookModule: (main) [3,424633] onAuthFail: invalid_key:Android key mismatch. Your key "zON/CPoDnIgHvMure4hh9HWdR58" does not match the allowed keys specified in your application settings. Check your application settings at http://www.facebook.com/developers
Steps to reproduce:
1) Install the KS from 2.1.X branch
2) Navigate to Mashups > Facebook
3) Monitor log cat
4) Attempt to login with "force dialog" off
Result:
Failure to log in
Expected:
The ability to log in successfully
Additional note. I was unable to determine if this is a regression, as the API has changed since our last SDK release.
The issue happened on Droid which is shown in the first log is because the network connection failed. The issue happened on Droid 3 which is shown in the second log is because of an invalid key hash (facebook doc is [here](http://developers.facebook.com/docs/mobile/android/build/#register)).
PR https://github.com/appcelerator-developer-relations/KitchenSink/pull/7
Verified fixed with SDK 2.1.1.v20120727140110