{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/13200","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/13200/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/13200/comments","events_url":"https://api.github.com/repos/angular/angular/issues/13200/events","html_url":"https://github.com/angular/angular/issues/13200","id":193101020,"number":13200,"title":"Async validators can sometimes cause form validity status to be stuck as 'PENDING'","user":{"login":"vincent-vieira","id":2163284,"avatar_url":"https://avatars1.githubusercontent.com/u/2163284?v=4","gravatar_id":"","url":"https://api.github.com/users/vincent-vieira","html_url":"https://github.com/vincent-vieira","followers_url":"https://api.github.com/users/vincent-vieira/followers","following_url":"https://api.github.com/users/vincent-vieira/following{/other_user}","gists_url":"https://api.github.com/users/vincent-vieira/gists{/gist_id}","starred_url":"https://api.github.com/users/vincent-vieira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincent-vieira/subscriptions","organizations_url":"https://api.github.com/users/vincent-vieira/orgs","repos_url":"https://api.github.com/users/vincent-vieira/repos","events_url":"https://api.github.com/users/vincent-vieira/events{/privacy}","received_events_url":"https://api.github.com/users/vincent-vieira/received_events","type":"User","site_admin":false},"labels":[{"id":393879365,"url":"https://api.github.com/repos/angular/angular/labels/comp:%20forms","name":"comp: forms","color":"c5def5","default":false},{"id":375497160,"url":"https://api.github.com/repos/angular/angular/labels/freq2:%20medium","name":"freq2: medium","color":"fbca04","default":false},{"id":375498203,"url":"https://api.github.com/repos/angular/angular/labels/severity3:%20broken","name":"severity3: broken","color":"0052cc","default":false},{"id":130606843,"url":"https://api.github.com/repos/angular/angular/labels/type:%20bug/fix","name":"type: bug/fix","color":"EEEEEE","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/angular/angular/milestones/82","html_url":"https://github.com/angular/angular/milestone/82","labels_url":"https://api.github.com/repos/angular/angular/milestones/82/labels","id":3045967,"number":82,"title":"Backlog","description":"Milestone for triaged issues that have not yet been scheduled for resolution.","creator":{"login":"IgorMinar","id":216296,"avatar_url":"https://avatars3.githubusercontent.com/u/216296?v=4","gravatar_id":"","url":"https://api.github.com/users/IgorMinar","html_url":"https://github.com/IgorMinar","followers_url":"https://api.github.com/users/IgorMinar/followers","following_url":"https://api.github.com/users/IgorMinar/following{/other_user}","gists_url":"https://api.github.com/users/IgorMinar/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorMinar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorMinar/subscriptions","organizations_url":"https://api.github.com/users/IgorMinar/orgs","repos_url":"https://api.github.com/users/IgorMinar/repos","events_url":"https://api.github.com/users/IgorMinar/events{/privacy}","received_events_url":"https://api.github.com/users/IgorMinar/received_events","type":"User","site_admin":false},"open_issues":1481,"closed_issues":95,"state":"open","created_at":"2018-01-18T16:52:20Z","updated_at":"2018-04-09T18:19:09Z","due_on":null,"closed_at":null},"comments":23,"created_at":"2016-12-02T12:04:11Z","updated_at":"2018-04-09T18:34:07Z","closed_at":null,"author_association":"NONE","body":"**I'm submitting a ...**  (check one with \"x\")\r\n```\r\n[x] bug report => search github for a similar issue or PR before submitting\r\n[ ] feature request\r\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n```\r\n\r\n**Current behavior**\r\nAsync validation can sometimes hang form validity status. Returned `Promise`s and `Observable`s are sometimes \"ignored\" and thus, the form is never marked as valid.\r\n\r\n**Expected behavior**\r\nThe underlying async objects would have to be resolved properly and form validity status must update properly.\r\n\r\n**Minimal reproduction of the problem with instructions**\r\nExample Plunkr:\r\nhttp://plnkr.co/edit/nGiwOkCHngVTZKFrJ501?p=preview\r\n\r\nSteps to reproduce :\r\n- I haven't fully investigated the issue yet, but creating some `AsyncValidatorFn` returning either a `Promise` or an `Observable` will do. **Unfortunately, there is no \"magic\" async function making the test crash.**\r\n- Just type something in the input box, triggering validators and you'll see that the HTTP call fetching the JSON error object works, that the observable .do() method is called, logging the result in the console, but the returned Observable is never resolved by Angular, and that the form status is stuck to 'PENDING'.\r\n\r\n**What is the motivation / use case for changing the behavior?**\r\nI heavily use Redux and Observables inside my projects and thus, extensively use async validators too. Having this kind of issues is somehow very unconfortable when working with async helpers.\r\n\r\n**Please tell us about your environment:**\r\n* **Operating system:** Ubuntu 16.04\r\n* **IDE**: Webstorm 2016.3.1\r\n* **package manager**: NPM version 3.10.8\r\n* **HTTP server**: Express v.4.14.0\r\n\r\n* **Angular version:** Tested on 2.0.0 (locally) and 2.0.4 (on the Plunkr)\r\n\r\n* **Browser:** Firefox 50.0.1/Chrome 55.0.2883.75\r\n \r\n* **Language:** TypeScript 2\r\n\r\n* **Node (for AoT issues):** `node --version` = v6.9.1\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/379850478","html_url":"https://github.com/angular/angular/issues/13200#issuecomment-379850478","issue_url":"https://api.github.com/repos/angular/angular/issues/13200","id":379850478,"user":{"login":"krimple","id":4246,"avatar_url":"https://avatars0.githubusercontent.com/u/4246?v=4","gravatar_id":"","url":"https://api.github.com/users/krimple","html_url":"https://github.com/krimple","followers_url":"https://api.github.com/users/krimple/followers","following_url":"https://api.github.com/users/krimple/following{/other_user}","gists_url":"https://api.github.com/users/krimple/gists{/gist_id}","starred_url":"https://api.github.com/users/krimple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krimple/subscriptions","organizations_url":"https://api.github.com/users/krimple/orgs","repos_url":"https://api.github.com/users/krimple/repos","events_url":"https://api.github.com/users/krimple/events{/privacy}","received_events_url":"https://api.github.com/users/krimple/received_events","type":"User","site_admin":false},"created_at":"2018-04-09T18:34:07Z","updated_at":"2018-04-09T18:34:07Z","author_association":"NONE","body":"Wouldn't you just have a separate subscription to a WebSocketSubject or\nsomething similar, hooked up to a subscriber that would modify the form\nwith a patchValue, causing a new validation hit through the validator\nobservable chain?\n\n\nKen Rimple\nTraining and Mentoring Services\nChariot Solutions\n610-608-3935\n@RimpleOnTech\n\n\nOn Mon, Apr 9, 2018 at 1:30 PM, Dmitry A. Efimenko <notifications@github.com\n> wrote:\n\n> I'm not sure if completing an observable is the right solution here. Does\n> that mean that validation will update only once? What if the observable\n> stream is coming from web sockets and I'd like to update validation every\n> time a new value comes from the server - not just once.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/angular/angular/issues/13200#issuecomment-379831044>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAAQluGHSwUQ7q8rJ3PL-kA1SB_gY2Fzks5tm5q0gaJpZM4LCfCx>\n> .\n>\n"}}
{"actor":{"display_login":"krimple"}}