-
Notifications
You must be signed in to change notification settings - Fork 27
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
E2E tests fail in VSCode version 1.93.0 with "target window already closed" when running "Developer: Reload Window" #136
Comments
Thanks for reporting the issue @daphne-sfdc. To get ahead of @christian-bromann, any contributions would be much appreciated! I'm not familiar with the specifics, but I would expect the |
Hi @seanpoulter, Thank you for getting back to us. My team and I are looking into the issue further and were wondering if you could provide any additional details about what changed in VSCode version 1.93.0. Specifically, we are interested in understanding what might be causing the selectors to no longer detect the new target window after a reload. We have already reviewed the VSCode release notes but didn't find any information regarding changes to selectors. Any insights or pointers you could share would be greatly appreciated, as they would help us in addressing and potentially fixing the bug. Thank you! |
FYI: a workaround is to install wdio tools at version 8 and wdio-vscode-service at version 6.0.3. If either was a later version I got the same error, but with those version everything ran fine. |
Hi @haberdashPI, |
You might want to check through the errors above that, that is usually the product of some problem further upstream, so that might have more clues |
Out of curiosity I looked through your tests: I don't think it has anything to do with my problems.
After that message, the test never recovers; seems like the root issue is about how/if the service re-attaches when reloading the app. |
Hello @seanpoulter, I followed your suggestion to check the selectors but found during my investigation that the selector for the entire VSCode window ( I then probed deeper into the code to check how wdio-vscode-service handles Developer: Reload Window and was quite surprised to find that reload doesn't seem to be handled at all in the code. I also put This leads us to believe that the issue is not with the selectors but rather a larger design issue in wdio-vscode-service. It appears that reloads were never handled in the first place. We would appreciate your guidance on how to proceed with this. It seems like a significant change might be required to properly handle window reloads in wdio-vscode-service. Thank you for your assistance. |
Hi @haberdashPI, Do you have examples of tests containing |
I do not. I have not tried to use this package under that scenario. |
Hi @seanpoulter, I was wondering if you had any comments about what @daphne-sfdc mentioned above. Thanks again in advance for your help. |
Hi WDIO Team,
I'm working on the Salesforce Extensions for VSCode. Our E2E tests are built using the WDIO framework. After the release of VSCode version 1.93.0, my team started to notice that our E2E tests are failing with a "target window already closed" error. We are using the latest version v6.1.0 of wdio-vscode-service.
Here's an example of a failed test run on 1.93.0: https://github.com/forcedotcom/salesforcedx-vscode/actions/runs/10779098563/job/29891858831
Currently, we have pinned our E2E tests to run on VSCode version 1.92.2, which is a temporary workaround. However, we do want to keep up with the times and run E2E tests on
stable
VSCode version.I was able to reproduce the issue when running my E2E test locally. I found that the issue happens when running
Developer: Reload Window
in the target VSCode window. As soon as I hit Enter after selectingDeveloper: Reload Window
from the command palette, the target VSCode window gets closed. I tried several other commands, and they ran fine in the target window.Here's a short video of the issue: https://vimeo.com/1008588498
The text was updated successfully, but these errors were encountered: