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

fix(cloudflare): fix the node wrapper #661

Closed
wants to merge 1 commit into from
Closed

fix(cloudflare): fix the node wrapper #661

wants to merge 1 commit into from

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Dec 3, 2024

Returns the response converter from the internal event.
It fixes a "This ReadableStream did not return bytes" workerd error.

Returns the response converted from the internal event. 
It fixes a "This ReadableStream did not return bytes" workerd error.
Copy link

changeset-bot bot commented Dec 3, 2024

🦋 Changeset detected

Latest commit: 1e7be14

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@opennextjs/aws Patch
app-pages-router Patch
app-router Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Dec 3, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 22.91% 1723 / 7519
🔵 Statements 22.91% 1723 / 7519
🔵 Functions 56.04% 102 / 182
🔵 Branches 70.84% 435 / 614
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/open-next/src/overrides/wrappers/cloudflare-node.ts 0% 0% 0% 0% 1-67
Generated in workflow #800 for commit 1e7be14 by the Vitest Coverage Report Action

Copy link

pkg-pr-new bot commented Dec 3, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/@opennextjs/aws@661

commit: 1e7be14

ctx.waitUntil(handler(internalEvent, streamCreator));

return promiseResponse;
const internalResult = await handler(internalEvent, streamCreator);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may fix it, but it also means that streaming will not work.
The handler in node returns only after the response is fully sent (and the streamCreator is not useful in this case)

Maybe using a custom Writable with a custom ReadableStream would help figure out what's the issue here (or resolving the response in onWrite (this may break other things, but at least it'll help figure out what's going on here)

@vicb
Copy link
Contributor Author

vicb commented Dec 3, 2024

superseded by #664

@vicb vicb closed this Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants