eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
19.96k stars 2.5k forks source link

Error: Reference widget is not in the layout when DNDing widgets in the shell #4707

Open kittaakos opened 5 years ago

kittaakos commented 5 years ago

I do not know how to reproduce it.

Uncaught (in promise) Error: Reference widget is not in the layout.
    at DockLayout.../../node_modules/@phosphor/widgets/lib/docklayout.js.DockLayout.addWidget (docklayout.js:323)
    at PreferencesEditorsContainer.../../node_modules/@phosphor/widgets/lib/dockpanel.js.DockPanel.addWidget (dockpanel.js:303)
    at PreferencesEditorsContainer.<anonymous> (preferences-tree-widget.ts:327)
    at step (preferences-tree-widget.ts:15)
    at Object.next (preferences-tree-widget.ts:15)
    at fulfilled (preferences-tree-widget.ts:15)
../../node_modules/@phosphor/widgets/lib/docklayout.js.DockLayout.addWidget @ docklayout.js:323
../../node_modules/@phosphor/widgets/lib/dockpanel.js.DockPanel.addWidget @ dockpanel.js:303
(anonymous) @ preferences-tree-widget.ts:327
step @ preferences-tree-widget.ts:15
(anonymous) @ preferences-tree-widget.ts:15
fulfilled @ preferences-tree-widget.ts:15
Promise.then (async)
step @ preferences-tree-widget.ts:15
fulfilled @ preferences-tree-widget.ts:15
Promise.then (async)
step @ preferences-tree-widget.ts:15
(anonymous) @ preferences-tree-widget.ts:15
push.../../packages/preferences/lib/browser/preferences-tree-widget.js.__awaiter @ preferences-tree-widget.ts:15
push.../../packages/preferences/lib/browser/preferences-tree-widget.js.PreferencesEditorsContainer.onAfterAttach @ preferences-tree-widget.ts:305
../../node_modules/@phosphor/widgets/lib/widget.js.Widget.processMessage @ widget.js:523
../../node_modules/@phosphor/widgets/lib/dockpanel.js.DockPanel.processMessage @ dockpanel.js:318
invokeHandler @ index.js:433
sendMessage @ index.js:169
(anonymous) @ layout.js:281
each @ iter.js:60
../../node_modules/@phosphor/widgets/lib/layout.js.Layout.onAfterAttach @ layout.js:280
../../node_modules/@phosphor/widgets/lib/layout.js.Layout.processParentMessage @ layout.js:180
../../node_modules/@phosphor/widgets/lib/widget.js.Widget.notifyLayout @ widget.js:568
../../node_modules/@phosphor/widgets/lib/widget.js.Widget.processMessage @ widget.js:522
invokeHandler @ index.js:433
sendMessage @ index.js:169
../../node_modules/@phosphor/widgets/lib/docklayout.js.DockLayout.attachWidget @ docklayout.js:458
../../node_modules/@phosphor/widgets/lib/docklayout.js.DockLayout.addWidget @ docklayout.js:353
../../node_modules/@phosphor/widgets/lib/dockpanel.js.DockPanel.addWidget @ dockpanel.js:303
../../packages/core/lib/browser/shell/theia-dock-panel.js.TheiaDockPanel.addWidget @ theia-dock-panel.ts:73
../../node_modules/@phosphor/widgets/lib/dockpanel.js.DockPanel._evtDrop @ dockpanel.js:512
../../node_modules/@phosphor/widgets/lib/dockpanel.js.DockPanel.handleEvent @ dockpanel.js:343
dispatchDrop @ index.js:776
../../node_modules/@phosphor/dragdrop/lib/index.js.Drag._evtMouseUp @ index.js:242
../../node_modules/@phosphor/dragdrop/lib/index.js.Drag.handleEvent @ index.js:186
ensorrow commented 5 years ago

I can easily reproduce this error when trying to go to the definition of some snippets.

lmcbout commented 4 years ago

I get the same error when I try to rename a file which is in the preview state; Open the file in preview mode, then select "Rename" from the context menu in the explorer view. ERROR: root ERROR Error: Reference widget is not in the layout. at DockLayout.../../node_modules/@phosphor/widgets/lib/docklayout.js.DockLayout.addWidget (http://localhost:3000/bundle.js:14840:19) at TheiaDockPanel.../../node_modules/@phosphor/widgets/lib/dockpanel.js.DockPanel.addWidget (http://localhost:3000/bundle.js:16410:25) at TheiaDockPanel.../../packages/core/lib/browser/shell/theia-dock-panel.js.TheiaDockPanel.addWidget (http://localhost:3000/bundle.js:125500:36) at ApplicationShell. (http://localhost:3000/bundle.js:121225:48) at step (http://localhost:3000/bundle.js:120444:23) at Object.next (http://localhost:3000/bundle.js:120425:53) at http://localhost:3000/bundle.js:120419:71 at new Promise () at ../../packages/core/lib/browser/shell/application-shell.js.__awaiter (http://localhost:3000/bundle.js:120415:12) at ApplicationShell.../../packages/core/lib/browser/shell/application-shell.js.ApplicationShell.addWidget (http://localhost:3000/bundle.js:121187:16) root INFO [nsfw-watcher: 23171] Stopped watching: /home/lmcbout/theia/theia/tsconfig.json root INFO [nsfw-watcher: 23171] Stopped watching: /home/lmcbout/theia/theia/examples/api-samples/src/browser/label/JBsample-dynamic-label-provider-command-contribution.ts

colin-grant-work commented 3 years ago

I can confirm that @lmcbout's instructions still produce an error in the console, and the widget whose underlying file has been renamed disappears from the shell, even if close-on-delete is set to false.