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

Stale event handlers can reside in the client #896

Closed
Archmonger opened this issue Jan 30, 2023 · 3 comments · Fixed by #901
Closed

Stale event handlers can reside in the client #896

Archmonger opened this issue Jan 30, 2023 · 3 comments · Fixed by #901
Labels
priority-1-high Should be resolved ASAP. type-bug About something that isn't working
Milestone

Comments

@Archmonger
Copy link
Contributor

Archmonger commented Jan 30, 2023

Current Situation

A consequence of this change is that now stale event handlers can stay within the client.

To replicate, restart the ASGI webserver while keeping an IDOM tab open. This will silently breaks all event handlers on reconnect.

2023-01-28T23:57:45-0800 | INFO | Ignored event - handler '3d35445264fb4d79a821e59f5961fc43' does not exist or its component unmounted

Proposed Actions

Look into the following

  • Is there a way of unmounting a React component that doesn't delete the DOM tree?
    • We might want to peek at the ReactDOM.unmountComponentAtNode source code and determine if we can do this
  • Can we potentially refresh all handlers within the client on reconnect?
  • Do we need to revert this PR?
@Archmonger Archmonger added type-bug About something that isn't working priority-1-high Should be resolved ASAP. labels Jan 30, 2023
@Archmonger Archmonger added this to the 1.0 milestone Jan 30, 2023
@Archmonger
Copy link
Contributor Author

I would say resolving this would be the final issue issue to our first Production/Stable release.

As far as I've tested over the last 1.5 years, it looks like the package will now be bug-free!

@rmorshea
Copy link
Collaborator

I'm thinking that I basically just revert the change for now. I'm realizing that fixing it for real may actually be more complicated than I thought. Will reopen the original issue, mark for (v2 or whatever subsequent milestone), and add link this issue.

@rmorshea
Copy link
Collaborator

rmorshea commented Jan 30, 2023

As part of that reversion I'll modify this test to catch this problem in the future.

@rmorshea rmorshea mentioned this issue Feb 1, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-1-high Should be resolved ASAP. type-bug About something that isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants