capacitor-plugins
capacitor-plugins copied to clipboard
@capacitor/google-maps - map doesn't show
Bug Report
Plugin(s)
@Capacitor/google-maps
Capacitor Version
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 3.5.1 @capacitor/core: 3.5.1 @capacitor/android: 3.5.1 @capacitor/ios: 3.5.1
Installed Dependencies:
@capacitor/core: 3.5.1 @capacitor/cli: 3.5.1 @capacitor/android: 3.5.1 @capacitor/ios: 3.5.1
Platform(s)
iOS and Android, both on emulators and devices
Current Behavior
I want to display the map but all I have is a blank div. The map is displayed when I do ionic serve, and when I try to scroll in the div that is supposed to have the map, the scroll event is fired, but nothing is shown. I added the CUSTOM_ELEMENTS_SCHEMA like I saw in some other questions, and I updated the Map.swift in iOS but it didn't change anything. I know that my google API keys are working because I just created them for this project and the goog cloud platform shows that my API keys are called.
Expected Behavior
I expect to see the map, like I see it in the web version
Code Reproduction
Here is public repo. In this project I also have a test for notifications I implemented before the google maps so I know that it works, but I can remove it for the reproduction if it is necessary.
Thanks a lot !
Having the same issue ( although I must mention it only happens on android, and working fine on web and ios ), I'd like to append a log from logcat, maybe is of use. I'd also like to mention that I'm using a macbook M1 pro.
Unable to retrieve flag snapshot for com.google.android.libraries.consentverifier#com.myapp.id, using defaults. java.io.FileNotFoundException: /data/user/0/com.myapp.id/files/phenotype/shared/com.google.android.libraries.consentverifier#com.myapp.id.pb: open failed: ENOENT (No such file or directory) at libcore.io.IoBridge.open(IoBridge.java:575) at java.io.FileInputStream.<init>(FileInputStream.java:160) at zn.d(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at zi.d(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at aac.b(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):1) at aab.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):1) at zf.b(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):0) at xf.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):3) at xk.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at yj.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):14) at avn.d(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):0) at fw.c(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):26) at fv.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):71) at fv.b(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):0) at iv.c(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):1) at im.e(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):1) at jn.t(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at jn.u(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):1) at jn.e(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at jr.handleMessage(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):69) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.os.HandlerThread.run(HandlerThread.java:67) Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory) at libcore.io.Linux.open(Native Method) at libcore.io.ForwardingOs.open(ForwardingOs.java:567) at libcore.io.BlockGuardOs.open(BlockGuardOs.java:273) at libcore.io.ForwardingOs.open(ForwardingOs.java:567) at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7756) at libcore.io.IoBridge.open(IoBridge.java:561) at java.io.FileInputStream.<init>(FileInputStream.java:160) at zn.d(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at zi.d(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at aac.b(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):1) at aab.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):1) at zf.b(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):0) at xf.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):3) at xk.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at yj.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):14) at avn.d(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):0) at fw.c(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):26) at fv.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):71) at fv.b(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):0) at iv.c(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):1) at im.e(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):1) at jn.t(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at jn.u(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):1) at jn.e(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at jr.handleMessage(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):69) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.os.HandlerThread.run(HandlerThread.java:67) 2022-06-21 12:17:24.754 25731-26010/com.myapp.id W/MobStoreFlagStore: Unable to update local snapshot for com.google.android.libraries.consentverifier#com.myapp.id, may result in stale flags. java.util.concurrent.ExecutionException: java.lang.SecurityException: GoogleCertificatesRslt: not allowed: pkg=com.myapp.id, sha256=[91ed23e216bfaa48e4d6736c330e252e456e60f573134d2dcced502b9830d345], atk=false, ver=221820044.true (go/gsrlt) at ahi.s(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):3) at ahi.get(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at ais.g(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at xk.d(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):1) at xm.run(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):0) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:920) Caused by: java.lang.SecurityException: GoogleCertificatesRslt: not allowed: pkg=com.myapp.id, sha256=[91ed23e216bfaa48e4d6736c330e252e456e60f573134d2dcced502b9830d345], atk=false, ver=221820044.true (go/gsrlt) at android.os.Parcel.createExceptionOrNull(Parcel.java:2426) at android.os.Parcel.createException(Parcel.java:2410) at android.os.Parcel.readException(Parcel.java:2393) at android.os.Parcel.readException(Parcel.java:2335) at ei.ba(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at ra.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):4) at io.e(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at jn.t(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at jn.u(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):3) at jn.e(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):2) at jr.handleMessage(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (190400-0):69) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.os.HandlerThread.run(HandlerThread.java:67)
I have the same issue!
Looks like there is an issue with Google Maps SDK itself! https://issuetracker.google.com/issues/228091313
Same issue
Same issue
Same issue
any updates on this one???
java.util.concurrent.ExecutionException: java.lang.SecurityException: GoogleCertificatesRslt: not allowed: pkg=com.example.app,
This bug is present since June 17th and its almost 2023 and still NO FIX. I have been forced to revert back to AGM Core maps just to get our apps running. Imagine how many thousands of developers around the world are installing the latest "@capacitor/google-maps": "^4.3.0" and spend hours debugging it just to find out there is an unfixed bug since JUNE 17th!
Same problem here using capacitor 4. Is there any update on this?
Same problem here using capacitor 4. Is there any update on this?
I suggest developer not to use capacitor/ionic anymore. Bad support, bad performance and not even a stable approach to develop a stable app
After some investigation, I think the best idea is migrate to @angular/google-maps
I've updated the provided test app to Capacitor 4 and then to Capacitor 5 and to the latest version of @capacitor/google-maps and the map is showing on iOS. On Android it's working after adding this to the variables.css
ion-content {
--background: transparent;
}
body {
background: transparent;
}
it's documented that making things transparent is a requirement for android https://capacitorjs.com/docs/apis/google-maps#usage
In my personal case, setting background as transparent didn't solve the issue. With @angular/google-maps is working without problems.
As I said, I tested on the provided test app. In other apps there might be other issues. If somebody faces the same issue on Capacitor 5 and version 5 of google maps plugin, please, report a new issue and provide a sample app.