I have an Ionic 2 beta 7 app (also happens in Beta 6) that uses the Google Maps JavaScript API.
If I click down on the map, drag it and "throw" the map before releasing the click, it causes this error to occur on the next attempt at dragging the map.
Here is the JavaScript stack trace
TypeError: Cannot read property 'ca' of null at .r.Kj (https://maps.googleapis.com/maps-api-v3/api/js/25/7/common.js:215:70) at Object..B.trigger (https://maps.googleapis.com/maps/api/js?key=MYKEY:93:119) at dy (https://maps.googleapis.com/maps-api-v3/api/js/25/7/common.js:164:140) at . (https://maps.googleapis.com/maps-api-v3/api/js/25/7/common.js:163:441) at Object._.B.trigger (https://maps.googleapis.com/maps/api/js?key=MYKEY:93:119) at .r.dl (https://maps.googleapis.com/maps-api-v3/api/js/25/7/common.js:228:350) at Kv..r.fm (https://maps.googleapis.com/maps-api-v3/api/js/25/7/common.js:195:106) at ZoneDelegate.invokeTask (http://localhost:8100/build/js/zone.js:356:38) at Zone.runTask (http://localhost:8100/build/js/zone.js:256:48) at ZoneTask.invoke (http://localhost:8100/build/js/zone.js:423:34)
Although it doesn't seem to cause any UI issues from a users point of view it would be good to know if there is a way to prevent this from happening?
Note
Dragging the map and releasing it when the mouse is static this error doesn't occur on the next drag.
Plunker Example
I've created a Plunker example which replicates the problem. Follow these steps:
Developer Tools
(F12)Update
Question stack trace and title have been updated to match what is caught in Ionic 2 beta 10
Track on GitHub
This issue has been raised on the ZoneJS GitHub page so you can track it here
Just to notify anyone who hasn't followed the issue on GitHub (the one I linked in this question) this error has now been fixed in version v0.16.7 of ZoneJS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With