Facebook: App Center

Hi Rob,

That’s great! Yeah, the new one breaks my game, even with compatibility mode turned on…where can i access 1260? I cant seem to find it anywhere!

Thanks,

Alan.

http://developer.coronalabs.com/downloads/daily-builds/

I don’t have a subscription, so cant access daily build…I’ve half migrated to 2.0, but I now I’m caught by a scroll view returning nil bug.

Could you tell me when the next public release is scheduled? My game is due for release in 2 weeks…

Or do you know of any workaround? Perhaps, if I time the calls to the listener to get whether it is moving or not?

Alan.

Nevermind, kind of hacked a fix by doing this (for anyone else who is interested):

local isBegan = true local scrollTimer -- ScrollView listener local function scrollListener( event ) if(scrollTimer~=nil)then timer.cancel(scrollTimer) end if(isBegan==true)then print("Phase Began") isBegan = false end local function phaseEnded() print("Phase Ended") isBegan = true end print("Phase Moved") scrollTimer=timer.performWithDelay(100,phaseEnded,1) end

Hi,

this bug has just gone from bad to critical. We uploaded a new build to Apple using 1259 a few days ago. It got rejected with the following reason:

We found that your app exhibited one or more bugs, when reviewed on iPad running iOS 7.0.4 & iPhone 5s running iOS 7.0.4, on both Wi-Fi and cellular networks, which is not in compliance with the App Store Review Guidelines.

Specifically the facebook log in does not work.

How will that be handled and how quick? We can’t take 4 weeks to switch over to Graphics 2.0 (the amount of work we expect for that switch), so the bug must be fixed in the legacy builds as well.

Thanks.

Was it working with a developer or adHoc build?

Thanks

Rob

Hi,

I had a crash on my iPad Retina using an adhoc build, but only the first time I used the facebook login. The next time it worked.

However, I just sat down to get to the bottom of this, to provide you with a use case, but I met another facebook bug that has stopped me completely from figuring out the original bug.

When the alert box popped up asking for my permission to read my friends list etc, I pressed “NO”. Since then I have been unable to login at all. I have deleted and reinstalled the app, booted the device, cleared the safari cache, deleted the app from my facebook settings etc. Nothing helps. facebook.login is called (I’ve tried with and without permissions), but nothing at all is returned in the listener - it isn’t even invoked. I just see the spinner for 10-20 seconds, then it goes away - and I am still at the same scene. Not logged in. No wonder, since the listener is not invoked by your facebook implementation.

Steps to reproduce

===============

  1. do facebook.login(appId, listener, {“publish_actions”}) – choose whatever kind of permission you feel like

  2. Say NO when the facebook alert box pops up

  3. try facebook.login again.

  4. watch how the listener is not invoked

– now try to reinstall the app, boot the device, delete safari cache, delete the app from your facebook settings and see how nothing mends the bug.

When you’ve fixed that so that I am able to get the app working on my device again, I can dive into the original bug I reported that had Apple reject our submission - something crashing when logging in.

I’ll go back to the daily build before you changed the facebook login to get our app approved by Apple. Being rejected in the Facebook App Center is not such a big deal at the moment.

On Nov 1 Rob said …

So I suppose they know about the first issue anyways. Let’s hope they can fix both in one go and roll it all out on G1 so you aren’t forced to go through that 4 week transition for the sake of this fix. I find it appalling that we are all forced to go to G2 if we need fixes to bugs of this nature.

ksan - no. The first issue was FACEBOOK rejecting apps due to Coronalabs having implemented their SDK wrong. Like I’ve tried to tell them for a year :).

The second issue was APPLE rejecting our app because it crashed on facebook login. The crashing came as a result of Coronalabs fixing the first issue.

The third issue is about what happens when you press NO in the facebook permissions prompt.

Issue #2 and #3 needs fixing, and it must be fixed in the legacy builds, not just the new public release with Graphics 2.0, since it’s too big a task to port a bunch of games to use it, and too many bugs in the new graphics engine and the widgets.

Here is the stack trace for ISSUE #3 - this is thrown in the xcode console when I try to do facebook.login after first having pressed NO in the permissions prompt. You need to end the session when the user cancels or NO’s the prompt…
 

Generic error

com.facebook.sdk:InvalidOperationException: FBSession: an attempt was made reauthorize permissions on an unopened session

(

    0   CoreFoundation                      0x2d7e7e9b <redacted> + 154

    1   libobjc.A.dylib                     0x37e836c7 objc_exception_throw + 38

    2   CoreFoundation                      0x2d7e7b89 <redacted> + 0

    3   QuizPix                             0x0009c239 -[FBSession reauthorizeWithPermissions:isRead:behavior:defaultAudience:completionHandler:] + 112

    4   QuizPix                             0x00099bb3 -[FBSession reauthorizeWithReadPermissions:completionHandler:] + 42

    5   QuizPix                             0x0003fad7 _ZNK6Corona12IOSFBConnect5LoginEPKcPS2_i + 718

    6   QuizPix                             0x0004169b _ZN6Corona15FacebookLibrary5loginEP9lua_State + 198

    7   QuizPix                             0x0010f711 luaD_precall + 988

    8   QuizPix                             0x0011c11b luaV_execute + 1478

    9   QuizPix                             0x0010f8e7 luaD_call + 78

    10  QuizPix                             0x00109329 f_call + 16

    11  QuizPix                             0x0011ce87 luai_objcttry + 90

    12  QuizPix                             0x0010fb17 luaD_pcall + 62

    13  QuizPix                             0x001092fd lua_pcall + 232

    14  QuizPix                             0x0013352b _ZN3Rtt10LuaContext6DoCallEP9lua_Stateii + 62

    15  QuizPix                             0x00128b29 _ZNK3Rtt13DisplayObject23DispatchEventWithTargetEP9lua_StateRKNS_6MEventEi + 112

    16  QuizPix                             0x00128b3f _ZNK3Rtt13DisplayObject13DispatchEventEP9lua_StateRKNS_6MEventE + 14

    17  QuizPix                             0x0012c951 _ZNK3Rtt8HitEvent15DispatchFocusedEP9lua_StateRNS_7RuntimeERNS_11StageObjectEPNS_13DisplayObjectEb + 224

    18  QuizPix                             0x0012ce0d _ZNK3Rtt10TouchEvent15DispatchFocusedEP9lua_StateRNS_7RuntimeERNS_11StageObjectEPNS_13DisplayObjectEb + 92

    19  QuizPix                             0x0012ca63 _ZNK3Rtt8HitEvent8DispatchEP9lua_StateRNS_7RuntimeE + 150

    20  QuizPix                             0x0012cdaf _ZNK3Rtt10TouchEvent8DispatchEP9lua_StateRNS_7RuntimeE + 70

    21  QuizPix                             0x001496dd _ZN3Rtt7Runtime13DispatchEventERKNS_6MEventE + 36

    22  QuizPix                             0x000c467f -[EAGLView touchesEnded:withEvent:] + 314

    23  UIKit                               0x300f2ea3 <redacted> + 234

    24  UIKit                               0x300f2ea3 <redacted> + 234

    25  UIKit                               0x2ffa0425 <redacted> + 528

    26  UIKit                               0x2ff9b451 <redacted> + 832

    27  UIKit                               0x2ff70d79 <redacted> + 196

    28  UIKit                               0x2ff6f569 <redacted> + 7116

    29  CoreFoundation                      0x2d7b2f1f <redacted> + 14

    30  CoreFoundation                      0x2d7b23e7 <redacted> + 206

    31  CoreFoundation                      0x2d7b0bd7 <redacted> + 630

    32  CoreFoundation                      0x2d71b471 CFRunLoopRunSpecific + 524

    33  CoreFoundation                      0x2d71b253 CFRunLoopRunInMode + 106

    34  GraphicsServices                    0x3241c2eb GSEventRunModal + 138

    35  UIKit                               0x2ffd0845 UIApplicationMain + 1136

    36  QuizPix                             0x0000e091 main + 100

    37  QuizPix                             0x0000e028 start + 40

)

Here’s the xcode console output for the crash that made APPLE rejected our submission.

2013-11-16 23:05:29.739 BoardRush[302:60b] *** Terminating app due to uncaught exception ‘com.facebook.sdk:InvalidOperationException’, reason: 'FBSession: It is not valid to reauthorize while a previous reauthorize call has not yet completed.'

*** First throw call stack:

(0x2d7e7e83 0x37e836c7 0x2d7e7b89 0x13929d 0x136bb3 0xdcc57 0x2e106929 0x2d7a9e71 0x2d71dab1 0x2e103ec5 0x2e1087c7 0x137b23 0x139651 0x138591 0x383680c3 0x383680af 0x3836a9a9 0x2d7b25b1 0x2d7b0e7d 0x2d71b471 0x2d71b253 0x3241c2eb 0x2ffd0845 0xab091 0xab028)

libc++abi.dylib: terminating with uncaught exception of type NSException

And here is a Bug #4, related to the other bugs. If you manage to log in, and then do facebook.logout, and then do another login, this exception is thrown:
 

Generic error

com.facebook.sdk:InvalidOperationException: FBSession: It is not valid to reauthorize while a previous reauthorize call has not yet completed.

(

    0   CoreFoundation                      0x2d7e7e9b <redacted> + 154

    1   libobjc.A.dylib                     0x37e836c7 objc_exception_throw + 38

    2   CoreFoundation                      0x2d7e7b89 <redacted> + 0

    3   BoardRush                           0x000a529d -[FBSession reauthorizeWithPermissions:isRead:behavior:defaultAudience:completionHandler:] + 212

    4   BoardRush                           0x000a2bb3 -[FBSession reauthorizeWithReadPermissions:completionHandler:] + 42

    5   BoardRush                           0x00048c57 ___ZNK6Corona12IOSFBConnect5LoginEPKcPS2_i_block_invoke159 + 86

    6   Foundation                          0x2e106929 <redacted> + 292

    7   CoreFoundation                      0x2d7a9e71 <redacted> + 12

    8   CoreFoundation                      0x2d71dab1 _CFXNotificationPost + 1720

    9   Foundation                          0x2e103ec5 <redacted> + 72

    10  Foundation                          0x2e1087c7 <redacted> + 30

    11  BoardRush                           0x000a3b23 -[FBSession transitionToState:andUpdateToken:andExpirationDate:shouldCache:loginType:] + 1518

    12  BoardRush                           0x000a5651 -[FBSession transitionAndCallHandlerWithState:error:token:expirationDate:shouldCache:loginType:] + 64

    13  BoardRush                           0x000a2b55 -[FBSession openWithBehavior:completionHandler:] + 436

    14  BoardRush                           0x000a5ba1 +[FBSession openActiveSessionWithPermissions:allowLoginUI:allowSystemAccount:isRead:defaultAudience:completionHandler:] + 212

    15  BoardRush                           0x000a3119 +[FBSession openActiveSessionWithAllowLoginUI:] + 56

    16  BoardRush                           0x00048aa1 _ZNK6Corona12IOSFBConnect5LoginEPKcPS2_i + 664

    17  BoardRush                           0x0004a69b _ZN6Corona15FacebookLibrary5loginEP9lua_State + 198

    18  BoardRush                           0x00118711 luaD_precall + 988

    19  BoardRush                           0x0012511b luaV_execute + 1478

    20  BoardRush                           0x001188e7 luaD_call + 78

    21  BoardRush                           0x00112329 f_call + 16

    22  BoardRush                           0x00125e87 luai_objcttry + 90

    23  BoardRush                           0x00118b17 luaD_pcall + 62

    24  BoardRush                           0x001122fd lua_pcall + 232

    25  BoardRush                           0x0013c52b _ZN3Rtt10LuaContext6DoCallEP9lua_Stateii + 62

    26  BoardRush                           0x00131b29 _ZNK3Rtt13DisplayObject23DispatchEventWithTargetEP9lua_StateRKNS_6MEventEi + 112

    27  BoardRush                           0x00131b3f _ZNK3Rtt13DisplayObject13DispatchEventEP9lua_StateRKNS_6MEventE + 14

    28  BoardRush                           0x00135951 _ZNK3Rtt8HitEvent15DispatchFocusedEP9lua_StateRNS_7RuntimeERNS_11StageObjectEPNS_13DisplayObjectEb + 224

    29  BoardRush                           0x00135e0d _ZNK3Rtt10TouchEvent15DispatchFocusedEP9lua_StateRNS_7RuntimeERNS_11StageObjectEPNS_13DisplayObjectEb + 92

    30  BoardRush                           0x00135a63 _ZNK3Rtt8HitEvent8DispatchEP9lua_StateRNS_7RuntimeE + 150

    31  BoardRush                           0x00135daf _ZNK3Rtt10TouchEvent8DispatchEP9lua_StateRNS_7RuntimeE + 70

    32  BoardRush                           0x001526dd _ZN3Rtt7Runtime13DispatchEventERKNS_6MEventE + 36

    33  BoardRush                           0x000cd67f -[EAGLView touchesEnded:withEvent:] + 314

    34  UIKit                               0x300f2ea3 <redacted> + 234

    35  UIKit                               0x300f2ea3 <redacted> + 234

    36  UIKit                               0x2ffa0425 <redacted> + 528

    37  UIKit                               0x2ff9b451 <redacted> + 832

    38  UIKit                               0x2ff70d79 <redacted> + 196

    39  UIKit                               0x2ff6f569 <redacted> + 7116

    40  CoreFoundation                      0x2d7b2f1f <redacted> + 14

    41  CoreFoundation                      0x2d7b23e7 <redacted> + 206

    42  CoreFoundation                      0x2d7b0bd7 <redacted> + 630

    43  CoreFoundation                      0x2d71b471 CFRunLoopRunSpecific + 524

    44  CoreFoundation                      0x2d71b253 CFRunLoopRunInMode + 106

    45  GraphicsServices                    0x3241c2eb GSEventRunModal + 138

    46  UIKit                               0x2ffd0845 UIApplicationMain + 1136

    47  BoardRush                           0x00017091 main + 100

    48  BoardRush                           0x00017028 start + 40

)

[quote name=“haakon” post=“215438” timestamp=“1384637840”]Issue #2 and #3 needs fixing, and it must be fixed in the legacy builds, not just the new public release with Graphics 2.0, since it’s too big a task to port a bunch of games to use it, and too many bugs in the new graphics engine and the widgets.[/quote] Exactly!!! It is a shame that we are forced to upgrade in order to get fixes to basic issues and the platform we are forced to upgrade introduces even more bugs… Talk about a vicious cycle.

What you can do it to call facebook.login without having any permissions.  When you actually need to do a facebook.request which requires permissions you can call facebook.login again with the needed permissions before doing the request and calling the request in the listener.  This is the flow that facebook likes.  Try it and see if that works.

Hi,

you will get the exact same errors even if you do facebook.login without permissions. The above Session bug is not fixed by changing the lua implementation, it’s a bug in Core.

Hi Rob,

Facebook is still giving me the same error, and is not validating the app with 2013.2076:
 

Your iOS app must use the native Login dialog that comes with Facebook’s SDKs instead of custom web views. Ensure you have successfully tested your Facebook Login integration for Single Sign On or remove this integration as a listed platform in the developer app. See more details here

 

Has this issue been fixed?

 

Thanks,

Alan.

There have been some changes to our Facebook API calls since 2076 came out.  We just released a new updated public build today, 2100.  Please download it and see if you are still having the issue.  This fixes a bunch of things, so it’s really best to move to the new public build as soon as you can.

Rob

I’m having the same issue where after logout, log back in, I get this error.

I’m using 1260 build.

It all works perfect on android, it’s just the iOS version that crashes.

Could I get more info on this?

Edit: I found out that it works on 1202 build.

Interesting thing I noted that was different from 1260 build and 1202 build was that when I do

  1. login

  2. logout

  3. login

after third step, build 1260 would try to pull everything without jumping to and back from facebook app.

It pulls the data and displays it, but after that, it spits out the said error message and freezes.

1202 does the jumping and it works perfectly.

Hopefully this is not an issue with the graphics 2.0 builds as I will be building my new app on it. :stuck_out_tongue:

Also, I hope this helped someone not spend 10 hours and stay up until 730 am like I just did.

Cheers,

Hi! I have the same feedback from Facebook when trying the create the app page: 

Your iOS app must use the native Login dialog that comes with Facebook’s SDKs instead of custom web views. Ensure you have successfully tested your Facebook Login integration for Single Sign On or remove this integration as a listed platform in the developer app. See more details here

 

The app is posting to my own wall, but not viewable by anyone else until the app facebook page has been approved!

Just wondering if this issue has been fixed yet?

 

Thanks,

Alan.

Hi Alan, what version of Corona SDK are you building with?

Thanks

Rob

Hi Rob,

It’s 2013.1212

Thanks,

Alan.

*Edit: just seen a newer version…going to try with that!