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

No test controller with Id ... found in test-main.ts #13211

Open
wss29 opened this issue Dec 25, 2023 · 2 comments
Open

No test controller with Id ... found in test-main.ts #13211

wss29 opened this issue Dec 25, 2023 · 2 comments
Assignees

Comments

@wss29
Copy link

wss29 commented Dec 25, 2023

Bug Description:

Steps to Reproduce:

  1. There is already a discussion on https://community.theia-ide.org/t/do-you-plan-to-fix-maximum-call-stack-size-exceeded/3318
  2. the problem is that the invoke order in test-main.ts
    why $notifyTestRunProfileCreated was invoked first and then $registerTestController being invoked, this will always throw an error, because the controller is registered in $registerTestController.
    image
    @tsmaeder do you know why this happened in testing Explorer?

Additional Information

  • Operating System: Windows10
  • Theia Version: 1.45.0
@tsmaeder
Copy link
Contributor

Hi @wss29 the only way this seems possible if one of these things happen:

  1. The message that notifies about the new run profile overtakes the message that registers the controller somehow. That seems unlikely, since we have no other indication of this ever happening.
  2. The test controller is disposed before the run profile is added
  3. Something goes wrong registering the TestController on the browser side. Could you provide the relevant parts of the back end and browser logs in order to verify this? Since we have to return a TestController instance from the API synchronously, we can't guard against this.

@wss29
Copy link
Author

wss29 commented Dec 27, 2023

Hi @tsmaeder
I check the backend and browser log, there is no error. so I made a little change to bypass the current no-test controller problem and see whether it worked, The code change is as follows
image
after the above change I can open file in text editor and run the test cases correctly, in the meantime, Test Explorer can show and execute the test correctly.
almost everything looks ok, except for one little problem

  1. when I click open a robot file in the text editor, the children node in test explorer disappears, like the simple.robot file in the following image.
    image
    image
  2. I debug the code and find when I open a file the deltaBuilder flush event trigger and $notifyDelta method are called,
    image
    image
  3. you can see the type is DeltaKind, value 2 means removed, the $notifyDelta finally called applyDeltaToCollection method in test-main.ts, and the child is removed in there when type is 2.
    image
    image
  4. this situation is strange, why does opening a robot file in the text editor cause Test Explorer children node to be removed from the parent node, where does the type value come from?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants