jupyter-book/thebe

Widget model not found

Closed this issue · 5 comments

Describe the bug

context
Running thebe in react (using binder ATM).
Displaying a sub-class of a widget (VBox)

expectation
Widget should display as usuall when reconnecting to session

bug

Error: widget model not found
    at ThebeManager.get_model (manager-base.js:128:1)
    at WidgetRenderer.renderModel (renderer.ts:57:1)

When reconnecting to a session, works fine while connecting.

running kernel.restart() and session.restart() did not help
but localStorage.clear() worked. This is I believe a symptom of not updating the localStorage entry in some case.

problem
This is a problem for people using thebe-react

Reproduce the bug

  1. create a react-app project with thebe-react and use binder
  2. have a notebook with a sub-class of a widget
  3. run the notebook through your react app and display the widgets
  4. refresh
  5. repeat 3

List your environment

No response

@shaielc I've been trying to reproduce your problem without success using the demo-react app. Is your actual code in a public repo and we could try and reproduce from there?

@shaielc I've been trying to reproduce your problem without success using the demo-react app. Is your actual code in a public repo and we could try and reproduce from there?

The notebook I am running is here
The thebe integration isn't pushed yet. I'll try and push it later.

Pushed my thebe integration to here

Resolving this as it seems like the problem was solved by properly configuring thebe-core imports (with the bundle loader)

oh! glad to hear it @shaielc 👏