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

Astro 4 e2e tests seems to fail for astro 4.16.17+ #14808

Closed
AbhiPrasad opened this issue Dec 19, 2024 · 4 comments · Fixed by #14816
Closed

Astro 4 e2e tests seems to fail for astro 4.16.17+ #14808

AbhiPrasad opened this issue Dec 19, 2024 · 4 comments · Fixed by #14816
Assignees
Labels
Package: astro Issues related to the Sentry Astro SDK Type: Tests

Comments

@AbhiPrasad
Copy link
Member

Description

Run pnpm test:assert

> [email protected] test:assert /home/runner/work/sentry-javascript/sentry-javascript/dev-packages/e2e-tests/test-applications/astro-4
> TEST_ENV=production playwright test

[WebServer] file:///home/runner/work/sentry-javascript/sentry-javascript/dev-packages/e2e-tests/test-applications/astro-4/dist/server/chunks/astro/server_DdL2CNCh.mjs:1509
[WebServer]   return crypto.subtle.importKey("raw", bytes, ALGORITHM, true, ["encrypt", "decrypt"]);
[WebServer]   ^
[WebServer] 
[WebServer] ReferenceError: crypto is not defined
[WebServer]     at decodeKey (file:///home/runner/work/sentry-javascript/sentry-javascript/dev-packages/e2e-tests/test-applications/astro-4/dist/server/chunks/astro/server_DdL2CNCh.mjs:1509:3)
[WebServer]     at deserializeManifest (file:///home/runner/work/sentry-javascript/sentry-javascript/dev-packages/e2e-tests/test-applications/astro-4/dist/server/manifest_DXb43Qdu.mjs:82:15)
[WebServer]     at file:///home/runner/work/sentry-javascript/sentry-javascript/dev-packages/e2e-tests/test-applications/astro-4/dist/server/manifest_DXb43Qdu.mjs:99:18
[WebServer]     at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
[WebServer]     at async ModuleLoader.import (node:internal/modules/esm/loader:337:24)
[WebServer]     at async loadESM (node:internal/process/esm_loader:34:7)

[WebServer]     at async handleMainPromise (node:internal/modules/run_main:106:12)
[WebServer] 
[WebServer] Node.js v18.20.5
Error: Process from config.webServer was not able to start. Exit code: 1

Seems like this is an actual error?

Raised in:

@AbhiPrasad AbhiPrasad added Package: astro Issues related to the Sentry Astro SDK Type: Tests labels Dec 19, 2024
@Lms24 Lms24 self-assigned this Dec 20, 2024
@Lms24
Copy link
Member

Lms24 commented Dec 20, 2024

An initial bisection search shows that things seem to break in version 4.13.4. We tested with 4.13.3 (coincidence?) I wonder though why this wasn't reported yet. Seems to be a version which has been out there for quite some time...

@Lms24
Copy link
Member

Lms24 commented Dec 20, 2024

(coincidence?)

Doesn't look like it: #14030

@Lms24
Copy link
Member

Lms24 commented Dec 20, 2024

Ok this doesn't actually seem to be related to Sentry. Even if I completely remove Sentry and Spotlight from the e2e test app and only upgrade it to 4.13.4, it's still breaking. That's good news but will continue digging what's going on with the app itself

@Lms24
Copy link
Member

Lms24 commented Dec 20, 2024

Root cause and fix in #14816

Lms24 added a commit that referenced this issue Dec 20, 2024
In our Astro-4 E2E test app, Astro's Node adapter was pinned to a bad
version that didn'T work correctly with newer Astro versions. We pinned
the Astro version a while ago in
#14030 to unblock CI
but looks like we just didn't follow up with investigating what caused
the issue back then.

This came up again when dependabot tried to bump the Astro version in
#14781 and #14807 and as a result #14808 was opened.

This PR now 
- bumps the Node adapter version which makes newer Astro version
function properly again
- updates `astro` to the latest v4 version (which is why I closed
#14807)

closes #14808
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: astro Issues related to the Sentry Astro SDK Type: Tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants