BIG PROBLEM: facebook.login({"email"}) no longer works on Android

With our app LIVE, this is seriously disruptive. Please help, anyone.

facebook.login({“email”}) --this has worked for a long time, using FB plugin v4a

11-19 04:40:21.157 18613 18683 I Corona  : ++++++++++: FacebookController.facebookGetCurrentAccessToken()
11-19 04:40:21.157 18613 18683 I Corona  : ++++++++++: FacebookController.fetchLuaState(): com.naef.jnlua.LuaState@9bee4e7
11-19 04:40:21.157 18613 18683 I Corona  : Need to log in!
11-19 04:40:21.158 18613 18683 I Corona  : ++++++++++: FacebookController.facebookLogin()
11-19 04:40:21.158 18613 18683 I Corona  : ++++++++++: FacebookController.requestPermissions()
11-19 04:40:21.159 18613 18683 I Corona  : ERROR: Runtime error
11-19 04:40:21.159 18613 18683 I Corona  : Cannot pass a publish or manage permission (manage_pages) to a request for read authorization
11-19 04:40:21.159 18613 18683 I Corona  : Java Stack Trace:
11-19 04:40:21.159 18613 18683 I Corona  :     com.facebook.login.LoginManager.validateReadPermissions(LoginManager.java:486)
11-19 04:40:21.159 18613 18683 I Corona  :     com.facebook.login.LoginManager.logInWithReadPermissions(LoginManager.java:399)
11-19 04:40:21.159 18613 18683 I Corona  :     plugin.facebook.v4a.FacebookController.requestPermissions(FacebookController.java:656)
11-19 04:40:21.159 18613 18683 I Corona  :     plugin.facebook.v4a.FacebookController.facebookLogin(FacebookController.java:1167)
11-19 04:40:21.159 18613 18683 I Corona  :     plugin.facebook.v4a.LuaLoader$LoginWrapper.invoke(LuaLoader.java:255)
11-19 04:40:21.159 18613 18683 I Corona  :     com.ansca.corona.JavaToNativeShim.nativeTouchEvent(Native Method)
11-19 04:40:21.159 18613 18683 I Corona  :     com.ansca.corona.JavaToNativeShim.touchEvent(JavaToNativeShim.java:430)
11-19 04:40:21.159 18613 18683 I Corona  :     com.ansca.corona.input.RaiseTouchEventTask.executeUsing(RaiseTouchEventTask.java:39)
11-19 04:40:21.159 18613 18683 I Corona  :     com.ansca.corona.CoronaRuntimeTaskDispatcher$TaskEvent.Send(CoronaRuntimeTaskDispatcher.java:170)
11-19 04:40:21.159 18613 18683 I Corona  :     com.ansca.corona.events.EventManager.sendEvents(EventManager.java:91)
11-19 04:40:21.159 18613 18683 I Corona  :     com.ansca.corona.Controller.updateRuntimeState(Controller.java:308)
11-19 04:40:21.159 18613 18683 I Corona  :     com.ansca.corona.gra
11-19 04:40:21.161 18613 18683 I Corona  : ERROR: Runtime error
11-19 04:40:21.161 18613 18683 I Corona  : Cannot pass a publish or manage permission (manage_pages) to a request for read authorization
11-19 04:40:21.161 18613 18683 I Corona  : Java Stack Trace:
11-19 04:40:21.161 18613 18683 I Corona  :     com.facebook.login.LoginManager.validateReadPermissions(LoginManager.java:486)
11-19 04:40:21.161 18613 18683 I Corona  :     com.facebook.login.LoginManager.logInWithReadPermissions(LoginManager.java:399)
11-19 04:40:21.161 18613 18683 I Corona  :     plugin.facebook.v4a.FacebookController.requestPermissions(FacebookController.java:656)
11-19 04:40:21.161 18613 18683 I Corona  :     plugin.facebook.v4a.FacebookController.facebookLogin(FacebookController.java:1167)
11-19 04:40:21.161 18613 18683 I Corona  :     plugin.facebook.v4a.LuaLoader$LoginWrapper.invoke(LuaLoader.java:255)
11-19 04:40:21.161 18613 18683 I Corona  :     com.ansca.corona.JavaToNativeShim.nativeTouchEvent(Native Method)
11-19 04:40:21.161 18613 18683 I Corona  :     com.ansca.corona.JavaToNativeShim.touchEvent(JavaToNativeShim.java:430)
11-19 04:40:21.161 18613 18683 I Corona  :     com.ansca.corona.input.RaiseTouchEventTask.executeUsing(RaiseTouchEventTask.java:39)
11-19 04:40:21.161 18613 18683 I Corona  :     com.ansca.corona.CoronaRuntimeTaskDispatcher$TaskEvent.Send(CoronaRuntimeTaskDispatcher.java:170)
11-19 04:40:21.161 18613 18683 I Corona  :     com.ansca.corona.events.EventManager.sendEvents(EventManager.java:91)
11-19 04:40:21.161 18613 18683 I Corona  :     com.ansca.corona.Controller.updateRuntimeState(Controller.java:308)
11-19 04:40:21.161 18613 18683 I Corona  :     com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:425)
11-19 04:40:21.161 18613 18683 I Corona  :     com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1625)
11-19 04:40:21.161 18613 18683 I Corona  :     com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1380)
11-19 04:40:21.161 18613 18683 I Corona  : stack traceback:
11-19 04:40:21.161 18613 18683 I Corona  :     [C]: ?
11-19 04:40:21.161 18613 18683 I Corona  :     [C]: in function ‘login’
11-19 04:40:21.161 18613 18683 I Corona  :     ?: in function ‘?’
11-19 04:40:21.161 18613 18683 I Corona  :     ?: in function ‘loginToFacebook’
11-19 04:40:21.161 18613 18683 I Corona  :     ?: in function ‘?’
11-19 04:40:21.161 18613 18683 I Corona  :     ?: in function ‘func’
11-19 04:40:21.161 18613 18683 I Corona  :     /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:203: in function </Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:190>

We just pushed a fix. Give it about an hour and try again (12:30pm ET)

Rob

 /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:913: module ‘plugin.facebook.v4a’ not found:resource (plugin.facebook.v4a.lu) does not exist in archive

@Rob, it has been more than 1.5 hours after you said to check it - and as you can see, when I run my app again, I get the message above. The following is the entire console printout:

 WARNING: Could not load class ‘plugin.facebook.v4a.LuaLoader’
11-19 08:50:05.308  2317  2363 I Corona  : ERROR: Runtime error
11-19 08:50:05.308  2317  2363 I Corona  : /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:913: module ‘plugin.facebook.v4a’ not found:resource (plugin.facebook.v4a.lu) does not exist in archive
11-19 08:50:05.308  2317  2363 I Corona  :     no field package.preload[‘plugin.facebook.v4a’]
11-19 08:50:05.308  2317  2363 I Corona  :     no file ‘(null)/plugin/facebook/v4a.lua’
11-19 08:50:05.308  2317  2363 I Corona  :     no file ‘(null)/plugin/facebook/v4a.lua’
11-19 08:50:05.308  2317  2363 I Corona  :     no file ‘/data/app/com.gmail.troylyndon.PlayTrivia-Epyfu3nOAFBsqnUD40NdSA==/lib/arm/libplugin/facebook/v4a.so’
11-19 08:50:05.308  2317  2363 I Corona  :     no file ‘./plugin/facebook/v4a.so’
11-19 08:50:05.308  2317  2363 I Corona  :     no file ‘(null)/plugin/facebook/v4a.so’
11-19 08:50:05.308  2317  2363 I Corona  :     no file ‘/data/app/com.gmail.troylyndon.PlayTrivia-Epyfu3nOAFBsqnUD40NdSA==/lib/arm/libplugin.so’
11-19 08:50:05.308  2317  2363 I Corona  :     no file ‘./plugin.so’
11-19 08:50:05.308  2317  2363 I Corona  :     no file ‘(null)/plugin.so’
11-19 08:50:05.308  2317  2363 I Corona  :     no file ‘/data/app/com.gmail.troylyndon.PlayTrivia-Epyfu3nOAFBsqnUD40NdSA==/lib/arm/libplugin.facebook.v4a.so’
11-19 08:50:05.308  2317  2363 I Corona  :     no file ‘./plugin.facebook.v4a.so’
11-19 08:50:05.308  2317  2363 I Corona  :     no file ‘(null)/plugin.facebook.v4a.so’
11-19 08:50:05.308  2317  2363 I Corona  : stack traceback:
11-19 08:50:05.308  2317  2363 I Corona  :     [C]: in function ‘require’
11-19 08:50:05.308  2317  2363 I Corona  :     /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:913: in function
11-19 08:50:05.310  2317  2363 I Corona  : ERROR: Runtime error
11-19 08:50:05.310  2317  2363 I Corona  : /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:913: module ‘plugin.facebook.v4a’ not found:resource (plugin.facebook.v4a.lu) does not exist in archive
11-19 08:50:05.310  2317  2363 I Corona  :     no field package.preload[‘plugin.facebook.v4a’]
11-19 08:50:05.310  2317  2363 I Corona  :     no file ‘(null)/plugin/facebook/v4a.lua’
11-19 08:50:05.310  2317  2363 I Corona  :     no file ‘(null)/plugin/facebook/v4a.lua’
11-19 08:50:05.310  2317  2363 I Corona  :     no file ‘/data/app/com.gmail.troylyndon.PlayTrivia-Epyfu3nOAFBsqnUD40NdSA==/lib/arm/libplugin/facebook/v4a.so’
11-19 08:50:05.310  2317  2363 I Corona  :     no file ‘./plugin/facebook/v4a.so’
11-19 08:50:05.310  2317  2363 I Corona  :     no file ‘(null)/plugin/facebook/v4a.so’
11-19 08:50:05.310  2317  2363 I Corona  :     no file ‘/data/app/com.gmail.troylyndon.PlayTrivia-Epyfu3nOAFBsqnUD40NdSA==/lib/arm/libplugin.so’
11-19 08:50:05.310  2317  2363 I Corona  :     no file ‘./plugin.so’
11-19 08:50:05.310  2317  2363 I Corona  :     no file ‘(null)/plugin.so’
11-19 08:50:05.310  2317  2363 I Corona  :     no file ‘/data/app/com.gmail.troylyndon.PlayTrivia-Epyfu3nOAFBsqnUD40NdSA==/lib/arm/libplugin.facebook.v4a.so’
11-19 08:50:05.310  2317  2363 I Corona  :     no file ‘./plugin.facebook.v4a.so’
11-19 08:50:05.310  2317  2363 I Corona  :     no file ‘(null)/plugin.facebook.v4a.so’
11-19 08:50:05.310  2317  2363 I Corona  : stack traceback:
11-19 08:50:05.310  2317  2363 I Corona  :     [C]: ?
11-19 08:50:05.310  2317  2363 I Corona  :     [C]: in function ‘require’
11-19 08:50:05.310  2317  2363 I Corona  :     /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:913: in function ‘require’
11-19 08:50:05.310  2317  2363 I Corona  :     ?: in main chunk
11-19 08:50:05.310  2317  2363 I Corona  :     [C]: in function ‘require’
11-19 08:50:05.310  2317  2363 I Corona  :     /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:913: in function ‘require’
11-19 08:50:05.310  2317  2363 I Corona  :     ?: in function ‘listener’
11-19 08:50:05.310  2317  2363 I Corona  :     /Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/timer/timer.lua:212: in function ‘method’
11-19 08:50:05.310  2317  2363 I Corona  :     /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:221: in function </Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:190>

@Rob, FYI, I’m running the latest daily build 3439.

We are investigating…

@Rob, From my records, Facebook registrations of our game stopped 4 days ago. I don’t know if you have another way to automate testing, but it seems that while Facebook and others go through various cycles of security improvement, especially in view of pressure from lawmakers, it is likely we will continue to experience problems with access to social networks, etc… Ideally, CoronaLabs can find out when something is broken before our developer community ends up reporting it, which in this case, is 4 days too late.

The problem has cost us the lost ad expenses, as we purchase visitors. We’ve lost all the ad expenses and were beginning to wonder, what is going on with the app to prevent normal monetization? If we haven’t had this experience, would anyone know? And how long would it take? Just saying. Please always keep in mind that as I critisize, it’s always in love, bro. I love Corona and our community here and just want the best for everyone going forward.

Just today I am getting Facebook errors on Android also. Here’s a screenshot:

fb_error.jpg

This happened with builds from both Corona 3439 and Corona 3425

I noticed that it says “resource (plugin.facebook.v4a.lu) does not exist in archive” with a .lu instead of a .lua

Just in case that typo somewhere could be a cause

I can confirm this new bug also occurs with a much older build 3370, so the issue is that Facebook changed something.

Hmm, well I think all Corona builds still use the Corona build server. My guess is that something in the Corona server-side may have changed. Either way, I think it’s out of our power to fix. God-speed to the Corona devs…

There was an update pushed to the FB plugin that seems to be the culprit. That particular error seems to be gone. Please test your apps against the new updated plugin before pushing changes live.

Thanks

Rob

Actually, .lu is a valid possible extension for Lua. This problem should be resolved.

Rob

That’s great. Thanks for the prompt fix!

Any details on what got changed in the updated Facebook plugin?

I’ll see if I can find out. All I know is it’s an update to the latest Facebook SDK(s). I don’t know that we changed or added any behaviors.

Rob

Can you build the Facebook Sample app and try the “Get User” button?  

Here is what I’m seeing in my console log:
 

Nexus 9: Already logged in with necessary permissions Nexus 9: Printing table true Nexus 9: -------------------------------- Nexus 9: { Nexus 9: "appId":"012345678901234", Nexus 9: "declinedPermissions":[], Nexus 9: "expiration":1547841822, Nexus 9: "grantedPermissions":["public\_profile","user\_friends","email"], Nexus 9: "lastRefreshed":1542657871, Nexus 9: "token":"Some big really long token string", Nexus 9: "userId":"100004288513442" Nexus 9: } Nexus 9: ++++++++++: FacebookController.facebookRequest(me, GET, {}) Nexus 9: Printing table true Nov 19 08:52:00.000 Nexus 9: WARNING: attempt to print a non-table. Table expected, got nil Nov 19 08:52:00.001 Nov 19 08:52:00.289 Nexus 9: ++++++++++: Nov 19 08:52:00.289 FacebookController.FacebookRequestCallbackListener.onCompleted() Nov 19 08:52:00.319 Nexus 9: Facebook Nov 19 08:52:00.319 Listener events: Nexus 9: type(request) Nexus 9: name(fbconnect) Nexus 9: didComplete(false) Nexus 9: isError(false) Nexus 9: response({"name":"BJ Milagro" ... #44) Nexus 9: event.name fbconnect Nexus 9: event.type: request Nexus 9: isError: false Nexus 9: didComplete: false Nexus 9: response: {"name":"BJ Milagro","id":"100004288513442"} Nexus 9: Facebook Command: 7 Nexus 9: Printing table true Nexus 9: -------------------------------- Nexus 9: { Nexus 9: "id":"100004288513442", Nexus 9: "name":"BJ Milagro" Nexus 9: }

It seems to be getting user information correctly.

If you’re doing something different than the sample app, please share your code.

Rob

Hi Rob,

Apparently, it’s working. In the case of our app, we require email address to receive gold bars and benefits. So, when the declinedPermissions list contains “email”, we now have a message that appears telling the user what to do - login to FB on web, click apps & sites, and remove our app. Then, uninstall and reinstall our app (to remove any cache relating to FB) and they are good to go. Here is our typical ‘granted’ access response.

{
11-19 15:22:23.549 25204 25250 I Corona  :   “appId”:“261292011343921”,
11-19 15:22:23.549 25204 25250 I Corona  :   “declinedPermissions”:[],
11-19 15:22:23.549 25204 25250 I Corona  :   “expiration”:1547860942,
11-19 15:22:23.549 25204 25250 I Corona  :   “grantedPermissions”:[“public_profile”,“email”],
11-19 15:22:23.549 25204 25250 I Corona  :   “lastRefreshed”:1542676943,
11-19 15:22:23.549 25204 25250 I Corona  :   “token”:“EAADtpMmE0DEBAHpQ6mcTVI2U6jaz47Gh4SLSZBLwFS9lZCXc0uhulYZBs5YIsUXFHNKjgWctSn14oX5cYhoeN1Rb9o9HJXemSto64rG4gBSYEN8i12j6cfEuZBWaSQWxH1FdrDhm5OY25nutjnBlbxE0fZB5Cw5D9zXKy7yobSCsEKQRDy9tN7kBDSwO6T8nZBdrZCukOqNnZAManCM3pep10a2vhMgZAybAZD”,
11-19 15:22:23.549 25204 25250 I Corona  :   “userId”:“10155876081283506”

}

@Rob,

When the FB App comes up to give the user an opportunity to “Continue as [name]”, the user can click to Edit Permissions. In that list, the public profile and name are set to “REQUIRED”, but the email is not - the email address has a checkbox. How can we set the “email” to be “REQUIRED”, too, so that the user can’t login to FB through our app unless they are going to provide all the info we need?

I’m trying to look on the Facebook developer portal for information but Facebook is having issues this morning. I know Facebook has been making quite a few changes to how apps behave. I don’t know if they have changed things that will allow you to require email or not. As an app user, it should be my decision to allow you to have access to my email. Shouldn’t I be able to use your app and just not get gold bars and benefits?

I’m unaware of any way to specify required vs. optional permissions.

Rob

So in some research, I’ve done this morning is you can’t, with regards to the login dialog box force require a permission other than public_profile which is always required. This document does a good job of explaining how to handle declined permissions:

https://developers.facebook.com/docs/facebook-login/handling-declined-permissions

Keep in mind, that much of Facebook’s API’s can be managed via standard HTTP requests outside of the Facebook plugin. All you need is the AUTH_TOKEN which you can get and use network.request() to do some of these things.

Hopefully, this will help you.

Rob