cordova-plugin-googlemaps: Map does not load on Android: Cannot read property 'insertAdjacentHTML' of null
I’m submitting a … (check one with “x”)
- question
- any problem or bug report
OS: (check one with “x”)
- Android
- iOS
- Browser
cordova information: (run $> cordova plugin list)
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-googlemaps 2.4.6 "cordova-plugin-googlemaps"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.1.4 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
If you use @ionic-native/google-maps, please tell the package.json (only @ionic-native/core and @ionic-native/google-maps are fine mostly)
@ionic-native/core : 4.15.0
@ionic-native/google-maps : 4.14.0
Current behavior:
map does not load
Expected behavior:
map should load
Related code, data or error log (please format your code or data):
Plugin fails on this line (https://github.com/mapsplugin/cordova-plugin-googlemaps/commit/bfb18137d08f050232854a162b6144e3eac2fd5e):
document.body.insertAdjacentHTML('afterbegin', envTestDiv);
TypeError: Cannot read property ‘insertAdjacentHTML’ of null
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (10 by maintainers)
hope It can help, I encountered this one and fixes it by moving <script src="cordova.js"></script> as the last js import.
@chadevans I already changed the code.
plugininit.jsexecutes afterdocument.bodyis ready.Ok, I wait someone.