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

The OAuthService doesn't clean up all used resources when it is destroyed #665

Closed
Andreas-Hjortland opened this issue Nov 7, 2019 · 1 comment · Fixed by #666
Closed
Labels
bug For tagging faulty or unexpected behavior. investigation-needed Indication that the maintainer or involved community members may need to investigate more.

Comments

@Andreas-Hjortland
Copy link

Describe the bug
If you destroy the OAuthService, for instance through destroying the angular app, the attached event listeners and the sessionCheckTimer will still continue to run.

Stackblitz example
https://angular-abivfc.stackblitz.io/

To Reproduce
Steps to reproduce the behavior:

  1. Go to the stackblitz. You might need to change of fix the issuer configured in app.component.ts. I have used the one in the example code.
  2. Log in to the identity server and redirect back to the site
  3. Open the console
  4. See error "Cannot read proprety 'contentWindow' of null" or similar error on other browsers.

Expected behavior
All timers, events and elements that the OAuthService created should be stopped or removed when the angular app is destroyed and the framework calls ngOnDestroy.

Desktop (please complete the following information):

  • OS: Tested on windows 10, but will probably work the same on all platforms
  • Browser Tested in chrome 78 and Firefox 71
@Andreas-Hjortland
Copy link
Author

The issue isn't that you get the "Cannot read property 'contentWindow' of null", but rather a symptom of the underlying issue that we haven't cleaned up all the resources that we allocate

@jeroenheijmans jeroenheijmans added bug For tagging faulty or unexpected behavior. investigation-needed Indication that the maintainer or involved community members may need to investigate more. labels Nov 17, 2019
manfredsteyer added a commit that referenced this issue Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For tagging faulty or unexpected behavior. investigation-needed Indication that the maintainer or involved community members may need to investigate more.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants