capacitor-firebase-auth icon indicating copy to clipboard operation
capacitor-firebase-auth copied to clipboard

Facebook-related crash without using facebook

Open hermitdemschoenenleben opened this issue 3 years ago • 2 comments

First of all: thanks for the great work!

I deployed a capacitor app to a few thousand users and use capacitor-firebase-auth for phone authentication. "phone" is also the only provider enabled in capacitor.config.json. In my logs I noticed now that sometimes the app crashes with this error:

Unable to start activity ComponentInfo{MYBUNDLEID/com.facebook.CustomTabMainActivity}: The SDK has not been initialized, make sure to call FacebookSdk.sdkInitialize() first.

Directly before that, I see

Unable to start activity ComponentInfo{MYBUNDLEID/com.facebook.FacebookActivity}: A valid Facebook app id must be set in the AndroidManifest.xml or set by calling FacebookSdk.setApplicationId before initializing the sdk.

Now, I'm not using facebook anywhere, so I suspect that this is a bug of capacitor-firebase-auth?

hermitdemschoenenleben avatar Jul 07 '21 06:07 hermitdemschoenenleben

Any updates on this issue?

Darrow8 avatar Jul 02 '22 03:07 Darrow8

in our app, we didn't see this error for quite some time now. However, I suspect that the reason for this problem is that capacitor-firebase-auth has facebook SDK as a requirement, and facebook SDK auto-initializes on app launch. I guess that adding

<meta-data android:name="com.facebook.sdk.AutoInitEnabled" android:value="false" />

to AndroidManifest.xml may fix the problem (-> https://developers.facebook.com/docs/app-events/getting-started-app-events-android/#auto-events )

hermitdemschoenenleben avatar Jul 04 '22 11:07 hermitdemschoenenleben