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

TreeDataProvider shows error "Element with id is already registered" #71698

Closed
ejizba opened this issue Apr 4, 2019 · 8 comments
Closed

TreeDataProvider shows error "Element with id is already registered" #71698

ejizba opened this issue Apr 4, 2019 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug tree-views Extension tree view issues verified Verification succeeded
Milestone

Comments

@ejizba
Copy link
Member

ejizba commented Apr 4, 2019

Issue Type: Bug

We've noticed errors similar to the following when leveraging the TreeDataProvider in our extensions:
Screen Shot 2019-04-03 at 7 29 51 PM

I believe it's a race condition when refreshing and I've created a simple extension that you can clone in order to repro. Specifically, the 'ej/tree' branch:
https://github.com/EricJizbaMSFT/helloworldext/tree/ej/tree

In order to repro, right click on the "1" node and select "Hello world":
Screen Shot 2019-04-03 at 7 29 12 PM

This repros for me on both insiders and non-insiders.

VS Code version: Code - Insiders 1.33.0-insider (0ac1114, 2019-04-01T15:47:22.304Z)
OS version: Darwin x64 18.2.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz (8 x 2500)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 16.00GB (2.34GB free)
Process Argv .
Screen Reader no
VM 0%
Extensions (7)
Extension Author (truncated) Version
Ionide-fsharp Ion 3.35.0
vscode-azurefunctions ms- 0.16.0
python ms- 2019.3.6352
azure-account ms- 0.8.1
csharp ms- 1.18.0
java red 0.42.1
vscode-java-debug vsc 0.17.0
@eamodio
Copy link
Contributor

eamodio commented Apr 4, 2019

I see this a lot in GitLens too, but I haven't been able to pinpoint a scenario that always repro's it.

@joaomoreno joaomoreno assigned sandy081 and unassigned joaomoreno Apr 8, 2019
@sandy081 sandy081 added bug Issue identified by VS Code Team member as probable bug tree-views Extension tree view issues labels Apr 8, 2019
@sandy081 sandy081 added this to the May 2019 milestone Apr 8, 2019
@sandy081 sandy081 modified the milestones: May 2019, June 2019 May 24, 2019
@sandy081 sandy081 modified the milestones: June 2019, On Deck Jun 26, 2019
@eamodio
Copy link
Contributor

eamodio commented Jul 11, 2019

I was really hoping that when the custom views adopted the new tree implementation this issue would go away -- but I still see it 😢

@sandy081 sandy081 modified the milestones: On Deck, July 2019 Jul 12, 2019
@sandy081
Copy link
Member

@eamodio Can you please provide steps to repro it?

@ejizba
Copy link
Member Author

ejizba commented Jul 12, 2019

@sandy081 I've confirmed it still repros with my original steps provided in the first comment above

Screen Shot 2019-07-12 at 10 25 05 AM

Version: 1.37.0-insider
Commit: 8fa8111
Date: 2019-07-12T09:17:10.495Z
Electron: 4.2.5
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Darwin x64 18.6.0

@mikepsinn
Copy link

mikepsinn commented Jul 13, 2019

Thanks for all your great work on this project! :D

I can reproduce with this project on:
OS: Windows 10
Node Version: v8.11.2
Xcode version: Not installed

Then I get
Element with id gulpfile.js:current git branch: develop is already registered
and it doesn't show the gulp tasks.

notificationsAlerts.ts:38 Error: Element with id gulpfile.js:current git branch: develop is already registered
	at p.createAndRegisterTreeNode (k:\Users\m_000\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:488:50)
	at define.fetchChildrenNodes.a.asPromise.then.Promise.all.u.coalesce.map.a.asPromise.then.n (k:\Users\m_000\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:486:763)

Screenshot_3

Any suggestions? Thanks! :D

CPUs AMD FX(tm)-6300 Six-Core Processor (6 x 3516)
GPU Status 2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwareoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_deferred_display_list: disabled_offskia_renderer: disabled_offsurface_synchronization: enabled_onvideo_decode: enabledviz_display_compositor: disabled_offwebgl: enabledwebgl2: enabled
Load (avg) undefined
Memory (System) 23.97GB (8.81GB free)
Process Argv  
Screen Reader no
VM 0%
Extension Author (truncated) Version
prettier-vscode esb 1.9.0
ginfuru-vscode-jekyll-syntax gin 0.1.0
vscode-jekyll-snippets gin 0.9.1
vscode-back-forward-button gri 0.1.2
beautify Hoo 1.5.0
mark-as-excluded jcm 0.2.6
vscode-html-format moh 0.0.3
gulptasks nic 1.3.1
jekyll ost 0.1.1
ruby reb 0.24.1
vscode-yaml red 0.4.1
sort-lines Tyr 1.8.0
vscodeintellicode Vis 1.1.7
JavaScriptSnippets xab 1.7.2

@alexr00 alexr00 modified the milestones: July 2019, August 2019 Jul 29, 2019
@nbransby
Copy link

nbransby commented Aug 5, 2019

Im getting this a lot too. Could I confirm if this error message was intended for the extension developer due to incorrect use of the vscode API or an internal assertion?

@alexr00
Copy link
Member

alexr00 commented Aug 9, 2019

I can repro with the original example from @EricJizbaMSFT (thank you for the concise example!). I'm looking into it.

@alexr00
Copy link
Member

alexr00 commented Aug 9, 2019

The example nicely shows that we don't do anything to prevent multiple tree refreshes from occurring at the same time. I've added refresh queuing. If you seen any odd tree behavior in the near future, it could be that this queuing broke some other timing.

@alexr00 alexr00 closed this as completed in 5d8c287 Aug 9, 2019
@mjbvz mjbvz added the verified Verification succeeded label Aug 28, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug tree-views Extension tree view issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

8 participants