Skip to content

@sentry/solidstart withSentry breaks SolidStart aws-lambda streaming responses #20857

@miketbai

Description

@miketbai

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/solidstart

SDK Version

10.52.0

Framework Version

@solidjs/start: 1.1.0

Link to Sentry event

No response

Reproduction Example/SDK Setup

Environment

  • Runtime: AWS Lambda, Node.js 24
  • SolidStart server preset: aws-lambda
  • Lambda response streaming: enabled via server.awsLambda.streaming = true

Problem

When wrapping my SolidStart config with withSentry(...), routes deployed to AWS start returning the Lambda response object as JSON to the browser instead of the actual response body. If I comment out the lambda streaming then it works fine.

For example, a Better Auth /api/auth/get-session call returns:

{
  "statusCode": 200,
  "headers": {
    "content-type": "application/json"
  },
  "body": "{\"session\":{...},\"user\":{...}}",
  "isBase64Encoded": false
}

Steps to Reproduce

The SolidStart app.config.ts file:

import { defineConfig } from "@solidjs/start/config";
import { withSentry } from "@sentry/solidstart";

export default defineConfig(
	withSentry(
		{
			ssr: false,
			middleware: "./middleware.ts",
			server: {
				preset: "aws-lambda",
				//awsLambda: {
					//streaming: true,
				//},
			},
			vite: {
				build: {
					sourcemap: true,
				},
			},
		},
		{ org: "foo", project: "bar", authToken: process.env.SENTRY_AUTH_TOKEN },
	),
);

If you uncomment the awsLambda streaming: true then things break.

Expected Result

For example, a Better Auth /api/auth/get-session call should return:

{
  "session": { ... },
  "user": { ... }
}

Actual Result

But instead it returns the lambda wrapper like this:

{
  "statusCode": 200,
  "headers": {
    "content-type": "application/json"
  },
  "body": "{\"session\":{...},\"user\":{...}}",
  "isBase64Encoded": false
}

Additional Context

Looks like this bug has been fixed in other SDK's from this bug
But the pull request that fixes it doesn't list SolidStart as one that it fixed and is still a bug with streaming in SolidStart.

Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions