declarativewidgets icon indicating copy to clipboard operation
declarativewidgets copied to clipboard

urth-core-dataframe: polymer-mini.html: Uncaught TypeError: Cannot read property 'disconnect' of null

Open peller opened this issue 8 years ago • 10 comments

When running the cells in this test, in order, the visual in the explorer fails to appear, apparently due to this exception from urth-core-dataframe.detached:

Uncaught TypeError: Cannot read property 'disconnect' of null
Polymer.Base.extend._cleanup    @   polymer-mini.html:1595
DomApi.EffectiveNodesObserver.removeListener    @   polymer-mini.html:1460
DomApi.unobserveNodes   @   polymer-mini.html:632
Polymer.Base.extend._cleanup    @   polymer-mini.html:1675
DomApi.EffectiveNodesObserver.removeListener    @   polymer-mini.html:1460
DomApi.unobserveNodes   @   polymer-mini.html:632
window.Urth.urth-core-dataframe.Polymer.detached    @   urth-core-dataframe.html:261
Polymer.Base._addFeature._invokeBehavior    @   polymer-micro.html:433
Polymer.Base._addFeature._doBehavior    @   polymer-micro.html:428
(anonymous function)    @   polymer-micro.html:217
Polymer.RenderStatus.whenReady  @   polymer-micro.html:103
Polymer.Base.detachedCallback   @   polymer-micro.html:215
(anonymous function)    @   jquery.min.js:5
x.extend.access @   jquery.min.js:4
x.fn.extend.html    @   jquery.min.js:5
OutputArea.clear_output @   outputarea.js:866
CodeCell.execute    @   codecell.js:313
Notebook.execute_cell_and_select_below  @   notebook.js:2177
_actions.run-cell-and-select-next.handler   @   actions.js:116
final_actions.(anonymous function).handler  @   actions.js:621
ActionHandler.call  @   actions.js:723
ShortcutManager.call_handler    @   keyboard.js:451
KeyboardManager.handle_keydown  @   keyboardmanager.js:172
(anonymous function)    @   keyboardmanager.js:136
x.event.dispatch    @   jquery.min.js:5
y.handle    @   jquery.min.js:5

Run the cell again, or run the notebook in a different order, and everything is ok. Only happens when the explore() call comes immediately after the table/query test. Probably has something to do with the incomplete/null attributes on the urth-core-query elements created by urth-viz-query

@lbustelo

peller avatar Jul 20 '16 02:07 peller

Looking at the code in urth-core-dataframe.detached, don't see anything that jumps out. I looked at the relevant behaviors too.

lbustelo avatar Jul 21 '16 18:07 lbustelo

probably has something to do with the way I'm moving the query nodes around in the DOM with an appendChild() and the reference gets stale

peller avatar Jul 21 '16 19:07 peller

I cannot reproduce this issue on master. explorer

lbustelo avatar Jul 22 '16 14:07 lbustelo

yeah, sorry, it's with the new notebook, which lives in the declarativewidgets_explorer repo. For now, you can copy it over.

peller avatar Jul 22 '16 15:07 peller

I'll try that... but that seems similar to what I tested.

lbustelo avatar Jul 22 '16 15:07 lbustelo

just tried it. I cannot reproduce the problem either.

peller avatar Jul 22 '16 15:07 peller

I had to run the explore() cell a second time to see it. Both times, the vega chart failed to appear.

peller avatar Jul 23 '16 03:07 peller

@peller with the same error?

lbustelo avatar Jul 26 '16 13:07 lbustelo

Can't test this due to https://github.com/jupyter-incubator/declarativewidgets_explorer/issues/24

lbustelo avatar Jul 26 '16 14:07 lbustelo

@lbustelo same error

peller avatar Jul 26 '16 14:07 peller