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

Vscode test run failing on Windows platform #265

Open
dselvara2 opened this issue Jun 9, 2023 · 6 comments
Open

Vscode test run failing on Windows platform #265

dselvara2 opened this issue Jun 9, 2023 · 6 comments
Assignees
Labels
automated tests bug Something isn't working

Comments

@dselvara2
Copy link

Windows platform tests were working as expected until this run - https://github.com/OpenLiberty/liberty-tools-vscode/actions/runs/5079475331
18 tests were passing and 3 failing including docker and attach debugger tests.
Post this multiple changes have happened to fix other issues in the tests and currently windows plaform has been removed from the test run.
Before removal of the windows platform, if we check the last run - https://github.com/OpenLiberty/liberty-tools-vscode/actions/runs/5186451875/jobs/9347567786 - we can see the below exception -

Failed Installing Extensions: file:///d%3A/a/liberty-tools-vscode/liberty-tools-vscode/liberty-dev-vscode-ext-23.0.6-SNAPSHOT.vsix
Error: Command failed: set ELECTRON_RUN_AS_NODE=1 && "D:\a\liberty-tools-vscode\liberty-tools-vscode\test-resources\VSCode-win32-x64-archive\Code.exe" "D:\a\liberty-tools-vscode\liberty-tools-vscode\test-resources\VSCode-win32-x64-archive\resources\app\out\cli.js" --ms-enable-electron-run-as-node --force --install-extension "D:\a\liberty-tools-vscode\liberty-tools-vscode\liberty-dev-vscode-ext-23.0.6-SNAPSHOT.vsix"

@vkavitha
Copy link
Contributor

vkavitha commented Jun 9, 2023

As discussed "Failed Installing Extensions: file:///d%3A/a/liberty-tools-vscode/liberty-tools-vscode/liberty-dev-vscode-ext-23.0.6-SNAPSHOT.vsix" is related to the change introduced in the tools to restrict installation only on 1.78 and above. What we should check is on the test run in supported platform <ie 1.78 and 1.79> . Pls check it once the #262 is merged in to main which has the basic test-automation integration

@TrevCraw TrevCraw added bug Something isn't working automated tests labels Jun 9, 2023
@dselvara2
Copy link
Author

dselvara2 commented Jun 15, 2023

created a new branch "windows-test" post the #262 merge
Enabled windows tests. Windows run is still failing with same error posted above

Error: Unable to install extension 'open-liberty.liberty-dev-vscode-ext' as it is not compatible with VS Code '1.77.0'.
    at $.install (D:\a\liberty-tools-vscode\liberty-tools-vscode\test-resources\VSCode-win32-x64-archive\resources\app\out\vs\code\node\cliProcessMain.js:47:5470)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async R.g (D:\a\liberty-tools-vscode\liberty-tools-vscode\test-resources\VSCode-win32-x64-archive\resources\app\out\vs\code\node\cliProcessMain.js:25:232)
    at async D:\a\liberty-tools-vscode\liberty-tools-vscode\test-resources\VSCode-win32-x64-archive\resources\app\out\vs\code\node\cliProcessMain.js:24:18433
    at async Promise.all (index 0)
    at async R.installExtensions (D:\a\liberty-tools-vscode\liberty-tools-vscode\test-resources\VSCode-win32-x64-archive\resources\app\out\vs\code\node\cliProcessMain.js:24:18362)
    at async D:\a\liberty-tools-vscode\liberty-tools-vscode\test-resources\VSCode-win32-x64-archive\resources\app\out\vs\code\node\cliProcessMain.js:47:26480
    at async Object.ue [as main] (D:\a\liberty-tools-vscode\liberty-tools-vscode\test-resources\VSCode-win32-x64-archive\resources\app\out\vs\code\node\cliProcessMain.js:47:31224)
    at async h (D:\a\liberty-tools-vscode\liberty-tools-vscode\test-resources\VSCode-win32-x64-archive\resources\app\out\vs\code\node\cli.js:14:24593)
Failed Installing Extensions: file:///d%3A/a/liberty-tools-vscode/liberty-tools-vscode/liberty-dev-vscode-ext-23.0.6-SNAPSHOT.vsix
Error: Command failed: set ELECTRON_RUN_AS_NODE=1 && "D:\a\liberty-tools-vscode\liberty-tools-vscode\test-resources\VSCode-win32-x64-archive\Code.exe" "D:\a\liberty-tools-vscode\liberty-tools-vscode\test-resources\VSCode-win32-x64-archive\resources\app\out\cli.js" --ms-enable-electron-run-as-node --force --install-extension "D:\a\liberty-tools-vscode\liberty-tools-vscode\liberty-dev-vscode-ext-23.0.6-SNAPSHOT.vsix"
    at checkExecSyncError (node:child_process:885:11)
    at Object.execSync (node:child_process:957:15)
    at CodeUtil.installExt (D:\a\liberty-tools-vscode\liberty-tools-vscode\node_modules\vscode-extension-tester\out\util\codeUtil.js:139:23)
    at CodeUtil.installExtension (D:\a\liberty-tools-vscode\liberty-tools-vscode\node_modules\vscode-extension-tester\out\util\codeUtil.js:119:14)
    at ExTester.<anonymous> (D:\a\liberty-tools-vscode\liberty-tools-vscode\node_modules\vscode-extension-tester\out\extester.js:86:30)
    at Generator.next (<anonymous>)
    at fulfilled (D:\a\liberty-tools-vscode\liberty-tools-vscode\node_modules\vscode-extension-tester\out\extester.js:19:58)
+ rc=1

Job run - https://github.com/OpenLiberty/liberty-tools-vscode/actions/runs/5275220359/jobs/9540458380

@dselvara2
Copy link
Author

dselvara2 commented Jun 15, 2023

Hard coded vscode version to 1.78.2 just to see if the windows test goes through because the error message clearly says the extension is not compatible with 1.77.0
Error: Unable to install extension 'open-liberty.liberty-dev-vscode-ext' as it is not compatible with VS Code '1.77.0'.

The tests are running with 1.78.2. Gradle tests went thru. But maven tests other than the "Start" tests are failing with below error.
"Start...", "Run tests", "Attach debugger" all failing.
Warning: Unrecognized command: mvn io.openliberty.tools:liberty-maven-plugin:dev -DhotTests=true -f "d:\a\liberty-tools-vscode\liberty-tools-vscode\src\test\resources\maven\liberty.maven.test.wrapper.app\pom.xml". To see the help menu, type 'h' and press Enter.
Warning: Unrecognized command: mvn io.openliberty.tools:liberty-maven-plugin:dev -DdebugPort=7777 -f "d:\a\liberty-tools-vscode\liberty-tools-vscode\src\test\resources\maven\liberty.maven.test.wrapper.app\pom.xml". To see the help menu, type 'h' and press Enter.

As the "Start" test is passing, mvn should be available, so in between tests why mvn becomes unrecognized needs to be investigated.
W.r.to windows platform, the test for devmode action is to simulate the click on the action "Start" or "Start..." or "Run Test". Its upto the extension to open the terminal and run the mvn command for the correspoding dev mode action.

@dselvara2
Copy link
Author

Hello @TrevCraw, I have created a branch (windows-test) to test why the windows run is failing. And updated my observations above. This issue has to be tried on few vscode versions to observe the behavior. This could be an environmental setup issue where the mvn install is not available. Can you pls assign the task to the new team taking over. Thanks.

@aparnamichael
Copy link
Contributor

aparnamichael commented Dec 16, 2024

The tests are running on the Windows Fyre machine, with no mvn install errors observed. However, some tests are failing due to an 'element not interactable' error. In GHA, I am encountering the following error:

Error: Command failed: cd vscodeCdTmrs && tar -xvf C:\Users\RUNNER~1\AppData\Local\Temp\test-resources\stable.zip
tar: Cannot connect to C: resolve failed
at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:517:28)
at maybeClose (node:internal/child_process:1098:16)
at ChildProcess._handle.onexit (node:internal/child_process:303:5)

@aparnamichael
Copy link
Contributor

When I ran the test using command prompt in my local windows machine, tests ran without any six installation error. But When I ran the tests in powershelgl, I got the following error.

Installing extensions...
[node.js fs] rename failed after 1078 retries with error: Error: EPERM: operation not permitted, rename 'c:\Users\Administrator.vscode\extensions\open-liberty.liberty-dev-vscode-ext-25.0.1-SNAPSHOT' -> 'c:\Users\Administrator.vscode\extensions\open-liberty.liberty-dev-vscode-ext-25.0.1-SNAPSHOT.-4185bf37.vsctmp'
Error: Please restart VS Code before reinstalling Liberty Tools.
at Xa.h (file:///C:/Users/ADMINI1/AppData/Local/Temp/test-resources/VSCode-win32-x64-archive/resources/app/out/vs/code/node/cliProcessMain.js:59:48700) {
code: 'Internal',
name: 'Internal'
}
Failed Installing Extensions: file:///c%3A/Users/Administrator/Documents/GitHub/liberty-tools-vscode/liberty-dev-vscode-ext-25.0.1-SNAPSHOT.vsix
Error: Command failed: set ELECTRON_RUN_AS_NODE=1 && "C:\Users\ADMINI
1\AppData\Local\Temp\test-resources\VSCode-win32-x64-archive\Code.exe" "C:\Users\ADMINI~1\AppData\Local\Temp\test-resources\VSCode-win32-x64-archive\resources\app\out\cli.js" --force --install-extension "C:\Users\Administrator\Documents\GitHub\liberty-tools-vscode\liberty-dev-vscode-ext-25.0.1-SNAPSHOT.vsix"
at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at checkExecSyncError (node:child_process:882:11)
at Object.execSync (node:child_process:954:15)
at CodeUtil.installExt (C:\Users\Administrator\Documents\GitHub\liberty-tools-vscode\node_modules\vscode-extension-tester\out\util\codeUtil.js:166:23)
at CodeUtil.installExtension (C:\Users\Administrator\Documents\GitHub\liberty-tools-vscode\node_modules\vscode-extension-tester\out\util\codeUtil.js:137:14)
at ExTester.installVsix (C:\Users\Administrator\Documents\GitHub\liberty-tools-vscode\node_modules\vscode-extension-tester\out\extester.js:97:19)
at async ExTester.setupRequirements (C:\Users\Administrator\Documents\GitHub\liberty-tools-vscode\node_modules\vscode-extension-tester\out\extester.js:139:9)
at async ExTester.setupAndRunTests (C:\Users\Administrator\Documents\GitHub\liberty-tools-vscode\node_modules\vscode-extension-tester\out\extester.js:155:9)
at async C:\Users\Administrator\Documents\GitHub\liberty-tools-vscode\node_modules\vscode-extension-tester\out\cli.js:101:5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated tests bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

5 participants