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]: @capacitor/google-maps "Error calling method create on plugin CapacitorGoogleMaps: No method found." on iOS #7503

Closed
1 of 3 tasks
frederikheld opened this issue Jun 5, 2024 · 11 comments
Labels
needs reproduction needs reproducible example to illustrate the issue

Comments

@frederikheld
Copy link

frederikheld commented Jun 5, 2024

Capacitor Version

💊 Capacitor Doctor 💊

Latest Dependencies:

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

Installed Dependencies:

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

Other API Details

% npm --version
10.5.0
% node --version
v20.11.0
% pod --version
1.15.2

I'm using @capacitor/google-maps@6.0.0-rc.0 because the @latest version won't install without --legacy-peer-deps.

EDIT: I tried it with @latest which is 5.4.1 and got the same issue.

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

When running the app from Xcode on a physical iPhone or in the emultator, I get the following error:

⚡️  To Native ->  CapacitorGoogleMaps create 6519669
⚡️  Error calling method create on plugin CapacitorGoogleMaps: No method found.
⚡️  Ensure plugin method exists and uses @objc in its declaration, and has been defined

The <capacitor-google-map> element stays empty.

The same setup works well on Android.

Expected Behavior

No error, map renders

Project Reproduction

//

Additional Information

No response

@frederikheld
Copy link
Author

I was able to pin the error down to the await GoogleMap.create({ }) function. All lines after that function won't be executed.

@jcesarmobile jcesarmobile added the needs reproduction needs reproducible example to illustrate the issue label Jun 10, 2024
Copy link

ionitron-bot bot commented Jun 10, 2024

This issue needs more information before it can be addressed. In particular, the reporter needs to provide a minimal sample app that demonstrates the issue. If no sample app is provided within 15 days, the issue will be closed.
Please see the Contributing Guide for how to create a Sample App.
Thanks! Ionitron 💙

@ionitron-bot ionitron-bot bot removed the triage label Jun 10, 2024
@Ionitron Ionitron added needs reply needs reply from the user and removed needs reply needs reply from the user labels Jun 10, 2024
@jcesarmobile jcesarmobile added the needs reply needs reply from the user label Jun 10, 2024
@Ionitron Ionitron removed the needs reply needs reply from the user label Jun 15, 2024
@jcesarmobile
Copy link
Member

jcesarmobile commented Jun 17, 2024

This issue is about iOS, if you are having an issue on Android then it's a different problem, please, create a new issue on https://github.com/ionic-team/capacitor-google-maps/issues

BTW, your API key is visible through git history, I would suggest you to invalidate it.

@jcesarmobile jcesarmobile added the needs reply needs reply from the user label Jun 17, 2024
@frederikheld
Copy link
Author

Thanks for the reply. I moved away from Google Maps to an OSM based solution. After trying 3 different GM-based approaches I learned that Google is just too incompetent to create a performant solution. I had to do the whole native stuff only because the JS SDK doesn't perform well with many markers added. The OSM SDK just renders them with less issues than anything I encountered with Google Maps. Sometimes I wonder how Google is still such a big company because so often they don't care to deliver decent SDKs :-(

Where do you see my API key?

@Ionitron Ionitron removed the needs reply needs reply from the user label Jun 18, 2024
@jcesarmobile
Copy link
Member

There was a comment from an user having a different problem on Android and they provided a sample app with their API key on it, my comment was addressed to them, but they have removed the comment from here.

You must have seen it since you added a reaction to it before it was deleted.

They have reported the issue on https://github.com/ionic-team/capacitor-google-maps/issues, but then they closed it because they found out they were putting the API key in the wrong place.

Since you have moved away from Google Maps I guess you won't be providing a sample app for the issue, so I'm going to close.
If you are still interested in providing a sample app, please, create a new issue with the sample app in the google maps plugin repository
https://github.com/ionic-team/capacitor-google-maps/issues

@jcesarmobile jcesarmobile closed this as not planned Won't fix, can't repro, duplicate, stale Jun 19, 2024
@juanpe1103
Copy link

Hello! I have the same problem. Can you give me your solution please?
Thanks
@frederikheld

@frederikheld
Copy link
Author

frederikheld commented Jun 24, 2024

My solution was to move away from every plugin that is related to Google Maps. Not only do the plugins have a lot of bugs, the underlying Google SDK is shit. Google does not seem to care for performance.

I moved to MapTiler and the beauty of this solution is that the Web SDK is performant enough to work inside the Android/iOS WebView. So I don't need to fiddle around with solutions that put native elements behind my WebView, each with it's own bugs and quirks. This saves me a lot of headache because now I can implement the map once and it actually works everywhere.

@juanpe1103
Copy link

Thanks a lot for the response! I already finish my app so this is a not a solution for me.
Nice to meet you!

@frederikheld
Copy link
Author

Fingers crossed that you get it working ;-) It took me several weeks to find a proper maps solution but rendering several hundred pins on a map is the major feature of my app, so I had to find something that works. It's still difficult, but r/n the bottleneck is not the map but the data handling behind it, which is a huge improvement :-D Nice to meet you too :-)

@juanpe1103
Copy link

I wish u luck!

Copy link

ionitron-bot bot commented Jul 24, 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 Capacitor, 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 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs reproduction needs reproducible example to illustrate the issue
Projects
None yet
Development

No branches or pull requests

4 participants