baumblatt / capacitor-firebase-auth

Capacitor Firebase Authentication Plugin
MIT License
261 stars 129 forks source link

Facebook-related crash without using facebook #174

Open hermitdemschoenenleben opened 3 years ago

hermitdemschoenenleben commented 3 years ago

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?

Darrow8 commented 2 years ago

Any updates on this issue?

hermitdemschoenenleben commented 2 years ago

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 )