Closed tunp88 closed 5 years ago
The latest version is 4.20.0
Thanks. I checked with version 4.20.0 and got the same problem. I'm moving back to version 4.14.0 and it works as well.
Please share your project files on GitHub repository. Without valuable information, I can't check it
Sorry, It's our company project. I cannot share it here. But I could copy to you the stack trace:
Uncaught TypeError: Cannot read property 'indexOf' of undefined
at Marker.normalizeArgumentsOfEventListener (vendor.js:57856)
at Marker.
In my package.json, I use version 4.20.0: "@ionic-native/google-maps": "4.20.0",
This bug does not occur anymore when I move back to v4.14.0
I tried going to the lib code in node modules and update the if condition by adding checking undefined as below:
Then, it works as before.
Thank you for additional information, but important thing is that not source code position. That information is provided at first in your report.
I need to know how to reproduce the problem. It is depends on your code and cordova-plugin-googlemaps
version.
If you can't share your code, you can still create a new simple project.
I updated my note above. My cordova-plugin-googlemaps: "cordova-plugin-googlemaps": "^2.4.6",
npm install @ionic-native/google-maps@4.14.0 --save
in order to save in package.json
ping
Since nobody response for a while, I close this thread.
I had the same error where pgmId was undefined in normalizeArgumentsOfEventListener() I resolved the problem by removing the Cordova-plugin-googlemaps and reinstalling it. I believe the cause of the problem is that in version 2.5.0 of Cordova-plugin-googlemps changed the name of a variable from id to pgmId. Version 4.20.0 of Ionic-native-google-maps takes this into account. However, for reasons I don't understand, even though I had updated cordova-plugin-googlemaps to version 2.5.0, I found that the version of the cordova-plugin-googlemaps in the plugins folder had the old source code and so was still using the old variable name id. Hence removing and reinstalling the Cordova addin resolved the problem.
We are using v4.14.0 and the marker api works as well. However, when update to v4.15.0, the exception is showed: Cannot read property 'indexOf' of undefined at Marker.normalize Arguments EventListener
It seems that there is an issue at line 1356: _objectInstance.__pgmId in line 1356 in file ionic-native-google-maps/src/@ionic-native/plugins/google-maps/index.ts is undefined