mapsplugin / cordova-plugin-googlemaps

Google Maps plugin for Cordova
Apache License 2.0
1.66k stars 913 forks source link

Transparent map after unlocking #2835

Closed fgarcia5 closed 3 years ago

fgarcia5 commented 3 years ago

I'm submitting a ... (check one with "x")

OS: (check one with "x")

cordova information: (run $> cordova plugin list)

cordova-androidx-build 1.0.4 "cordova-androidx-build"
cordova-background-geolocation-lt 3.9.2 "BackgroundGeolocation"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-appavailability 0.4.2 "AppAvailability"
cordova-plugin-background-fetch 6.1.1 "CDVBackgroundFetch"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-googlemaps 2.8.0-20200709-2008 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 4.0.0 "InAppBrowser"
cordova-plugin-keyboard 1.2.0 "Keyboard"
cordova-plugin-splashscreen 5.0.4 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-sqlite-storage 5.0.1 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"

Clarification: I have implemented the "multiple-maps" branch because the master branch did not work.

Current behavior: Bug in locking/unlocking the device (Android), the map becomes transparent and appears only if I touch the screen.
Behavior detected in:

Expected behavior: The map view should retain its state

Screen capture or video record: Youtube video

Related code, data or error log (please format your code or data): Code taken from index.html "Hello word from Cordova CLI" Minimalist Cordova project to reproduce the bug: https://github.com/fgarcia5/cordova-example-googlemaps

wf9a5m75 commented 3 years ago

Please share the project files on github repository.

fgarcia5 commented 3 years ago

Please share the project files on github repository.

I have uploaded a minimalist version in which the bug occurs and updated the issue with this: https://github.com/fgarcia5/cordova-example-googlemaps

wf9a5m75 commented 3 years ago

I tried, but can not reproduce your issue.

wf9a5m75 commented 3 years ago

Work log

Last login: Wed Oct 14 07:29:41 on console
masashi@macbook-air ~ % cd Documents/workspace2 
masashi@macbook-air workspace2 % bash

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
bash-3.2$ ls
CapTest             svTestCap
capacitor-ios-project       svTestCordova
capacitor-plugin-example    test
react-capacitor-example
bash-3.2$ cd test/
bash-3.2$ ls
native-google-maps-issue-331
bash-3.2$ git clone https://github.com/fgarcia5/cordova-example-googlemaps
Cloning into 'cordova-example-googlemaps'...
remote: Enumerating objects: 12, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 12 (delta 1), reused 8 (delta 0), pack-reused 0
Unpacking objects: 100% (12/12), done.
bash-3.2$ cd cordova-example-googlemaps/
bash-3.2$ npm
bash-3.2$ vim config.xml 
bash-3.2$ npm i
npm WARN com.rma.googlemapstest@1.0.0 No repository field.

added 108 packages from 78 contributors and audited 108 packages in 2.72s

5 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

bash-3.2$ ls
README.md       node_modules        www
config.xml      package-lock.json
jsconfig.json       package.json
bash-3.2$ cordova platform add android
Using cordova-fetch for cordova-android@^9.0.0
Adding android project...
Creating Cordova project for the Android platform:
    Path: platforms/android
    Package: com.rma.googlemapstest
    Name: GoogleMaps_Test
    Activity: MainActivity
    Android target: android-29
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@9.0.0
[Gradle Properties] Detected Gradle property "android.useAndroidX" with the value of "true", Cordova's recommended value is "false"
[Gradle Properties] Detected Gradle property "android.enableJetifier" with the value of "true", Cordova's recommended value is "false"
Discovered plugin "cordova-plugin-whitelist". Adding it to the project
Installing "cordova-plugin-whitelist" for android
Adding cordova-plugin-whitelist to package.json
Discovered plugin "cordova-plugin-googlemaps". Adding it to the project
Installing "cordova-plugin-googlemaps" for android
Installing "cordova-androidx-build" for android
Subproject Path: CordovaLib
Subproject Path: app
Subproject Path: CordovaLib
Subproject Path: app

      Official document https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.6.0/README.md Please consider to buy a beer for us 🍺 https://github.com/mapsplugin/cordova-plugin-googlemaps#buy-us-a-beer

Adding cordova-plugin-googlemaps to package.json
[Gradle Properties] Detected Gradle property "android.useAndroidX" with the value of "true", Cordova's recommended value is "false"
[Gradle Properties] Detected Gradle property "android.enableJetifier" with the value of "true", Cordova's recommended value is "false"
bash-3.2$ ls
README.md       node_modules        platforms
config.xml      package-lock.json   plugins
jsconfig.json       package.json        www
bash-3.2$ cordova plugin list
cordova-androidx-build 1.0.4 "cordova-androidx-build"
cordova-plugin-googlemaps 2.8.0-20200709-2008 "cordova-plugin-googlemaps"
cordova-plugin-whitelist 1.3.4 "Whitelist"
bash-3.2$ cordova plugin 
bash-3.2$ cordova run android --device
[Gradle Properties] Detected Gradle property "android.useAndroidX" with the value of "true", Cordova's recommended value is "false"
[Gradle Properties] Detected Gradle property "android.enableJetifier" with the value of "true", Cordova's recommended value is "false"
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=/Users/masashi/Library/Android/sdk (recommended setting)
ANDROID_HOME=undefined (DEPRECATED)
Using Android SDK: /Users/masashi/Library/Android/sdk
Starting a Gradle Daemon (subsequent builds will be faster)

BUILD SUCCESSFUL in 6s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
Downloading https://services.gradle.org/distributions/gradle-6.5-all.zip
.............10%..............20%..............30%..............40%..............50%..............60%..............70%..............80%..............90%..............100%

Welcome to Gradle 6.5!

Here are the highlights of this release:
 - Experimental file-system watching
 - Improved version ordering
 - New samples

For more details see https://docs.gradle.org/6.5/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :app
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/PluginLocationService.jav
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/PluginPolyline.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/CordovaGoogleMaps.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/PluginMap.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/BitmapCache.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/PluginStreetViewPanorama.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/MyPlugin.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/PluginPolygon.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/PluginGeocoder.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/PluginMarkerCluster.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/PluginTileProvider.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/PluginElevationService.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/PluginCircle.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/PluginUtil.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/ObjectCache.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/PluginTileOverlay.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/PluginGroundOverlay.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/PluginMarker.java
 [changed] /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/src/main/java/plugin/google/maps/PluginDirectionsService.java
config.xml
../config.xml
../../config.xml
../../../config.xml
name = GOOGLE_MAPS_ANDROID_API_KEY
name = GOOGLE_MAPS_IOS_API_KEY

> Transform artifact maps-3.1.0-beta.aar (com.google.android.libraries.maps:maps:3.1.0-beta) with JetifyTransform
WARNING: [Processor] Library '/Users/masashi/.gradle/caches/modules-2/files-2.1/com.google.android.libraries.maps/maps/3.1.0-beta/78bbce6fcebb76eef9c0fb4dec218768961cf5d0/maps-3.1.0-beta.aar' contains references to both AndroidX and old support library. This seems like the library is partially migrated. Jetifier will try to rewrite the library anyway.
 Example of androidX reference: 'androidx/work/OneTimeWorkRequest'
 Example of support library reference: 'android/support/annotation/Nullable'

> Task :app:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :app:stripDebugDebugSymbols
WARNING: Compatible side by side NDK version was not found. Default is 21.0.6113669.
Compatible side by side NDK version was not found. Default is 21.0.6113669.
Unable to strip the following libraries, packaging them as they are: libgmm-jni.so, libtbxml.so.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 4m 34s
41 actionable tasks: 41 executed
Built the following apk(s): 
    /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/build/outputs/apk/debug/app-debug.apk
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=/Users/masashi/Library/Android/sdk (recommended setting)
ANDROID_HOME=undefined (DEPRECATED)
Using Android SDK: /Users/masashi/Library/Android/sdk
Using apk: /Users/masashi/Documents/workspace2/test/cordova-example-googlemaps/platforms/android/app/build/outputs/apk/debug/app-debug.apk
Package name: com.rma.googlemapstest
LAUNCH SUCCESS
bash-3.2$ 
wf9a5m75 commented 3 years ago

www.youtube.com/watch?v=mHCGmXHIKYQ

fgarcia5 commented 3 years ago

The bug occurs on some devices/versions of android. I have left two examples where it does occur

wf9a5m75 commented 3 years ago

Here is Google Pixel 3, but could not reproduce. https://www.youtube.com/watch?v=PlK3G8gMcPM

testapp.zip

wf9a5m75 commented 3 years ago

Strange thing in your video is the home wall paper is visible from the start. This is very strange.

As you may know, this plugin is used by tons of people, and nobody reported similar issue except you.

Screen Shot 2020-10-14 at 9 30 32 AM
wf9a5m75 commented 3 years ago

Please share your actual project files, not demo project files, to github repository. Otherwise, please debug it by yourself (testing with a fresh project, etc). I'm really really busy, these days.

fgarcia5 commented 3 years ago

I have implemented the plugin in a framework7 app and in the cordova App that I have shared. In both cases, when locking/unlocking the bug occurs. Both in the Pixel with Android 10 (API 29) and in the Samsung S8 + with Android 7.0,. From what I see, your tests are with a Pixel running Android 11 (not Android 10 as I have reported). I have also tried to debug the App but I did not find a thread to pull. Unfortunately, for the moment I will have to reject the use of the plugin. Anyway, thanks for your time and for the work done on the plugin. Greetings, Fabricio.