Skip to content

Weird failures from vitest in CI #33189

@richvdh

Description

@richvdh

https://github.com/element-hq/element-web/actions/runs/24565518207/job/71824588125 has errors like:

⎯⎯⎯⎯⎯⎯ Failed Suites 3 ⎯⎯⎯⎯⎯⎯⎯

 FAIL   unit (chromium)  src/audio/PlayPauseButton/PlayPauseButton.test.tsx [ src/audio/PlayPauseButton/PlayPauseButton.test.tsx ]
 FAIL   unit (chromium)  src/core/i18n/I18nApi.test.tsx [ src/core/i18n/I18nApi.test.tsx ]
Error: Failed to import test file /home/runner/work/element-web/element-web/packages/shared-components/src/test/setupTests.ts
Caused by: TypeError: Failed to fetch dynamically imported module: http://localhost:63315/home/runner/work/element-web/element-web/packages/shared-components/src/test/setupTests.ts?import&browserv=1776429698393
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/3]⎯

 FAIL   unit (chromium)  src/event-tiles/UrlPreviewGroupView/UrlPreviewGroupView.test.tsx [ src/event-tiles/UrlPreviewGroupView/UrlPreviewGroupView.test.tsx ]
Error: Failed to import test file /home/runner/work/element-web/element-web/packages/shared-components/src/event-tiles/UrlPreviewGroupView/UrlPreviewGroupView.test.tsx
Caused by: TypeError: Failed to fetch dynamically imported module: http://localhost:63315/home/runner/work/element-web/element-web/packages/shared-components/src/event-tiles/UrlPreviewGroupView/UrlPreviewGroupView.test.tsx?import&browserv=1776429698741
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/3]⎯

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

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

⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯
Error: Failed to run the test /home/runner/work/element-web/element-web/packages/shared-components/src/core/rich-list/RichItem/RichItem.test.tsx.
 ❯ ../../node_modules/vitest/dist/chunks/cli-api.Bxr1Nn49.js:2628:17
 ❯ processTicksAndRejections node:internal/process/task_queues:104:5

Caused by: Error: Cannot connect to the iframe. Did you change the location or submitted a form? If so, don't forget to call `event.preventDefault()` to avoid reloading the page.

Received URL: unknown due to CORS
Expected: http://localhost:63315/?sessionId=89a2cbe5-6134-4e4c-9ab9-939b907a7263&iframeId=/home/runner/work/element-web/element-web/packages/shared-components/src/core/rich-list/RichItem/RichItem.test.tsx
 ❯ iframe.onload ../../../../../../../__vitest_browser__/orchestrator-BNCEhPrv.js:169:43

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

I don't know what any of these mean, but they look like failures in the test system rather than problems with the tests themselves.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions