Invalid directive "uiSrefActiveEq" found.
Open
bealtine
opened this issue 11 years ago
•
16 comments
Latest version of chrome throws this error (42.0.2311.90 m)
Invalid directive "uiSrefActiveEq" found. Make sure all registered directives return a "Directive Definition Object"
Everything seems to work as expected though...
Has anybody else seen this?
seeing it in Chrome Version 41.0.2272.118 (64-bit Ubuntu) as well since today.
I got some angular dependency issues as well without any code changes. Hopefully it's a chrome bug only.
Error: [$injector:itkn] Incorrect injection token! Expected service name as string, got function (...)
Some more info...
Error: [$injector:itkn] Incorrect injection token! Expected service name as string, got function $StateRefDirective($state, $timeout)
http://errors.angularjs.org/1.3.15/$injector/itkn?p0=function%20%24StateRefDirective(%24state%2C%20%24timeout)
at REGEX_STRING_REGEXP (angular.js:63)
at Object.invoke (angular.js:4188)
at angular.js:6524
at forEach (angular.js:323)
at Object. (angular.js:6522)
at Object.invoke (angular.js:4203)
at Object.enforcedReturnValue as $get
at Object.invoke (angular.js:4203)
at angular.js:4021
at Object.getService as get (anonymous function) @ angular.js:11655$get @ angular.js:8596(anonymous function) @ angular.js:6540forEach @ angular.js:323(anonymous function) @ angular.js:6522invoke @ angular.js:4203enforcedReturnValue @ angular.js:4056invoke @ angular.js:4203(anonymous function) @ angular.js:4021getService @ angular.js:4162directiveIsMultiElement @ angular.js:7855collectDirectives @ angular.js:7187compileNodes @ angular.js:7035compile @ angular.js:6946applyDirectivesToNode @ angular.js:7425compileNodes @ angular.js:7039compile @ angular.js:6946applyDirectivesToNode @ angular.js:7425compileNodes @ angular.js:7039compileNodes @ angular.js:7051compile @ angular.js:6946ngIncludeFillContentDirective.link @ angular.js:22402invokeLinkFn @ angular.js:8258nodeLinkFn @ angular.js:7768compositeLinkFn @ angular.js:7117publicLinkFn @ angular.js:6996$get.boundTranscludeFn @ angular.js:7135controllersBoundTransclude @ angular.js:7795(anonymous function) @ angular.js:22350processQueue @ angular.js:13248(anonymous function) @ angular.js:13264$get.Scope.$eval @ angular.js:14466$get.Scope.$digest @ angular.js:14282$get.Scope.$apply @ angular.js:14571done @ angular.js:9698completeRequest @ angular.js:9888requestLoaded @ angular.js:9829
angular.js:11655 Error: [$injector:itkn] Incorrect injection token! Expected service name as string, got function ()
http://errors.angularjs.org/1.3.15/$injector/itkn?p0=function%20()
at REGEX_STRING_REGEXP (angular.js:63)
at Object.invoke (angular.js:4188)
at angular.js:6524
at forEach (angular.js:323)
at Object. (angular.js:6522)
at Object.invoke (angular.js:4203)
at Object.enforcedReturnValue as $get
at Object.invoke (angular.js:4203)
at angular.js:4021
at Object.getService as get (anonymous function) @ angular.js:11655$get @ angular.js:8596(anonymous function) @ angular.js:6540forEach @ angular.js:323(anonymous function) @ angular.js:6522invoke @ angular.js:4203enforcedReturnValue @ angular.js:4056invoke @ angular.js:4203(anonymous function) @ angular.js:4021getService @ angular.js:4162addDirective @ angular.js:7826collectDirectives @ angular.js:7164compileNodes @ angular.js:7035compile @ angular.js:6946applyDirectivesToNode @ angular.js:7425compileNodes @ angular.js:7039compileNodes @ angular.js:7051compile @ angular.js:6946ngIncludeFillContentDirective.link @ angular.js:22402invokeLinkFn @ angular.js:8258nodeLinkFn @ angular.js:7768compositeLinkFn @ angular.js:7117publicLinkFn @ angular.js:6996$get.boundTranscludeFn @ angular.js:7135controllersBoundTransclude @ angular.js:7795(anonymous function) @ angular.js:22350processQueue @ angular.js:13248(anonymous function) @ angular.js:13264$get.Scope.$eval @ angular.js:14466$get.Scope.$digest @ angular.js:14282$get.Scope.$apply @ angular.js:14571done @ angular.js:9698completeRequest @ angular.js:9888requestLoaded @ angular.js:9829
angular.js:11655 Error: [$injector:itkn] Incorrect injection token! Expected service name as string, got function ()
http://errors.angularjs.org/1.3.15/$injector/itkn?p0=function%20()
at REGEX_STRING_REGEXP (angular.js:63)
at Object.invoke (angular.js:4188)
at angular.js:6524
at forEach (angular.js:323)
at Object. (angular.js:6522)
at Object.invoke (angular.js:4203)
at Object.enforcedReturnValue as $get
at Object.invoke (angular.js:4203)
at angular.js:4021
at Object.getService as get (anonymous function) @ angular.js:11655$get @ angular.js:8596(anonymous function) @ angular.js:6540forEach @ angular.js:323(anonymous function) @ angular.js:6522invoke @ angular.js:4203enforcedReturnValue @ angular.js:4056invoke @ angular.js:4203(anonymous function) @ angular.js:4021getService @ angular.js:4162addDirective @ angular.js:7826collectDirectives @ angular.js:7217(anonymous function) @ angular.js:7947processQueue @ angular.js:13248(anonymous function) @ angular.js:13264$get.Scope.$eval @ angular.js:14466$get.Scope.$digest @ angular.js:14282$get.Scope.$apply @ angular.js:14571done @ angular.js:9698completeRequest @ angular.js:9888requestLoaded @ angular.js:9829
angular.js:11655 Error: [$injector:itkn] Incorrect injection token! Expected service name as string, got function ()
http://errors.angularjs.org/1.3.15/$injector/itkn?p0=function%20()
at REGEX_STRING_REGEXP (angular.js:63)
at Object.invoke (angular.js:4188)
at angular.js:6524
at forEach (angular.js:323)
at Object. (angular.js:6522)
at Object.invoke (angular.js:4203)
at Object.enforcedReturnValue as $get
at Object.invoke (angular.js:4203)
at angular.js:4021
at Object.getService as get
Marcel
Thanks for confirming...I was searching high and low for my error:)
The question is what now?
Me too ;)
It works fine in other browsers and other chrome versions. I sent a bug report via chrome.
Would you mind opening an issue at chrome bug tracker? They are the ones to fix this.
I would but I'm still waiting for acknowledgement of an issue I opened 18 months ago...
has to be a better way
I updated from 0.2.8 to 0.2.13 today and started noticing this error. I can't imagine it is a coincidence that you guys are seeing this issue on the exact same day. Is this related to Chrome? I hadn't tested in other browsers but figured I may have to downgrade in order to avoid seeing this issue. The weird thing for me is that it seems to be a race condition as it doesn't show up every time.
EDIT:
My Chrome version is: Version 41.0.2272.118 m (which I'm noticing is different than what you initially reported.. maybe this is affecting multiple versions of Chrome?).. The error also has seemed to disappear at least for the last 10-15 times I've refreshed my page. Seems quite sporadic
Well Marcel sees it on that version...
How much of angular-ui-router does this effect? Does this mean all sites with angular-ui-router are going to break?
I checked another of my published projects, which is unchanged since a year. And I get the same errors, but seems to work fine. So, yes, I guess many/all sites using angular-ui-router throw that error in some chrome versions.
Marcel
Same here ran up some old projects to check them.
All work fine in older chrome versions and all other browsers (IE,FF)
So it seems conclusive to me that it's very recent versions of Chrome
I'm also having the exact same issue.
This seems to only be affecting those directives that are loaded before my application is bootstrapped.
In the interest of trying to further isolate this issue my project is using AngularAMD and my directives that are lazy loaded seem to be working fine. I am also running on an older version of Angular 1.2.6.
Can anyone confirm this that this issue is only affecting custom directives that are loaded before the application is bootstrapped?
UPDATE:
Adding to this again, I've tested our site using Browserstacks Windows7 Chrome 41, 42, and 43 and have been unable to reproduce the issue and am now wondering if it might be related to some plugin that is installed in my chrome
*** UPDATE ***
I have disabled my ng-inspector plugin in chrome and haven't seen this issue since. Might this be the problem for you guys as well?
Brian
Good catch I think you might be on to it with that bit of fantastic insight...
I'll disable that plugin for the moment
Thanks
So, sounds like ng-inspector has violated the laws of monkey-patching? Can everyone else who's had this problem confirm?
my Chrome version is still the same it the problem disappeared. Using the ng-inspector plugin as well. So that could have been updated ...
Closing as unreproducible currently, potentially fixed - feel free to open an issue if this comes up again.