vscode: TreeError [CustomView] Data tree node not found

  • VSCode Version: 1.39.1
  • OS Version: Windows 10

This issue does not occur with 1.38.1 I am from the python extension team. I have investigated the issue from the extension side. This looks like a issue in the Tree View we use for test explorer.

Steps to Reproduce:

  1. Install python extension.
  2. Have following files and contents in the work-space folder:

some_test.py

from math import factorial
import pytest
import unittest

class Test1(unittest.TestCase):
    def test_dosomething(self):
        self.assertEquals(1, 1)

@pytest.mark.parametrize("n, e", [(0, 1), (1, 1), (5, 120)])
def test_valid(n, e):
    assert factorial(n) == e

.vscode/settings.json

{
    "python.testing.pytestArgs": [
        "."
    ],
    "python.testing.unittestEnabled": false,
    "python.testing.nosetestsEnabled": false,
    "python.testing.pytestEnabled": true,
}
  1. Run “Discover Tests” from the command pallet.
  2. Open Test explorer and run a test.
  3. The tree view fails to update.

issue7898

Does this issue occur when all extensions are disabled?: N/A

Console:

Error: TreeError [CustomView] Data tree node not found: [object Object]
    at Y.getDataNode (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1045:675)
    at Y.rerender (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1043:295)
    at t.visible.e.map.e (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4974:446)
    at Array.map (<anonymous>)
    at U.doRefresh (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4974:437)
    at process._tickCallback (internal/process/next_tick.js:68:7)

This looks related: #82290 Python extension side issue: https://github.com/microsoft/vscode-python/issues/7898

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 27
  • Comments: 19 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Hello!

Is there any chance that this issue could be fixed in the current release?

Because of this issue, I had to downgrade to a previous version of the VS Code. Looks like many developers who faced the same issue did the same.

Thank you!

Unfortunately this got lost since @sandy081 was out. Moving to @alexr00. cc @roblourens

@alexr00 Let me know your analysis.

Thanks for the easy repro steps! I can reproduce the issue. Now to find the cause…

I have to repeat that this is an extremely debilitating bug that requires any python developer to use 1.38. The silence on this is frustrating. It has been open 23 days and counting.

If this is not going to be changed in VS Code, please provide guidance on how to resolve this on the extension side. Since, we didn’t really change anything in how we work with trees and we are now broken.

I think i managed to narrow down the issue to this commit: https://github.com/microsoft/vscode/commit/f27b246e7869f49b475a0c35b19f216ed91726cb from this PR - https://github.com/disksing/vscode/pull/1274/files Reverting it causes the ui to respond as expected.

It is a revert of another commit, and i guess it was done for a good reason. @joaomoreno why did you revert this change?

I’m with @pbotsman - I had to downgrade vscode so I could run unit tests without the animation spinning forever. Any update?

Any update on this issue?

The same problem also occurs in the current release (1.40).

Would be great if this could get some priority… @luabud, @DonJayamanne (sorry for disturbing) - since it’s affecting python tests - any chance to push this from within Microsoft?

Any news on that? Still experiencing this issue

@astrowonk No, it’s not.

Even though it is the right thing to do until better tree API comes. There is only one error happening when rerendering a node: the node doesn’t exist in the tree any more. You can’t rerender something which doesn’t exist. Custom trees can easily ignore those errors.

Proper fix will come with https://github.com/microsoft/vscode/issues/84569

Looks like it was attempting to find a better fix for #78388 unfortunately this workaround was a load bearing workaround for python developers. I wonder why we seem to be failing in this context, or if the fix needs to move back to microsoft/vscode-python.