<p dir="auto"><strong>I'm submitting a ...</strong>  (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ X] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[ X] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">In a component I have this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@ViewChild(AccountFormComponent)
    form: AccountFormComponent;"><pre class="notranslate"><code class="notranslate">@ViewChild(AccountFormComponent)
    form: AccountFormComponent;
</code></pre></div>
<p dir="auto">In the template I have this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;button md-button (click)='save()' [disabled]='!form?.valid'&gt;Save&lt;/button&gt;"><pre class="notranslate"><code class="notranslate">&lt;button md-button (click)='save()' [disabled]='!form?.valid'&gt;Save&lt;/button&gt;
</code></pre></div>
<p dir="auto">After the component was rendered, change detection stoped completely.<br>
I tracked it down to the <a href="https://github.com/angular/angular/blob/master/packages/core/src/application_ref.ts#L438">apprefs zone subscription</a> having stopped:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="this._zone.onMicrotaskEmpty.subscribe(
        {next: () =&gt; { this._zone.run(() =&gt; { this.tick(); }); }});"><pre class="notranslate"><code class="notranslate">this._zone.onMicrotaskEmpty.subscribe(
        {next: () =&gt; { this._zone.run(() =&gt; { this.tick(); }); }});
</code></pre></div>
<p dir="auto">Reason was, that <code class="notranslate">this.tick()</code> threw the error</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'true'. Current value: 'false'.
    at viewDebugError (core.es5.js:8625) [angular]
    at expressionChangedAfterItHasBeenCheckedError (core.es5.js:8603) [angular]
    at checkBindingNoChanges (core.es5.js:8767) [angular]
    at checkNoChangesNodeInline (core.es5.js:12195) [angular]
    at checkNoChangesNode (core.es5.js:12169) [angular]
    at debugCheckNoChangesNode (core.es5.js:12743) [angular]
    at debugCheckDirectivesFn (core.es5.js:12645) [angular]
    at Object.eval [as updateDirectives] (AccountFormPage.html:4) [angular]
    at Object.debugUpdateDirectives [as updateDirectives] (core.es5.js:12627) [angular]
    at checkNoChangesView (core.es5.js:12027) [angular]
    at callViewAction (core.es5.js:12348) [angular]
    at execComponentViewsAction (core.es5.js:12300) [angular]
    at checkNoChangesView (core.es5.js:12030) [angular]
    at callViewAction (core.es5.js:12348) [angular]"><pre class="notranslate"><code class="notranslate">Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'true'. Current value: 'false'.
    at viewDebugError (core.es5.js:8625) [angular]
    at expressionChangedAfterItHasBeenCheckedError (core.es5.js:8603) [angular]
    at checkBindingNoChanges (core.es5.js:8767) [angular]
    at checkNoChangesNodeInline (core.es5.js:12195) [angular]
    at checkNoChangesNode (core.es5.js:12169) [angular]
    at debugCheckNoChangesNode (core.es5.js:12743) [angular]
    at debugCheckDirectivesFn (core.es5.js:12645) [angular]
    at Object.eval [as updateDirectives] (AccountFormPage.html:4) [angular]
    at Object.debugUpdateDirectives [as updateDirectives] (core.es5.js:12627) [angular]
    at checkNoChangesView (core.es5.js:12027) [angular]
    at callViewAction (core.es5.js:12348) [angular]
    at execComponentViewsAction (core.es5.js:12300) [angular]
    at checkNoChangesView (core.es5.js:12030) [angular]
    at callViewAction (core.es5.js:12348) [angular]
</code></pre></div>
<p dir="auto">The error is catched by <code class="notranslate">SafeSubscriber.prototype.__tryOrUnsub</code> and propagated up to zone.js.<br>
However, the error was being catched and swallowed by zone.js hasTask function:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="        ZoneDelegate.prototype.hasTask = function (targetZone, isEmpty) {
            // hasTask should not throw error so other ZoneDelegate
            // can still trigger hasTask callback
            try {
                return this._hasTaskZS &amp;&amp;
                    this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);
            }
            catch (err) {
            }
        };"><pre class="notranslate"><code class="notranslate">        ZoneDelegate.prototype.hasTask = function (targetZone, isEmpty) {
            // hasTask should not throw error so other ZoneDelegate
            // can still trigger hasTask callback
            try {
                return this._hasTaskZS &amp;&amp;
                    this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);
            }
            catch (err) {
            }
        };
</code></pre></div>
<p dir="auto">This made this really hard to debug since change detection just stops working.<br>
I am not really sure why the error occurs, since I have seen this error printed out with change detection continuing to work in other cases.</p>
<p dir="auto"><strong>Expected behavior</strong></p>
<p dir="auto">Errror printed out, app-ref resubscription to <code class="notranslate">zone.onMicrotaskEmpty</code>, which actually did not stop, only the appref got unsubscribed.</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p>
<p dir="auto">Not sure if the combination above (injecting viewchild and using it in the view in an expression) is already enough.</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p>
<p dir="auto">I would at least print some information to the console so developers are not clueless what caused change detection to stop.<br>
However, this might be an issue for zone.js.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<p dir="auto">OS X, angular@4.0.1, zone.js@0.8.5, chrome 57</p>
<p dir="auto"><strong>I'm submitting a ...</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[X] bug report
[ ] feature request"><pre class="notranslate"><code class="notranslate">[X] bug report
[ ] feature request
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">In prod mode, change detection stops working after uncaught exception occurs during the binding evaluation.</p>
<p dir="auto">Details:<br>
the subscription to zone.onMicrotaskEmpty event, which is established in angular/core/application_ref is being unsubscribed automatically by RxJS (at SafeSubscriber.__tryOrUnsub), when uncaught exception occurs during the binding evaluation, and currently there s no way to recover from uncaught exception during the binding evaluation in prod mode.</p>
<p dir="auto"><strong>Expected/desired behavior</strong></p>
<p dir="auto">In prod mode, change detection should continue to function properly after uncaught exception during the binding evaluation.</p>
<p dir="auto"><strong>Reproduction of the problem</strong></p>
<p dir="auto"><a href="http://plnkr.co/edit/2fe6GC6NkuFkffpEoDPZ?p=preview" rel="nofollow">http://plnkr.co/edit/2fe6GC6NkuFkffpEoDPZ?p=preview</a></p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p>
<p dir="auto">In our project, which previously used angular beta 9, we've built custom error handling (by subsclassing ExceptionHandler).<br>
When in prod mode, the error was displayed in a popup on the current page, with 'Report' button, and other stuff.<br>
After upgrading the project to RC1, we're unable to display the popup on the current page after the uncaught error has occurred.</p>
<p dir="auto">There should be some ability to recover from an uncaught exception.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.0-rc.1 - 2.0.0-rc.3</li>
<li><strong>Browser:</strong> all</li>
<li><strong>Language:</strong> all</li>
</ul>