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

fix: deserialize state before updating model on reconnect #3687

Conversation

maartenbreddels
Copy link
Member

This is a backport of #3549 from 8.x to the 7.x branch.

When jupyterlab resumes from a sleeping computer, it will reconnect, and instead of creating the new comms, it will update the models. Like #3549 we did not deserialize the state in this rare condition. This caused a model widget to be passed as a string, which later on caused model.state_change.then to fail, since model.state_change is undefined. On the js console, it would show:

Error setting state: Cannot read properties of undefined (reading ‘then’)

This caused widgets not to appear.

Privately reported, and also likely the cause of spacetelescope/jdaviz#1977.

This is a backport of jupyter-widgets#3549 from 8.x to the 7.x branch.
@jasongrout
Copy link
Member

Thanks!

The docs build failure is unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants