App Crashes When Logging-in to FB (Android).

Hello,

We are working on an update to an app that we realsed 10 days ago.

Now, when I build the app, it crashes when logging in to FB. I tried restoring the project to the point that we released the app, and it still crashes, but the one that is in the app store doesn’t.

Did anything change in Corona or the Facebook plugin that we should know about?

thank you,

Mars Inc


build.settings:

android =

{

        permissions =

        {

            { name = “.permission.C2D_MESSAGE”, protectionLevel = “signature” },

        },

usesExpansionFile = false,

usesPermissions =

{

“android.permission.INTERNET”,

“android.permission.VIBRATE”,

“android.permission.GET_ACCOUNTS”,

“android.permission.RECEIVE_BOOT_COMPLETED”,

“android.permission.WRITE_EXTERNAL_STORAGE”,

“android.permission.ACCESS_NETWORK_STATE”,

“com.google.android.c2dm.permission.RECEIVE”,

“com.android.vending.BILLING”,

“.permission.C2D_MESSAGE”,

“com.android.vending.CHECK_LICENSE”,

},

facebookAppId = “249368672077551”,  – Replace XXXXXXXXXX with your Facebook App ID

},


Hi,

I have exactly the same issue ! When I call facebook.login(), my application crashes and the only thing that appears is the android error message :

333563f483ad2067a35b69c9a0124c04.png

The same code was working well 2 days ago …

Not sure if this helps, but after running adb. I believe the issue is related to this line in the log:

W/System.err( 6944): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mars.games.musicmaster/com.facebook.FacebookActivity}: android.content.res.Resources$NotFoundException: File res/layout/com_facebook_activity_layout.xml from xml type layout resource ID #0x7f030019

Hi,

We are also facing the same issue, previously it was working fine. We didn’t change any code!

Corona SDK : 2016.2999.

The log we got was :

 FATAL EXCEPTION: main Process: com.companyname.game, PID: 848 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.companyname.game/com.facebook.FacebookActivity}: android.content.res.Resources$NotFoundException: File res/layout/com\_facebook\_activity\_layout.xml from xml type layout resource ID #0x7f030019 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3320) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3416) at android.app.ActivityThread.access$1100(ActivityThread.java:230) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1822) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7409) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: android.content.res.Resources$NotFoundException: File res/layout/com\_facebook\_activity\_layout.xml from xml type layout resource ID #0x7f030019 at android.content.res.Resources.loadXmlResourceParser(Resources.java:4486) at android.content.res.Resources.loadXmlResourceParser(Resources.java:4433) at android.content.res.Resources.getLayout(Resources.java:2412) at android.view.LayoutInflater.inflate(LayoutInflater.java:427) at android.view.LayoutInflater.inflate(LayoutInflater.java:380) at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:487) at android.app.Activity.setContentView(Activity.java:2400) at com.facebook.FacebookActivity.onCreate(FacebookActivity.java:76) 02-16 19:02:38.203 848 848 E AndroidRunti FATAL EXCEPTION: main Process: com.companyname.game, PID: 848 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.companyname.game/com.facebook.FacebookActivity}: android.content.res.Resources$NotFoundException: File res/layout/com\_facebook\_activity\_layout.xml from xml type layout resource ID #0x7f030019 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3320) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3416) at android.app.ActivityThread.access$1100(ActivityThread.java:230) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1822) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7409) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: android.content.res.Resources$NotFoundException: File res/layout/com\_facebook\_activity\_layout.xml from xml type layout resource ID #0x7f030019 at android.content.res.Resources.loadXmlResourceParser(Resources.java:4486) at android.content.res.Resources.loadXmlResourceParser(Resources.java:4433) at android.content.res.Resources.getLayout(Resources.java:2412) at android.view.LayoutInflater.inflate(LayoutInflater.java:427) at android.view.LayoutInflater.inflate(LayoutInflater.java:380) at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:487) at android.app.Activity.setContentView(Activity.java:2400) FATAL EXCEPTION: main Process: com.companyname.game, PID: 848 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.companyname.game/com.facebook.FacebookActivity}: android.content.res.Resources$NotFoundException: File res/layout/com\_facebook\_activity\_layout.xml from xml type layout resource ID #0x7f030019 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3320) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3416) at android.app.ActivityThread.access$1100(ActivityThread.java:230) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1822) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7409) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: android.content.res.Resources$NotFoundException: File res/layout/com\_facebook\_activity\_layout.xml from xml type layout resource ID #0x7f030019 at android.content.res.Resources.loadXmlResourceParser(Resources.java:4486) at android.content.res.Resources.loadXmlResourceParser(Resources.java:4433) at android.content.res.Resources.getLayout(Resources.java:2412) at android.view.LayoutInflater.inflate(LayoutInflater.java:427) at android.view.LayoutInflater.inflate(LayoutInflater.java:380) at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:487) at android.app.Activity.setContentView(Activity.java:2400) at com.facebook.FacebookActivity.onCreate(FacebookActivity.java:76) at android.app.Activity.performCreate(Activity.java:6904) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1136) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3267) ... 9 more Caused by: java.io.FileNotFoundException: res/layout/com\_facebook\_activity\_layout.xml at android.content.res.AssetManager.openXmlAssetNative(Native Method) at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:542) at android.content.res.Resources.loadXmlResourceParser(Resources.java:4464) ... 19 more at com.facebook.FacebookActivity.onCreate(FacebookActivity.java:76) at android.app.Activity.performCreate(Activity.java:6904) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1136) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3267) ... 9 more Caused by: java.io.FileNotFoundException: res/layout/com\_facebook\_activity\_layout.xml at android.content.res.AssetManager.openXmlAssetNative(Native Method) at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:542) at android.content.res.Resources.loadXmlResourceParser(Resources.java:4464) ... 19 moreme at android.app.Activity.performCreate(Activity.java:6904) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1136) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3267) ... 9 more Caused by: java.io.FileNotFoundException: res/layout/com\_facebook\_activity\_layout.xml at android.content.res.AssetManager.openXmlAssetNative(Native Method) at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:542) at android.content.res.Resources.loadXmlResourceParser(Resources.java:4464) ... 19 more

Something with plugin or  the sdk 2999?

Thanks,

Madan

The last update on the plugin was back in December. We don’t update previous builds. Updates come out in the form of a new daily build.

It’s likely Facebook may have changed something. In that stack trace, it’s complaining about not finding some resource.  

@louxandre have you tethered your device to your computer and run “adb logcat” to see what the issues are? If you need help with that, please see: https://docs.coronalabs.com/guide/basics/debugging/index.html

It might be worth while for someone to test this with a later daily build.

Rob

Yeah, I did that and I get the same error : http://pastebin.com/xjNmQNf4

Can can everyone verify and post what version of Corona SDK you’re using?

Thanks

Rob

I use the last stable version (2992)

Nothing changed in my application related to Facebook login or graph gathering and now both calls crash in the same fashion.

I was using 2992, once the issue started I tested the latest daily build 3038, also happening…

I have the same issue :frowning: Tried building with the latest nightly and some older one too, neither worked :frowning:

We are having the same issue, we tested the app some days ago… yesterday we compile it and upload it to the store.

Now all android users that updated it are not using our app because the crash (on Android only)

We are using Corona 2016.2836. But tested with other one too… neither worked.

Pelase HELP ASAP!!!  :frowning:

Hello, same here… I am testing with the lastest daily build and I’m getting the same response in android . The app crashed.

Last night I test whit almost 10 different daily builds and got the same error. Our last Android Build was on February 10 and it was working ok… maybe this helps tracking what changed from Facebook side.

I’ve asked engineering to look into this. 

Rob

Can we get you guys to try and build again? We think we have this fixed?

Rob

Hello!!! it Work in Version 2016.2992

Thanks Rob and Corona Team!!! 

Hi !
 

Little UP !|

We did not see this bug but we found something else.

In fact, on Facebook Activity there are no activity on Android since the February 14th (No launch, no installation)
Some alerts appear on the Facebook Activity Platform.
 

25206120170223143106PowerEditor.png

It’s maybe linked with the previous bug.

Ideas ?

Benjamin,

Are you calling facebook.publishInstall() as your app first starts up?

Its not fixed Rob.

I’ve already reported this problem with Facebook installs dropping off the face of the planet.  I’ve published with 3005 but no joy.  I’ve just released a version with 3040 (staged roll out) so I’ll let you know if the stats pick up.

Hello Rob, I made a build on feb 19 and it was tuning ok after the Facebook bug. But today I publish a new one and the same bug is happening.

Please, can you check into that ?