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

helloworld-test-sample failed when rerun #1016

Open
gkwan-ibm opened this issue May 3, 2024 · 2 comments
Open

helloworld-test-sample failed when rerun #1016

gkwan-ibm opened this issue May 3, 2024 · 2 comments

Comments

@gkwan-ibm
Copy link

Extension sample

helloworld-test-sample

VS Code version

1.89.0

What went wrong?

I did the following on Mac

  • clone this repo
  • cd helloworld-test-sample
  • npm install
  • npm test
  • test was passed
  Extension Test Suite
    ✔ Sample test
  1 passing (1ms)
[main 2024-05-03T20:24:49.474Z] Extension host with pid 94860 exited with code: 0, signal: unknown.
Exit code:   0
Done

When I ran npm test again, I got error:

Found existing install in /Users/gkwan/tasks/CNAI/guides/working/openapi-generator/vscode-extension-samples/helloworld-test-sample/.vscode-test/vscode-darwin-arm64-1.89.0. Skipping download
2024-05-03 16:24:55.315 Electron[94994:16431137] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
WARNING: IPC handle "/Users/gkwan/tasks/CNAI/guides/working/openapi-generator/vscode-extension-samples/helloworld-test-sample/.vscode-test/user-data/1.89-main.sock" is longer than 103 chars, try a shorter --user-data-dir
[main 2024-05-03T20:24:55.385Z] Could not delete obsolete instance handle Error: ENOENT: no such file or directory, unlink '/Users/gkwan/tasks/CNAI/guides/working/openapi-generator/vscode-extension-samples/helloworld-test-sample/.vscode-test/user-data/1.89-main.sock'
    at unlinkSync (node:original-fs:1904:3)
    at ke.f (/Users/gkwan/tasks/CNAI/guides/working/openapi-generator/vscode-extension-samples/helloworld-test-sample/.vscode-test/vscode-darwin-arm64-1.89.0/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:112:4193)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/gkwan/tasks/CNAI/guides/working/openapi-generator/vscode-extension-samples/helloworld-test-sample/.vscode-test/vscode-darwin-arm64-1.89.0/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:112:1240
    at async ke.a (/Users/gkwan/tasks/CNAI/guides/working/openapi-generator/vscode-extension-samples/helloworld-test-sample/.vscode-test/vscode-darwin-arm64-1.89.0/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:112:1127) {
  errno: -2,
  syscall: 'unlink',
  code: 'ENOENT',
  path: '/Users/gkwan/tasks/CNAI/guides/working/openapi-generator/vscode-extension-samples/helloworld-test-sample/.vscode-test/user-data/1.89-main.sock'
}
[main 2024-05-03T20:24:55.386Z] Error: ENOENT: no such file or directory, unlink '/Users/gkwan/tasks/CNAI/guides/working/openapi-generator/vscode-extension-samples/helloworld-test-sample/.vscode-test/user-data/1.89-main.sock'
    at unlinkSync (node:original-fs:1904:3)
    at ke.f (/Users/gkwan/tasks/CNAI/guides/working/openapi-generator/vscode-extension-samples/helloworld-test-sample/.vscode-test/vscode-darwin-arm64-1.89.0/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:112:4193)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/gkwan/tasks/CNAI/guides/working/openapi-generator/vscode-extension-samples/helloworld-test-sample/.vscode-test/vscode-darwin-arm64-1.89.0/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:112:1240
    at async ke.a (/Users/gkwan/tasks/CNAI/guides/working/openapi-generator/vscode-extension-samples/helloworld-test-sample/.vscode-test/vscode-darwin-arm64-1.89.0/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:112:1127)
Exit code:   1
Failed to run tests

I expect no error when run the test again

@gkwan-ibm
Copy link
Author

gkwan-ibm commented May 3, 2024

Then, I removed the .vscode-test and ran the npm test, the error still occurred.

@gkwan-ibm
Copy link
Author

I found the workaround:

  • remove the helloworld-test-sam directory that is created by the first run

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

1 participant