Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: FirebaseAuthenticationPlugin - Unable to load plugin instance. Ensure plugin is publicly accessible #797

Closed
5 of 17 tasks
petargrgic97 opened this issue Jan 16, 2025 · 6 comments

Comments

@petargrgic97
Copy link

Plugin(s)

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

Version

6.2.0

Platform(s)

  • Android
  • iOS
  • Web

Current behavior

Hi, Im just trying to implement Firebase Auth with Google, but after adding Firebase to project, when syncing with Capacitor and opening the Android Studio project i am getting:

NativePlugin io.capawesome.capacitorjs.plugins.firebase.authentication.FirebaseAuthenticationPlugin failed to load
com.getcapacitor.PluginLoadException: Unable to load plugin instance. Ensure plugin is publicly accessible

I see it in capacitor.settings.gradle:

include ':capacitor-firebase-authentication'
project(':capacitor-firebase-authentication').projectDir = new File('../node_modules/@capacitor-firebase/authentication/android')

Expected behavior

I would like the native Android code to recognize the plugin.

Reproduction

https://github.com/capawesome-team/.capacitor-app

Steps to reproduce

Sorry I didnt have time to make repro right now, but if needed I will provide it in a few days.

Other information

No response

Capacitor doctor

Latest Dependencies:

@capacitor/cli: 6.2.0
@capacitor/core: 6.2.0
@capacitor/android: 6.2.0
@capacitor/ios: 6.2.0

Installed Dependencies:

@capacitor/cli: 6.2.0
@capacitor/core: 6.2.0
@capacitor/android: 6.2.0
@capacitor/ios: 6.2.0

[success] iOS looking great! 👌
[error] index.html file is missing in
/Users/grga/Desktop/influencer/influencer-mobile/android/app/src/main/assets/public

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.
@petargrgic97 petargrgic97 added bug/fix Something isn't working needs: triage labels Jan 16, 2025
@petargrgic97 petargrgic97 changed the title bug: bug: FirebaseAuthenticationPlugin - Unable to load plugin instance. Ensure plugin is publicly accessible Jan 16, 2025
@robingenz
Copy link
Member

Unfortunately, I need a minimal, reproducible example to debug this issue.

Copy link
Contributor

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.

@petargrgic97
Copy link
Author

Hi @robingenz, here is the reproduction repository: Capacitor firebase repro

When clicking Sign in -> Sign in with Google, there is this error appearing both on device, and in Android Studio logs.

@robingenz
Copy link
Member

You're example does not seem to work:

npm run build      

> [email protected] build
> vite build

sh: vite: command not found

The build command already fails.

@petargrgic97
Copy link
Author

@robingenz , i forgot to remove the vite build, but it doesnt matter, because I am using remote url for server host in capacitor.config.json

The app points to a hosted PWA, I just forgot to remove vite setup from default example

@robingenz
Copy link
Member

The server.url configuration option is not intended for production use (see Capacitor Configuration). Since you do not have a local web build, I get the following error message when syncing:

✖ update android - failed!
[error] Error: ENOENT: no such file or directory, open
        '/Users/robingenz/Documents/GitHub/tmp/petargrgic97/capacitor-firebase-repro/android/app/src/main/assets/capacitor.plugins.json'

As my time is very limited, I can unfortunately only offer support for the "proper use" of Capacitor. Therefore I am closing this issue. I recommend that you use Live Updates instead. They allow you to deliver updates in real time and are officially supported.

@robingenz robingenz closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants