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

@capacitor/google-maps throwing error "Plugin failed to load" during start-up #18

Closed
shipley-dcc opened this issue Jun 17, 2024 · 2 comments
Labels

Comments

@shipley-dcc
Copy link

Bug Report

Plugin(s)

@capacitor/google-maps@5.4.1 and @6.0.0-rc.0

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

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

Installed Dependencies:

  @capacitor/ios: not installed
  @capacitor/android: 6.1.0
  @capacitor/core: 6.1.0
  @capacitor/cli: 6.1.0

[success] Android looking great! 👌

Platform(s)

Android

Current Behavior

When starting the app on Android I get the following error stopping the Google Maps plugin from working:

NativePlugin com.capacitorjs.plugins.googlemaps.CapacitorGoogleMapsPlugin failed to load com.getcapacitor.PluginLoadException: Unable to load plugin instance. Ensure plugin is publicly accessible
at com.getcapacitor.PluginHandle.load(PluginHandle.java:107)
at com.getcapacitor.PluginHandle.<init>(PluginHandle.java:65)
at com.getcapacitor.Bridge.registerPlugin(Bridge.java:684)
at com.getcapacitor.Bridge.registerAllPlugins(Bridge.java:640)
at com.getcapacitor.Bridge.<init>(Bridge.java:221)
at com.getcapacitor.Bridge.<init>(Unknown Source:0)
at com.getcapacitor.Bridge$Builder.create(Bridge.java:1559)
at com.getcapacitor.BridgeActivity.load(BridgeActivity.java:48)
at com.getcapacitor.BridgeActivity.onCreate(BridgeActivity.java:42)
at android.app.Activity.performCreate(Activity.java:8305)
at android.app.Activity.performCreate(Activity.java:8284)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1418)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3627)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3783)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7932)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:942)

Expected Behavior

No error and the Google Maps plugin loads as normal

Code Reproduction

Maps Sample App
(FYI - You'll need to add a valid Google Maps API key in the AndroidManifest.xml and the two environment files. Just search for <-- INSERT MAPS API KEY HERE -->)

Other Technical Details

IDE: VS Code 1.90.1 and Android Studio Jellyfish 2023.3.1 Patch 1
OS: Ubuntu 22.04.4 LTS 64-bit
Node v20.12.2
NPM 10.8.1

Additional Context

None

@ionitron-bot ionitron-bot bot added the triage label Jun 17, 2024
@shipley-dcc
Copy link
Author

I had the api key outside the application tag in the manifest.

Copy link

ionitron-bot bot commented Jul 4, 2024

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jul 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant