Skip to content

TypeError: Invalid state: Controller is already closed from Sentry Astro middleware #16491

Open
@jongjunpark

Description

@jongjunpark

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. Install and configure @sentry/astro in an Astro project.
import node             from '@astrojs/node';
import react            from '@astrojs/react';
import { defineConfig } from 'astro/config';
import sentry from '@sentry/astro';
import { loadEnv } from "vite";
import pkg from "./package.json";


const { PUBLIC_SENTRY_AUTH_TOKEN, PUBLIC_SENTRY_DSN } = loadEnv(process.env.NODE_ENV || 'development', process.cwd(), "");

export default defineConfig({
  integrations: [react(), sentry({
    dsn: PUBLIC_SENTRY_DSN,
    release: `io-shell@${pkg.version}`,
    sourceMapsUploadOptions: {
      project: "my-project",
      org: "my-org",
      authToken: PUBLIC_SENTRY_AUTH_TOKEN,
    },
  })],
  output: 'server',
  adapter: node({
    mode: 'standalone',
  }),
  server: {
    host: '0.0.0.0',
  },
  build: {
    assets: 'io/_astro'
  },
  experimental: {
    svg: true
  }
});
  1. Collect issues using Sentry SaaS in a deployed application.
  2. The following error keeps occurring in the server middleware of @sentry/astro:
    • TypeError: Invalid state: Controller is already closed

Expected Result

no issue in @sentry/astro

Actual Result

TypeError
Invalid state: Controller is already closed

issue from node_modules/.pnpm/@sentry+astro@9.25.1_astro@5.5.5_@types+node@22.15.3_jiti@1.21.7_rollup@4.37.0_sass@1.8_a7e017124249dc9628fe25e51673e2f3/node_modules/@sentry/astro/build/esm/server/middleware.js

Image

Product Area

Issues

Link

https://imweb-jm.sentry.io/issues/6655871353/?project=4509439058903040&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D&referrer=issue-stream&sort=freq&stream_index=0

DSN

https://ae0f622d57003e90e7b2c6a19ca18a4d@o4509241587597312.ingest.us.sentry.io/4509439058903040

Version

No response

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Waiting for: Community

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy