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

setCookie doesn't work in awsLambda streaming #3796

Open
mckamyk opened this issue Mar 17, 2025 · 2 comments
Open

setCookie doesn't work in awsLambda streaming #3796

mckamyk opened this issue Mar 17, 2025 · 2 comments
Labels
start Everything about TanStack Start

Comments

@mckamyk
Copy link
Contributor

mckamyk commented Mar 17, 2025

Which project does this relate to?

Start

Describe the bug

Reproduction Repo

NOTE: it appears setHeader(...) works fine with this setup.

When I have the following options in my app.config.ts...

server: {
  preset: 'aws-lambda',
  awsLambda: {
    streaming: true
  }
}

setCookie doesn't work. Looking in network devtools, the response from the server function does not have set-cookie header.

I've spun up both

Your Example Website or App

https://stream-test.mckamyk.io

Steps to Reproduce the Bug or Issue

  1. Go to https://stream-test.mckamyk.io
  2. Click "Set the Cookie"
  3. the text after Cookie: on the page should update to a timestamp
  4. Check the network tools, find the POST request for the ServerFn call, there should be a set-cookie header

Expected behavior

setCookie(...) should work with preset: 'aws-lambda' and awsLambda.streaming: true

Screenshots or Videos

Image

Image

Platform

  • OS: macOS, deployed to AWS Lambda with streaming
  • Browser: Tested on Chrome, Firefox (Zen). Should affect all browsers.
  • Version: 1.114.23

Additional context

No response

@mckamyk
Copy link
Contributor Author

mckamyk commented Mar 17, 2025

I created a nitro issue, as it seems it is related to that.
nitrojs/nitro#3228

@SeanCassiere SeanCassiere added the start Everything about TanStack Start label Mar 17, 2025
@mckamyk
Copy link
Contributor Author

mckamyk commented Mar 20, 2025

I created a PR in nitro to solve this
nitrojs/nitro#3236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
start Everything about TanStack Start
Projects
None yet
Development

No branches or pull requests

2 participants