components icon indicating copy to clipboard operation
components copied to clipboard

snackBar throws ObjectUnsubscribedError on dismiss

Open bcravens opened this issue 9 years ago • 6 comments

Bug, feature request, or proposal:

bug

What is the current behavior?

when the snackBar is dismissed it throws an object unsubscribed error

What are the steps to reproduce?

I would provide a plunker but the example provided in the documentation is currently broken and also throws its own errors.

Which versions of Angular, Material, OS, browsers are affected?

angular 2.4.4 material 2.0.0-beta.2

Is there anything else we should know?

this is how I'm calling snackBar

 this.snackBar.open("message", null, {
     duration: 6000
});

it works fine but then throws the exception error about the observable it creates being unsubscribed.

bcravens avatar Apr 06 '17 19:04 bcravens

https://plnkr.co/edit/DK5r5IGkpHVnYRg6Iacl?p=preview I don't see the error on Angular 2.4.10v

M-a-c avatar Apr 06 '17 19:04 M-a-c

whats the best way update to the latest version of angular 2?

bcravens avatar Apr 06 '17 19:04 bcravens

https://docs.npmjs.com/cli/update This should point you in the right direction. I'm pretty sure you would want to make sure you have a ^ in front of all of your @angular dependencies then run npm update. (that might update some other packages too, so you might want to read up on the update npm update docs)

This is also a very nice stack overflow article about ~ ^ and updating. http://stackoverflow.com/questions/22343224/whats-the-difference-between-tilde-and-caret-in-package-json

M-a-c avatar Apr 06 '17 20:04 M-a-c

Thank you

bcravens avatar Apr 07 '17 13:04 bcravens

Seems to be working with the latest versions of both angular and material (https://material.angular.io/components/component/snack-bar). Feel free to open a new issue if you can still reproduce.

jelbourn avatar Apr 09 '17 00:04 jelbourn

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.