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

MissingPluginException(No implementation found for method getInstalledMaps on channel map_launcher) #182

Open
keithyeohh opened this issue Aug 1, 2024 · 13 comments

Comments

@keithyeohh
Copy link

keithyeohh commented Aug 1, 2024

I am getting the error as per title in

  • iOS 18.0 (actual device),
  • iOS 17.0 (simulator)

Working fine in

  • Android simulator (Pixel_8_Pro_API_VanillaIceCream)

Added the following to Info.plist
image

And this is my source code
image
image

It basically failed to read the function .installedMaps

@mattermoran
Copy link
Owner

That seems like something that would happen if you installed the plugin into already running app because it has the dart part but not native one.
Could you try restarting the app and also try flutter clean to be sure.
Let me know if you still have that issue after that

@keithyeohh
Copy link
Author

keithyeohh commented Aug 1, 2024

Hey @mattermoran , yup that is what I google-ed and found too. Unfortunately, the issue persists still.

I tried to re-build the app from following methods, none works.

  1. flutter run --flavor {app-scheme}
  2. build it directly from Xcode

I even tried to uninstall the app, and reinstall, no joy too :(

Also, tried to run in verbose mode, same output
image

image

@mattermoran
Copy link
Owner

Could you try to clone the repo and run the included example app to see it works?

@keithyeohh
Copy link
Author

@mattermoran yup, I've tested the example app and it is working correctly on my simulator. Hence I wonder which part of my project not installing the package correctly.

@mattermoran
Copy link
Owner

It's very strange because there should be nothing special.
One thing I'd recommend to try is to create a brand new flutter app and install the plugin same way you done and see if there's any difference

@mattermoran
Copy link
Owner

I'll be closing this issue as I don't think it's an issue with this plugin.

@mattermoran mattermoran closed this as not planned Won't fix, can't repro, duplicate, stale Sep 29, 2024
@emyller
Copy link

emyller commented Dec 15, 2024

I am facing this issue right now, and it's blocking a release.

Many things have happened lately with platform updates mostly from Android side, with the advent of new permissions and foldable devices. I also had to upgrade many other libs and I'm even considering reassembling the entire app on top of a new Flutter (blank) application — which would take the team several days, but it's been weeks of fixing stuff so far already.

Forgive me the rant. Let me know if I can help debugging this, as it may affect applications transitioning between platform versions. I suspect of something at the Gradle layer, but I'm no expert.

@emyller
Copy link

emyller commented Dec 15, 2024

I suspect of something at the Gradle layer, but I'm no expert.

I say that because map_launcher works as expected when in debug mode.
3.5.0, just reinstalled and ran fresh tests.

@mattermoran
Copy link
Owner

@emyller does it work on a freshly created flutter project? I would be happy to help out but without being able to reproduce I have no way of understanding what's going on.

@emyller
Copy link

emyller commented Dec 29, 2024

@mattermoran It took us a few days — as mentioned above — to reassemble the entire app on top of a new flutter create project. The plugin works now.

I don't know what could have changed yet, but it's certainly not our own code. I will soon check out the delta for anything relevant. For now we really need to unblock releasing. Thank you for being around, hopefully I'll be able to provide helpful intel soon.

@emyller
Copy link

emyller commented Dec 29, 2024

The issue happens as soon as one enables shrinking when in release mode. This explains why the plugin only works in debug mode.

@mattermoran I believe there must be some rule to add to android/app/proguard-rules.pro, but I lack understanding of how this works. For now I will disable shrinking which I suppose is acceptable by Google for production.

@emyller
Copy link

emyller commented Dec 29, 2024

I read and experimented a bit further. In order to fix this issue right now, the developer must add the following to their android/app/proguard-rules.pro (or whatever is specified in proguardFiles) file:

-keep class com.alexmiller.map_launcher.** { *; }  # https://pub.dev/packages/map_launcher

Now I am not sure if the library is able to include its own ProGuard-rules file, or if this just has to be added to the documentation. I am sorry I can't find time right now to learn more and send a patch — though I might sometime soon.

Happy New Year!

@mattermoran
Copy link
Owner

Thanks for the investigation. It explains why the plugin was being stripped out.
I'll check what needs to be added on the plugin side for it to be kept around or update readme.

@mattermoran mattermoran reopened this Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants