{"action":"closed","issue":{"url":"https://api.github.com/repos/angular/angular/issues/6392","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/6392/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/6392/comments","events_url":"https://api.github.com/repos/angular/angular/issues/6392/events","html_url":"https://github.com/angular/angular/issues/6392","id":125859643,"number":6392,"title":"Misleading error message \"Cannot find a differ supporting object '[object Object]'\"","user":{"login":"wardbell","id":129061,"avatar_url":"https://avatars.githubusercontent.com/u/129061?v=3","gravatar_id":"","url":"https://api.github.com/users/wardbell","html_url":"https://github.com/wardbell","followers_url":"https://api.github.com/users/wardbell/followers","following_url":"https://api.github.com/users/wardbell/following{/other_user}","gists_url":"https://api.github.com/users/wardbell/gists{/gist_id}","starred_url":"https://api.github.com/users/wardbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wardbell/subscriptions","organizations_url":"https://api.github.com/users/wardbell/orgs","repos_url":"https://api.github.com/users/wardbell/repos","events_url":"https://api.github.com/users/wardbell/events{/privacy}","received_events_url":"https://api.github.com/users/wardbell/received_events","type":"User","site_admin":false},"labels":[{"id":217986512,"url":"https://api.github.com/repos/angular/angular/labels/comp:%20common","name":"comp: common","color":"c7def8","default":false},{"id":335163458,"url":"https://api.github.com/repos/angular/angular/labels/hotlist:%20error%20messages","name":"hotlist: error messages","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":23,"created_at":"2016-01-11T01:38:21Z","updated_at":"2016-11-02T15:31:15Z","closed_at":"2016-11-02T15:31:15Z","body":"This error message gives us no clue as to what is wrong or what to do. \n### Repro\n\nMisko and I experienced this while refactoring a Component from one using the async pipe to one using an array.\n\nThe async pipe version:\n\n```\n    heroes: any;\n\n    // <li *ngFor=\"#hero of heroes | async\">\n    this.heroes = this._heroService.getHeroes();\n```\n\nThe refactored version:\n\n```\n    // <li *ngFor=\"#hero of heroes\">\n    this.heroes = this._heroService.getHeroes()\n                      .subscribe(heroes => this.heroes = heroes);\n```\n\nThe exception was:\n\n```\nEXCEPTION: Cannot find a differ supporting object '[object Object]' in [heroes  in TohComponent@4:8]\n```\n### Discussion\n\nDo you see our mistake ... the one that threw the error?  We didn't ... for about 5 head-scratching minutes (see [below](#answer)).\n\nThe developer has no idea what a \"differ\" is, what it is that the \"differ\" can't support, what might cause this, or what to do.\n\nThe \"[heroes  in TohComponent@4:8]\" didn't help because line 4 of that component file is an import statement in the TS and nowhere near the template or the function in the transpiled JS. Something called \"heroes\" appears all over the place. \n\nFWIW, I've received this error several times and I think the cause (bad list) was always the same.\n\n<a id=\"answer\"></a>\nOur mistake: after refactoring we were still assigning an observable to `this.heroes`.\n### Recommended solution\n\nImprove error message. Link to problem/solutions page?\n"}}
{"actor":{"display_login":"pkozlowski-opensource"}}