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

Client not always unregistered when removing its iframe #215

Open
danielwiehl opened this issue Dec 23, 2022 · 0 comments
Open

Client not always unregistered when removing its iframe #215

danielwiehl opened this issue Dec 23, 2022 · 0 comments

Comments

@danielwiehl
Copy link
Collaborator

Describe the bug

It turned out that sometimes clients are not unregistered when removing their iframe.

To Reproduce

Steps to reproduce the behavior:

  1. Open Testing App of the SCION Microfrontend Platform: https://scion-microfrontend-platform-testing-app.vercel.app
  2. Open the DevTools (DevTools toggle button in the upper right corner)
  3. Close the DevTools
  4. See the warning logged to the console after one minute that a stale client was detected

Or for a testing app microfrontend:

  1. Open Testing App of the SCION Microfrontend Platform: https://scion-microfrontend-platform-testing-app.vercel.app
  2. Open the DevTools (DevTools toggle button in the upper right corner)
  3. Load the router page into the left outlet: https://scion-microfrontend-platform-testing-app1-v1-0-0-rc-12.vercel.app/#/outlet-router
    3.1. Enter 'devtools' into the outlet field
    3.2. Enter 'https://scion-microfrontend-platform-testing-app3-v1-0-0-rc-12.vercel.app/#/publish-message' into the URL field
    3.3. Click 'Navigate'
  4. Close the DevTools
  5. See the warning logged to the console after one minute that a stale client was detected

Analysis

The unload handler of the MicrofrontendPlatformStopper is invoked and the disconnect message published to the broker. However, the broker never receives the disconnect message. Listening to the pagehide event also leads to the same result.

Expected behavior

The client is disposed when removing its iframe.

Environment

  • SCION Microfrontend Platform version: 1.0.0-rc.12
  • Browser: Chrome 108.0.5359.125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
SCION
  
Triage
Development

No branches or pull requests

1 participant