Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ObjectUnsubscribedError #6903

Closed
Kyderman opened this issue Sep 7, 2017 · 1 comment · Fixed by #6907
Closed

ObjectUnsubscribedError #6903

Kyderman opened this issue Sep 7, 2017 · 1 comment · Fixed by #6907
Assignees

Comments

@Kyderman
Copy link

Kyderman commented Sep 7, 2017

Bug, feature request, or proposal:

ObjectUnsubscribedError is thrown on multiple components when switching between components with or without animations.

What is the expected behavior?

No error to be thrown

What is the current behavior?

ObjectUnsubscribedError is thrown, which halts proper execution of the program.

If I downgrade to Beta-10, the issue goes away, so it must be a reasonably new pull.

What are the steps to reproduce?

Pull the latest version, and have a link between 2 components that have forms on the page

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

Latest

@devversion devversion self-assigned this Sep 7, 2017
devversion added a commit to devversion/material2 that referenced this issue Sep 7, 2017
If a slider component will be destroyed, the `ngOnDestroy` hook calls `_directionality.change.unsubscribe()`, which means that the `unsubscribe` method is called on the `EventEmitter` instead of the actual `Subscription`. This causes the `EventEmitter` to be kind of "completed", which then means that there will be errors if `emit()` is called again (https://github.com/ReactiveX/rxjs/blob/master/src/Subject.ts#L96).

Also fixes that the drawer never unsubscribes from the `_dir.change` `EventEmitter`. This means that even if the component is destroyed, whenever the directionality changes, the drawer calls `validateDrawers()`.

Fixes angular#6892. Fixes angular#6903.
devversion added a commit to devversion/material2 that referenced this issue Sep 7, 2017
If a slider component will be destroyed, the `ngOnDestroy` hook calls `_directionality.change.unsubscribe()`, which means that the `unsubscribe` method is called on the `EventEmitter` instead of the actual `Subscription`. This causes the `EventEmitter` to be kind of "completed", which then means that there will be errors if `emit()` is called again (https://github.com/ReactiveX/rxjs/blob/master/src/Subject.ts#L96).

Also fixes that the drawer never unsubscribes from the `_dir.change` `EventEmitter`. This means that even if the component is destroyed, whenever the directionality changes, the drawer calls `validateDrawers()`.

Fixes angular#6892. Fixes angular#6903.
tinayuangao pushed a commit that referenced this issue Sep 8, 2017
)

If a slider component will be destroyed, the `ngOnDestroy` hook calls `_directionality.change.unsubscribe()`, which means that the `unsubscribe` method is called on the `EventEmitter` instead of the actual `Subscription`. This causes the `EventEmitter` to be kind of "completed", which then means that there will be errors if `emit()` is called again (https://github.com/ReactiveX/rxjs/blob/master/src/Subject.ts#L96).

Also fixes that the drawer never unsubscribes from the `_dir.change` `EventEmitter`. This means that even if the component is destroyed, whenever the directionality changes, the drawer calls `validateDrawers()`.

Fixes #6892. Fixes #6903.
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants