[Snack bar] throws exception and hangs when clicking the Pizza Party button repeatedly
Bug, feature request, or proposal:
Bug
What is the expected behavior?
What is the current behavior?
Click Pizzaparty button fast and repeatedly, throwing exception like
EXCEPTION: Attempt to use a destroyed view: detectChanges
t.handleError @ error_handler.js:50
error_handler.js:55ORIGINAL STACKTRACE:
t.handleError @ error_handler.js:55
error_handler.js:56Error: Attempt to use a destroyed view: detectChanges
at h (https://material.angular.io/vendor.eee4c38586937a230f87.bundle.js:1420:1654)
at e [as constructor] (https://material.angular.io/vendor.eee4c38586937a230f87.bundle.js:184:359)
at new e (https://material.angular.io/vendor.eee4c38586937a230f87.bundle.js:983:661)
at t.throwDestroyedError (https://material.angular.io/vendor.eee4c38586937a230f87.bundle.js:36:6314)
at t.detectChanges (https://material.angular.io/vendor.eee4c38586937a230f87.bundle.js:36:5707)
at t.internalDetectChanges (https://material.angular.io/vendor.eee4c38586937a230f87.bundle.js:36:5542)
at t.detectChangesInternal (https://material.angular.io/main.f61f48e0463afe1ababf.bundle.js:30:4104)
at t.detectChanges (https://material.angular.io/vendor.eee4c38586937a230f87.bundle.js:36:5749)
at t.detectChanges (https://material.angular.io/vendor.eee4c38586937a230f87.bundle.js:1004:1535)
at https://material.angular.io/vendor.eee4c38586937a230f87.bundle.js:289:5620
at Array.forEach (native)
at e.tick (https://material.angular.io/vendor.eee4c38586937a230f87.bundle.js:289:5587)
at https://material.angular.io/vendor.eee4c38586937a230f87.bundle.js:289:4167
at t.invoke (https://material.angular.io/vendor.eee4c38586937a230f87.bundle.js:1420:6949)
at Object.onInvoke (https://material.angular.io/vendor.eee4c38586937a230f87.bundle.js:99:2659)
t.handleError @ error_handler.js:56
zone.js:407e
Then the snack bar hangs there forever.
Providing a Plunker (or similar) is the best way to get the team to see your issue. https://plnkr.co/edit/AwxCagXy91twxVhv7TQU?p=preview (provided by @andrewseguin, thank you for confirming this bug)
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, browsers are affected?
Angular version: not sure material2 - Master branch browsers: Chrome
Is there anything else we should know?
related issues: #2390 #2392
I was under the impression that this was fixed with https://github.com/angular/material2/pull/2392, have you tried it against master?
It's also happening on the Material Components library page of snack-bar: https://material.angular.io/components/component/snack-bar
Which versions of Angular, Material, OS, browsers are affected?
Angular version: 2.4.1 (as seen on body)
Material2 - Master branch (?)
Browsers: Chrome
It does appear to be fixed if you run material.angular.io locally while using material2 master.
@willshowell you are right. The plunker template seems to be outdated. I copied systemjs.config.js from new template into that template and the problem is gone.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.