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

test-serve(main): not-preserve-symlinks test on Windows fails #8366

Closed
7 tasks done
userquin opened this issue May 28, 2022 · 6 comments
Closed
7 tasks done

test-serve(main): not-preserve-symlinks test on Windows fails #8366

userquin opened this issue May 28, 2022 · 6 comments

Comments

@userquin
Copy link
Contributor

userquin commented May 28, 2022

Describe the bug

it seems there is something broken on Windows running test-serve script on main branch (Windows 10 PRO machine: I enable dev mode):

imagen

Reproduction

just clone main on a Window 10 machine and run the test-serve script

System Info

npx envinfo --system --npmPackages '{vite,@vitejs/*}' --binaries --browsers

  System:
    OS: Windows 10 10.0.19044
    CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
    Memory: 41.21 GB / 63.95 GB
  Binaries:
    Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 102.0.5005.62
    Edge: Spartan (44.19041.1266.0), Chromium (101.0.1210.53)
    Internet Explorer: 11.0.19041.1566

Used Package Manager

pnpm

Logs

F:\work\projects\quini\GitHub\vite-esm-ssr-build>pnpm run test-serve

> vite-monorepo@ test-serve F:\work\projects\quini\GitHub\vite-esm-ssr-build
> vitest run -c vitest.config.e2e.ts


 RUN  v0.12.9 F:/work/projects/quini/GitHub/vite-esm-ssr-build

···-···-···-···--··--··············-····································································-········-···----······················-··························································-------··
····-···················---------····························--··x··································--------·································-····--····--···············································-·········
·······--······--······················--···················--············--·--··---

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

 FAIL  playground/preserve-symlinks/__tests__/preserve-symlinks.spec.ts > not-preserve-symlinks
AssertionError: expected '' to be 'hello vite' // Object.is equality
 ❯ playground/preserve-symlinks/__tests__/preserve-symlinks.spec.ts:10:42
      8| 
      9| test('not-preserve-symlinks', async () => {
     10|   expect(await page.textContent('#root')).toBe('hello vite')
       |                                          ^
     11| })
     12| 

  - Expected   "hello vite"
  + Received   ""

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯

Test Files  1 failed | 52 passed | 11 skipped (64)
     Tests  1 failed | 442 passed | 63 skipped (506)
      Time  20.58s (in thread 158.60s, 12.98%)

 ELIFECYCLE  Command failed with exit code 1.

Validations

@userquin
Copy link
Contributor Author

Tested also skiping that test, it is ok, only fails not-preserve-symlinks.

@sapphi-red
Copy link
Member

sapphi-red commented May 28, 2022

@userquin
Copy link
Contributor Author

Ok, I need to add that entry...

@userquin
Copy link
Contributor Author

@sapphi-red

using git clone -c core.symlinks=true https://github.com/vitejs/vite.git the test now is ok, but then I get this another one:

F:\work\projects\quini\GitHub\vite-esm-ssr-symlinks\vite>git config core.symlinks
true

the error now is on playground/worker/__tests__/es/es-worker.spec.ts:

imagen

 FAIL  playground/worker/__tests__/es/es-worker.spec.ts > build > inlined code generation
Error: ENOENT: no such file or directory, scandir 'F:\work\projects\quini\GitHub\vite-esm-ssr-symlinks\vite\playground-temp\worker\dist\es\assets'
 ❯ Object.readdirSync ../../../../../../../node:fs:1390:3
 ❯ playground/worker/__tests__/es/es-worker.spec.ts:68:21
     66|   test('inlined code generation', async () => {
     67|     const assetsDir = path.resolve(testDir, 'dist/es/assets')
     68|     const files = fs.readdirSync(assetsDir)
       |                     ^
     69|     expect(files.length).toBe(27)
     70|     const index = files.find((f) => f.includes('main-module'))

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: {
  "code": "ENOENT",
  "errno": -4058,
  "path": "F:\\work\\projects\\quini\\GitHub\\vite-esm-ssr-symlinks\\vite\\playground-temp\\worker\\dist\\es\\assets",
  "syscall": "scandir",
}
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯

Test Files  1 failed | 57 passed | 3 skipped (64)
     Tests  1 failed | 425 passed | 47 skipped (487)
      Time  22.65s (in thread 203.07s, 11.15%)

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

Vitest caught 1 unhandled error during the test run. This might cause false positive tests.
Please, resolve all the errors to make sure your tests are not affected.

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error: Errors occurred while running tests. For more information, see serialized error.
 ❯ Object.runTests ../../../../../../../file:/F:/work/projects/quini/GitHub/vite-esm-ssr-symlinks/vite/node_modules/.pnpm/vitest@0.12.9/node_modules/vitest/dist/chunk-vite-node-externalize.42b0363f.js:8250:15   
 ❯ processTicksAndRejections ../../../../../../../node:internal/process/task_queues:96:5
 ❯ async ../../../../../../../file:/F:/work/projects/quini/GitHub/vite-esm-ssr-symlinks/vite/node_modules/.pnpm/vitest@0.12.9/node_modules/vitest/dist/chunk-vite-node-externalize.42b0363f.js:10439:9
 ❯ async Vitest.runFiles ../../../../../../../file:/F:/work/projects/quini/GitHub/vite-esm-ssr-symlinks/vite/node_modules/.pnpm/vitest@0.12.9/node_modules/vitest/dist/chunk-vite-node-externalize.42b0363f.js:1044
9:12
 ❯ async Vitest.start ../../../../../../../file:/F:/work/projects/quini/GitHub/vite-esm-ssr-symlinks/vite/node_modules/.pnpm/vitest@0.12.9/node_modules/vitest/dist/chunk-vite-node-externalize.42b0363f.js:10376:5
 ❯ async startVitest ../../../../../../../file:/F:/work/projects/quini/GitHub/vite-esm-ssr-symlinks/vite/node_modules/.pnpm/vitest@0.12.9/node_modules/vitest/dist/chunk-vite-node-externalize.42b0363f.js:11112:5 
 ❯ async start ../../../../../../../file:/F:/work/projects/quini/GitHub/vite-esm-ssr-symlinks/vite/node_modules/.pnpm/vitest@0.12.9/node_modules/vitest/dist/cli.js:665:9
 ❯ async CAC.run ../../../../../../../file:/F:/work/projects/quini/GitHub/vite-esm-ssr-symlinks/vite/node_modules/.pnpm/vitest@0.12.9/node_modules/vitest/dist/cli.js:661:3

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: {
  "errors": [
    [Error: ENOENT: no such file or directory, open 'F:\work\projects\quini\GitHub\vite-esm-ssr-symlinks\vite\playground-temp\css\dist\assets\index.40015985.js'],
    [Error: ENOENT: no such file or directory, open 'F:\work\projects\quini\GitHub\vite-esm-ssr-symlinks\vite\playground-temp\worker\dist\iife\index.html'],
    [Error: ENOENT: no such file or directory, open 'F:\work\projects\quini\GitHub\vite-esm-ssr-symlinks\vite\playground-temp\worker\dist\iife-sourcemap\index.html'],
  ],
}
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
 ELIFECYCLE  Command failed with exit code 1.
ERROR: "test-build" exited with 1.
 ELIFECYCLE  Test failed. See above for more details.

@sapphi-red
Copy link
Member

@userquin That fail is flaky. Would you try running the test several times? or apply 0b054fc which will reduce flaky fails.

@userquin
Copy link
Contributor Author

@sapphi-red

closing, 0b054fc fix it, now test passing...

FYI: on my laptop (Windows 10 PRO) I need to change process.exit() on scripts/patchCJS.ts with process.exit(0), it seems plugin-legacy cannot be built: #8348 (comment)

@github-actions github-actions bot locked and limited conversation to collaborators Jun 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants