{"action":"closed","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/13782","repository_url":"https://api.github.com/repos/angular/angular.js","labels_url":"https://api.github.com/repos/angular/angular.js/issues/13782/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/13782/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/13782/events","html_url":"https://github.com/angular/angular.js/issues/13782","id":127115188,"number":13782,"title":"$http doesn't immediately increment $brower's outstandingRequestCount. Protractor issues result.","user":{"login":"wbyoko","id":1385752,"avatar_url":"https://avatars.githubusercontent.com/u/1385752?v=3","gravatar_id":"","url":"https://api.github.com/users/wbyoko","html_url":"https://github.com/wbyoko","followers_url":"https://api.github.com/users/wbyoko/followers","following_url":"https://api.github.com/users/wbyoko/following{/other_user}","gists_url":"https://api.github.com/users/wbyoko/gists{/gist_id}","starred_url":"https://api.github.com/users/wbyoko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbyoko/subscriptions","organizations_url":"https://api.github.com/users/wbyoko/orgs","repos_url":"https://api.github.com/users/wbyoko/repos","events_url":"https://api.github.com/users/wbyoko/events{/privacy}","received_events_url":"https://api.github.com/users/wbyoko/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/branch:%201.4.x","name":"branch: 1.4.x","color":"fad8c7"},{"url":"https://api.github.com/repos/angular/angular.js/labels/branch:%201.5.x","name":"branch: 1.5.x","color":"207de5"},{"url":"https://api.github.com/repos/angular/angular.js/labels/component:%20$http","name":"component: $http","color":"d7e102"},{"url":"https://api.github.com/repos/angular/angular.js/labels/needs:%20investigation","name":"needs: investigation","color":"444444"},{"url":"https://api.github.com/repos/angular/angular.js/labels/severity:%20broken%20expected%20use","name":"severity: broken expected use","color":"fbda00"},{"url":"https://api.github.com/repos/angular/angular.js/labels/type:%20bug","name":"type: bug","color":"000000"}],"state":"closed","locked":false,"assignee":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"assignees":[{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/90","html_url":"https://github.com/angular/angular.js/milestones/1.5.x","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/90/labels","id":1025270,"number":90,"title":"1.5.x","description":"","creator":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"open_issues":104,"closed_issues":171,"state":"open","created_at":"2015-03-17T12:15:49Z","updated_at":"2016-07-18T09:49:34Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-01-17T18:50:05Z","updated_at":"2016-07-18T09:49:33Z","closed_at":"2016-07-18T09:49:33Z","body":"http://jsfiddle.net/awtwff3x/ (using Angular 1.4.8)\r\n\r\nThe issue is that using $http doesn't seem to register with $browser.defer synchronously so that $browser.notifyWhenNoOutstandingRequests waits accordingly.\r\n\r\nThis has created an issue where protractor tests are flaky because they aren't waiting for resources to load. \r\n\r\nAlso seems with $timeout registering synchronously using a $timeout anywhere in a controller will allow for the $http request to register and have the protractor test wait correctly.\r\n\r\nYou can uncomment line 22 to see that requests queue after $timeout is used, otherwise notifyWhenNoOutstandingRequests returns synchronously.\r\n\r\nThanks."}}
{"actor":{"display_login":"petebacondarwin"}}