Skip to content
This repository was archived by the owner on Nov 30, 2018. It is now read-only.

With angular 1.4.9: TypeError: Cannot read property 'exp' of undefined #1728

Closed
kheaactua opened this issue Feb 6, 2016 · 6 comments
Closed

Comments

@kheaactua
Copy link

With Angular 1.4.9, I'm getting the error:

TypeError: Cannot read property 'exp' of undefined
    at angular-google-maps.js:6874
    at m.$digest (angular.js:16664)
    at angular.js:16859
    at e (angular.js:5804)
    at angular.js:6081

I load the maps with:

.config(['$routeProvider', 'uiGmapGoogleMapApiProvider',
  function($routeProvider, uiGmapGoogleMapApiProvider) {
     // ...
        uiGmapGoogleMapApiProvider.configure({
            //    key: 'your api key',
            v: '3.20', //defaults to latest 3.X anyhow
            libraries: 'weather,geometry,visualization'
        });
  }])

Then in my controller I have:

$scope.map = { 'center': { 'latitude': 45, 'longitude': 73 }, 'zoom': 15 };
uiGmapGoogleMapApi.then(function(maps) { });

And in my view I have:

<ui-gmap-google-map center="map.center" zoom="map.zoom" options="map.options"></ui-gmap-google-map>

Pretty basic. Google shows me similar issues with other libs that are based on version discrepancies. My bower file has:

  "dependencies": {
    "lovefield": "^2.1.6",
    "jQuery": "1.12.0",
    "angular-route": "^1.4.9",
    "angular-moment": "^0.10.3",
    "moment": "^2.11.1",
    "d3": "^3.5.14",
    "angular-simple-logger": "^0.1.7",
    "angular-google-maps": "^2.3.1",
    "angular": "^1.4.9",
    "bootstrap": "^3.3.6",
    "nouislider": "^8.2.1",
    "reset-css": "^2.0.2011012603"
  }

With Angular ^1.2, this problem doesn't occur. Is there a way to get this working with Angular 1.4.9?

@R0bson
Copy link

R0bson commented Feb 7, 2016

Similar problem with Angular 1.5.0 also in $digest cycle.

Working example with angular 1.5.0-rc.2 (tested with previous versions down to 1.4.7 - including mentioned before 1.4.9) - http://plnkr.co/edit/ZZIGVW63DpeAXGX0wuvP?p=preview
Broken example with angular 1.5.0 http://plnkr.co/edit/yxnvA4IelHHC8VuJg7K5?p=preview
In broken example map and marker show up, but the marker doesn't respond to clicking on map anymore.

Error for map:

TypeError: Cannot read property 'exp' of undefined
    at angular-google-maps.js:6911
    at Scope.$digest (angular.js:16664)
    at angular.js:16859
    at completeOutstandingRequest (angular.js:5804)
    at angular.js:6081

Error for marker (placing and relocating on click)

TypeError: Cannot read property 'exp' of undefined
    at setIfChange (angular-google-maps.js:1990)
    at Scope.$digest (angular.js:16664)
    at angular.js:16859
    at completeOutstandingRequest (angular.js:5804)
    at angular.js:6081

Angular 1.5.0 changelog from last RC

@katagaStyle
Copy link

Same issue here with angular 1.5.

@robost
Copy link

robost commented Feb 8, 2016

I'm also experiencing this issue. Angular 1.5, Angular Google Maps 2.3.1.

@red2678
Copy link

red2678 commented Feb 10, 2016

Same here

@bogusugob
Copy link

Angular 1.5, Angular Google Maps 2.3.1
+1

@angular-ui angular-ui locked and limited conversation to collaborators Feb 10, 2016
@nmccready
Copy link
Contributor

Looking into it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants