Skip to content

TreeError [CustomView] Data tree node not found  #82629

Closed

Description

  • 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: microsoft/vscode-python#7898

Activity

  1. askvortsov1 commented on Oct 15, 2019

    @askvortsov1

    microsoft/vscode-python#7975 Has a similar error message in the console, might be related as well.

  2. luabud commented on Oct 15, 2019

    @luabud
    Member

    Python extension side issue link is here: microsoft/vscode-python#7898
    The number in the original thread is correct but it's linked to one in the vscode repo :)

  3. jamesharris-garmin commented on Oct 16, 2019

    @jamesharris-garmin
    Contributor

    Confirmed with 1.39.2

  4. botsman commented on Oct 24, 2019

    @botsman

    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!

  5. astrowonk commented on Nov 5, 2019

    @astrowonk

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

  6. consal commented on Nov 6, 2019

    @consal

    Any news on that? Still experiencing this issue

  7. gadol21 commented on Nov 7, 2019

    @gadol21

    I think i managed to narrow down the issue to this commit:
    f27b246
    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.
    João Moreno (@joaomoreno) why did you revert this change?

  8. jamesharris-garmin commented on Nov 7, 2019

    @jamesharris-garmin
    Contributor

    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.

  9. karthiknadig commented on Nov 7, 2019

    @karthiknadig
    MemberAuthor

    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.

  10. astrowonk commented on Nov 8, 2019

    @astrowonk

    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.

  11. xmatthias commented on Nov 8, 2019

    @xmatthias

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

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

  12. tdamsma commented on Nov 8, 2019

    @tdamsma

    After updating to 1.40 checking if this was fixed was the first thing I did, was also a bit disappointed that fixing this issue didn't make it as I have come to rely upon it quite a bit.

  13. 2 remaining items

  14. Meltz014 commented on Nov 11, 2019

    @Meltz014

    Any update on this issue?

  15. alexr00 commented on Nov 12, 2019

    @alexr00
    Member

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

  16. added
    bug
    candidate
    on Nov 12, 2019
  17. added a commit that references this issue on Nov 12, 2019
    bf6bdb9
  18. valerierose commented on Nov 12, 2019

    @valerierose

    I am also experiencing this issue. I've (mistakenly) filed bug reports with 3 separate extensions related to tests in python, the latest with much detail is here: microsoft/vscode-python#8502.

    I'm about to downgrade vscode because it is very disruptive.

  19. eedwards-sk commented on Nov 12, 2019

    @eedwards-sk

    Did this really just get solved by swallowing all exceptions? o.O

  20. astrowonk commented on Nov 13, 2019

    @astrowonk

    yeah João Moreno (@joaomoreno), is your commit the permanent fix? Wrapping it in try/catch?

  21. joaomoreno commented on Nov 13, 2019

    @joaomoreno
    Contributor

    Marcos Huerta (@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 #84569

  22. added
    verified
    on Nov 13, 2019
  23. locked and limited conversation to collaborators on Dec 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcandidateverified

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions