oauthjs / angular-oauth2

AngularJS OAuth2
MIT License
595 stars 187 forks source link

Object doesn't support property or method 'headers' #111

Open dlecina opened 7 years ago

dlecina commented 7 years ago

Hello,

We are getting the following error in our project:

TypeError: Object doesn't support property or method 'headers'
   at responseError (ms-appx://42cbe9b5-feba-4973-882c-ba8d8fc0c427/js/core/angular-oauth2.js:31:17)
   at Anonymous function (ms-appx://42cbe9b5-feba-4973-882c-ba8d8fc0c427/js/core/angular.min.js:131:10)
   at m.prototype.$eval (ms-appx://42cbe9b5-feba-4973-882c-ba8d8fc0c427/js/core/angular.min.js:145:336)
   at m.prototype.$digest (ms-appx://42cbe9b5-feba-4973-882c-ba8d8fc0c427/js/core/angular.min.js:142:412)
   at m.prototype.$apply (ms-appx://42cbe9b5-feba-4973-882c-ba8d8fc0c427/js/core/angular.min.js:146:111)
   at l (ms-appx://42cbe9b5-feba-4973-882c-ba8d8fc0c427/js/core/angular.min.js:97:320)
   at J (ms-appx://42cbe9b5-feba-4973-882c-ba8d8fc0c427/js/core/angular.min.js:102:34)
   at t.onload (ms-appx://42cbe9b5-feba-4973-882c-ba8d8fc0c427/js/core/angular.min.js:103:4)

Debugging reveals this is indeed the case:

image

This only seems to happen some of the time, but I cannot seem to reproduce the success case consistently.

Any ideas?

ruipenso commented 7 years ago

Will need more details. Is this a browser related issue?

dlecina commented 7 years ago

This is a WinJS app. I did some digging and this might be caused by using GET on a local resource, which we sometimes do, but I have not had the chance to confirm yet.