{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/14899","repository_url":"https://api.github.com/repos/angular/angular.js","labels_url":"https://api.github.com/repos/angular/angular.js/issues/14899/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/14899/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/14899/events","html_url":"https://github.com/angular/angular.js/issues/14899","id":164986136,"number":14899,"title":"Error: [$injector:modulerr] Failed to instantiate module ng due to:","user":{"login":"li-ml","id":7353901,"avatar_url":"https://avatars.githubusercontent.com/u/7353901?v=3","gravatar_id":"","url":"https://api.github.com/users/li-ml","html_url":"https://github.com/li-ml","followers_url":"https://api.github.com/users/li-ml/followers","following_url":"https://api.github.com/users/li-ml/following{/other_user}","gists_url":"https://api.github.com/users/li-ml/gists{/gist_id}","starred_url":"https://api.github.com/users/li-ml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/li-ml/subscriptions","organizations_url":"https://api.github.com/users/li-ml/orgs","repos_url":"https://api.github.com/users/li-ml/repos","events_url":"https://api.github.com/users/li-ml/events{/privacy}","received_events_url":"https://api.github.com/users/li-ml/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-12T03:22:03Z","updated_at":"2016-07-20T03:15:25Z","closed_at":"2016-07-12T05:48:45Z","body":" I have a suite of tests that all ran fine with Karma + PhantomJS when I was at version 1.2.x of Angular, however once I upgraded all of my tests are failing.\r\nI updated AngularJS to 1.5.0,and angular-mocks is also updated to 1.5.0.\r\n\r\nIn Angular 1.5.x, how can I properly inject a model into my unit tests?\r\n\r\nkarma.conf.js :\r\n>     // list of files / patterns to load in the browser\r\n    files: [\r\n        './node_modules/angular/angular.js',\r\n        '../../src/webapp/scripts/app-test.js',\r\n        '../../src/webapp/apps/demo/examples/forms/validate.js',\r\n        './node_modules/angular-mocks/angular-mocks.js',\r\n        '../../src/test/spec/**/*.js'\r\n    ],\r\n\r\napp-test.js:\r\n> var app = angular.module('abc', [    ]);\r\n\r\nDEPRECATED: use your own version of lodash, this will go away in karma@2.0\r\n12 07 2016 11:09:54.250:INFO [karma]: Karma v1.1.1 server started at http://localhost:9876/\r\n12 07 2016 11:09:54.253:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency\r\n12 07 2016 11:09:54.262:INFO [launcher]: Starting browser PhantomJS\r\n12 07 2016 11:09:55.827:INFO [PhantomJS 1.9.8 (Windows 7 0.0.0)]: Connected on socket /#gv2F7FrSQfyP3CbTAAAA with id 2835289\r\nPhantomJS 1.9.8 (Windows 7 0.0.0): Executed 0 of 2 SUCCESS (0 secs / 0 secs)\r\nPhantomJS 1.9.8 (Windows 7 0.0.0) FormsValidateCtrl test Here adds two numbers together FAILED\r\n\tError: [$injector:modulerr] Failed to instantiate module ng due to:\r\n\tTypeError: 'undefined' is not an object (evaluating 'Function.prototype.bind.apply')\r\n\t    at instantiate (node_modules/angular/angular.js:4619)\r\n\t    at provider (node_modules/angular/angular.js:4433)\r\n\t    at node_modules/angular/angular.js:365\r\n\t    at forEach (node_modules/angular/angular.js:335)\r\n\t    at node_modules/angular/angular.js:4423\r\n\t    at ngModule (node_modules/angular/angular.js:2475)\r\n\t    at invoke (node_modules/angular/angular.js:4604)\r\n\t    at runInvokeQueue (node_modules/angular/angular.js:4497)\r\n\t    at node_modules/angular/angular.js:4506\r\n\t    at forEach (node_modules/angular/angular.js:321)\r\n\t    at loadModules (node_modules/angular/angular.js:4529)\r\n\t    at createInjector (node_modules/angular/angular.js:4409)\r\n\t    at workFn (node_modules/angular-mocks/angular-mocks.js:2799)\r\n\t    at http://localhost:9876/context.js:151\r\n\thttp://errors.angularjs.org/1.5.0/$injector/modulerr?p0=ng&p1=TypeError%3A%20'undefined'%20is%20not%20an%20object%20(evaluating%20'Function.prototype.bind.apply')%0A%20%20%20%20at%20instantiate%20(http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fangular%2Fangular.js%3F7fe9d9cca8a32dbd859d791af18c3659bf2d2ee1%3A4619)%0A%20%20%20%20at%20provider%20(http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fangular%2Fangular.js%3F7fe9d9cca8a32dbd859d791af18c3659bf2d2ee1%3A4433)%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fangular%2Fangular.js%3F7fe9d9cca8a32dbd859d791af18c3659bf2d2ee1%3A365%0A%20%20%20%20at%20forEach%20(http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fangular%2Fangular.js%3F7fe9d9cca8a32dbd859d791af18c3659bf2d2ee1%3A335)%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fangular%2Fangular.js%3F7fe9d9cca8a32dbd859d791af18c3659bf2d2ee1%3A4423%0A%20%20%20%20at%20ngModule%20(http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fangular%2Fangular.js%3F7fe9d9cca8a32dbd859d791af18c3659bf2d2ee1%3A2475)%0A%20%20%20%20at%20invoke%20(http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fangular%2Fangular.js%3F7fe9d9cca8a32dbd859d791af18c3659bf2d2ee1%3A4604)%0A%20%20%20%20at%20runInvokeQueue%20(http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fangular%2Fangular.js%3F7fe9d9cca8a32dbd859d791af18c3659bf2d2ee1%3A4497)%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fangular%2Fangular.js%3F7fe9d9cca8a32dbd859d791af18c3659bf2d2ee1%3A4506%0A%20%20%20%20at%20forEach%20(http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fangular%2Fangular.js%3F7fe9d9cca8a32dbd859d791af18c3659bf2d2ee1%3A321)%0A%20%20%20%20at%20loadModules%20(http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fangular%2Fangular.js%3F7fe9d9cca8a32dbd859d791af18c3659bf2d2ee1%3A4529)%0A%20%20%20%20at%20createInjector%20(http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fangular%2Fangular.js%3F7fe9d9cca8a32dbd859d791af18c3659bf2d2ee1%3A4409)%0A%20%20%20%20at%20workFn%20(http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fangular-mocks%2Fangular-mocks.js%3F9dbebaf59ea2da974e8b7071a720a24cf08ec76e%3A2799)%0A%20%20%20%20at%20attemptSync%20(http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A1886)%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A1874%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A1859%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A697%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A363%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A2479%0A%20%20%20%20at%20attemptAsync%20(http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A1916)%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A1871%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A1859%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A697%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A2473%0A%20%20%20%20at%20attemptAsync%20(http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A1916)%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A1871%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A1859%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A697%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A2473%0A%20%20%20%20at%20attemptAsync%20(http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A1916)%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A1871%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A1859%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A697%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A2332%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fjasmine-core%2Flib%2Fjasmine-core%2Fjasmine.js%3F391e45351df9ee35392d2e5cb623221a969fc009%3A761%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fbase%2Fnode_modules%2Fkarma-jasmine%2Flib%2Fadapter.js%3F7975a273517f1eb29d7bd018790fd4c7b9a485d5%3A320%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fcontext.js%3A151%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A9876%2Fcontext.html%3A48\r\n\t    at forEach (node_modules/angular/angular.js:321)\r\n\t    at loadModules (node_modules/angular/angular.js:4529)\r\n\t    at createInjector (node_modules/angular/angular.js:4409)\r\n\t    at workFn (node_modules/angular-mocks/angular-mocks.js:2799)\r\n\t    at http://localhost:9876/context.js:151\r\n\t    at node_modules/angular/angular.js:4527\r\nPhantomJS 1.9.8 (Windows 7 0.0.0): Executed 1 of 2 (1 FAILED) (0 secs / 0.004 secs)\r\nPhantomJS 1.9.8 (Windows 7 0.0.0): Executed 2 of 2 (1 FAILED) (0 secs / 0.004 secs)\r\nPhantomJS 1.9.8 (Windows 7 0.0.0): Executed 2 of 2 (1 FAILED) (0.018 secs / 0.004 secs)"},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/233827666","html_url":"https://github.com/angular/angular.js/issues/14899#issuecomment-233827666","issue_url":"https://api.github.com/repos/angular/angular.js/issues/14899","id":233827666,"user":{"login":"li-ml","id":7353901,"avatar_url":"https://avatars.githubusercontent.com/u/7353901?v=3","gravatar_id":"","url":"https://api.github.com/users/li-ml","html_url":"https://github.com/li-ml","followers_url":"https://api.github.com/users/li-ml/followers","following_url":"https://api.github.com/users/li-ml/following{/other_user}","gists_url":"https://api.github.com/users/li-ml/gists{/gist_id}","starred_url":"https://api.github.com/users/li-ml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/li-ml/subscriptions","organizations_url":"https://api.github.com/users/li-ml/orgs","repos_url":"https://api.github.com/users/li-ml/repos","events_url":"https://api.github.com/users/li-ml/events{/privacy}","received_events_url":"https://api.github.com/users/li-ml/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T03:15:25Z","updated_at":"2016-07-20T03:15:25Z","body":"@gscoppino  thank you very much,  update to PhantomJS  2.1.1 ,use  PhantomJS  \"have not captured\"  ,but change browsers to Chrome  the tests was executed  successfully :\r\n\r\nPhantomJS  \r\n> D:\\SVN\\pass\\vmanager\\client\\tools\\build>karma.bat\r\nDEPRECATED: use your own version of lodash, this will go away in karma@2.0\r\nDEPRECATED: use your own version of lodash, this will go away in karma@2.0\r\n20 07 2016 11:01:05.961:INFO [karma]: Karma v1.1.1 server started at http://localhost:9876/\r\n20 07 2016 11:01:06.044:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency\r\n20 07 2016 11:01:06.357:INFO [launcher]: Starting browser PhantomJS\r\n20 07 2016 11:01:56.496:WARN [launcher]: PhantomJS have not captured in 50000 ms, killing.\r\n20 07 2016 11:01:58.499:WARN [launcher]: PhantomJS was not killed in 2000 ms, sending SIGKILL.\r\n20 07 2016 11:02:00.502:WARN [launcher]: PhantomJS was not killed by SIGKILL in 2000 ms, continuing.\r\n\r\nChrome:\r\n> D:\\SVN\\pass\\vmanager\\client\\tools\\build>karma.bat\r\nDEPRECATED: use your own version of lodash, this will go away in karma@2.0\r\nDEPRECATED: use your own version of lodash, this will go away in karma@2.0\r\n20 07 2016 11:05:14.425:INFO [karma]: Karma v1.1.1 server started at http://localhost:9876/\r\n20 07 2016 11:05:14.427:INFO [launcher]: Launching browser Chrome with unlimited concurrency\r\n20 07 2016 11:05:14.439:INFO [launcher]: Starting browser Chrome\r\n20 07 2016 11:05:40.445:INFO [Chrome 45.0.2454 (Windows 7 0.0.0)]: Connected on socket /#uOJmiXjh1Y_pVXFyAAAA with id 87513140\r\nChrome 45.0.2454 (Windows 7 0.0.0): Executed 0 of 2 SUCCESS (0 secs / 0 secs)\r\nChrome 45.0.2454 (Windows 7 0.0.0): Executed 0 of 2 SUCCESS (0 secs / 0 secs)\r\nChrome 45.0.2454 (Windows 7 0.0.0): Executed 1 of 2 SUCCESS (0 secs / 0.072 secs)\r\nChrome 45.0.2454 (Windows 7 0.0.0): Executed 2 of 2 SUCCESS (0 secs / 0.072 secs)\r\nChrome 45.0.2454 (Windows 7 0.0.0): Executed 2 of 2 SUCCESS (0.094 secs / 0.072 secs)"}}
{"actor":{"display_login":"li-ml"}}