capawesome-team / capacitor-firebase

⚡️ Firebase plugins for Capacitor. Supports Android, iOS and the Web.

Home Page:https://capawesome.io/plugins/firebase/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug: R8 Missing Class

boldtrn opened this issue · comments

Plugin(s)

  • Analytics
  • App
  • App Check
  • Authentication
  • Crashlytics
  • Cloud Firestore
  • Cloud Messaging
  • Cloud Storage
  • Performance
  • Remote Config

Version

latest

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

If you don't include the facebook SDK but run ./gradlew :app:minifyReleaseWithR8 in your app, you get the following error:

ERROR: R8: Missing class com.facebook.CallbackManager$Factory (referenced from: void io.capawesome.capacitorjs.plugins.firebase.authentication.handlers.FacebookAuthProviderHandler.<init>(io.capawesome.capacitorjs.plugins.firebase.authentication.FirebaseAuthentication))
Missing class com.facebook.CallbackManager (referenced from: com.facebook.CallbackManager io.capawesome.capacitorjs.plugins.firebase.authentication.handlers.FacebookAuthProviderHandler.mCallbackManager and 2 other contexts)
Missing class com.facebook.FacebookCallback (referenced from: void io.capawesome.capacitorjs.plugins.firebase.authentication.handlers.FacebookAuthProviderHandler.<init>(io.capawesome.capacitorjs.plugins.firebase.authentication.FirebaseAuthentication) and 1 other context)
Missing class com.facebook.login.LoginManager (referenced from: void io.capawesome.capacitorjs.plugins.firebase.authentication.handlers.FacebookAuthProviderHandler.signOut())
Missing class com.facebook.login.widget.LoginButton (referenced from: com.facebook.login.widget.LoginButton io.capawesome.capacitorjs.plugins.firebase.authentication.handlers.FacebookAuthProviderHandler.loginButton and 4 other contexts)

Expected behavior

No error, as it is fine that these classes don't exist.

Reproduction

Sorry :( - but I guess this should be pretty obvious

Steps to reproduce

I porpose to create a progruad-rules.pro that contains something like:

-dontwarn com.facebook.**

Other information

No response

Capacitor doctor

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 5.6.0
@capacitor/core: 5.6.0
@capacitor/android: 5.6.0

Installed Dependencies:

@capacitor/core: 5.6.0
@capacitor/android: 5.6.0
@capacitor/cli: 5.6.0

Before submitting

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.

This issue has been labeled as needs: reproduction. This label is added to issues that need a code reproduction.

Please provide a Minimal, Reproducible Example using this template in a public GitHub repository so we can debug the issue.

If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for us to reproduce the issue.