-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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(qwik-city): do not write into a destroyed stream #5172
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
👷 Deploy request for qwik-insights pending review.Visit the deploys page to approve it
|
tuurbo
changed the title
fix(qwik-city): do not write into a detroyed stream
fix(qwik-city): do not write into a destroyed stream
Sep 15, 2023
gioboa
added
COMP: qwik-city
STATUS-2: PR waiting for review
This PR is waiting for review and approval before merge
labels
Sep 15, 2023
Not sure if this PR fix is enough. I've been testing this PR in production and now I'm seeing error Error: write EPIPE
at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)
at WriteWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -32,
code: 'EPIPE',
syscall: 'write'
} I'm also logging addition info about the errors with res.write(chunk, (error) => {
if (error) {
console.log({
status,
closed: res.closed,
destroyed: res.destroyed,
errored: res.errored,
url: req.url,
method: req.method,
reqheaders: req.headers,
resheaders: res?.getHeaders(),
});
console.error(error);
}
}); Here is an example log {
status: 200,
closed: undefined,
destroyed: false,
errored: undefined,
url: '/search?term=redacted',
method: 'GET',
reqheaders: {...},
resheaders: {...}
} |
mhevery
approved these changes
Sep 18, 2023
kodiakhq bot
referenced
this pull request
in ascorbic/unpic-img
Sep 24, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@builder.io/qwik](https://qwik.builder.io/) ([source](https://togithub.com/BuilderIO/qwik)) | [`1.2.11` -> `1.2.12`](https://renovatebot.com/diffs/npm/@builder.io%2fqwik/1.2.11/1.2.12) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@builder.io%2fqwik/1.2.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@builder.io%2fqwik/1.2.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@builder.io%2fqwik/1.2.11/1.2.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@builder.io%2fqwik/1.2.11/1.2.12?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>BuilderIO/qwik (@​builder.io/qwik)</summary> ### [`v1.2.12`](https://togithub.com/BuilderIO/qwik/releases/tag/v1.2.12) [Compare Source](https://togithub.com/BuilderIO/qwik/compare/v1.2.11...v1.2.12) ##### What's Changed - docs: interactive resumability Demo component to place on homepage by [@​mhevery](https://togithub.com/mhevery) in [https://github.com/BuilderIO/qwik/pull/4990](https://togithub.com/BuilderIO/qwik/pull/4990) - Insights by [@​mhevery](https://togithub.com/mhevery) in [https://github.com/BuilderIO/qwik/pull/5146](https://togithub.com/BuilderIO/qwik/pull/5146) - docs: add routeAction$ caveat by [@​gioboa](https://togithub.com/gioboa) in [https://github.com/BuilderIO/qwik/pull/5147](https://togithub.com/BuilderIO/qwik/pull/5147) - fix(insight): Limit the size of data retrieved from the database by [@​mhevery](https://togithub.com/mhevery) in [https://github.com/BuilderIO/qwik/pull/5149](https://togithub.com/BuilderIO/qwik/pull/5149) - fix(insight): Limit the size of data retrieved from the database by [@​mhevery](https://togithub.com/mhevery) in [https://github.com/BuilderIO/qwik/pull/5151](https://togithub.com/BuilderIO/qwik/pull/5151) - chore(github-action): added semantic pr title check by [@​zanettin](https://togithub.com/zanettin) in [https://github.com/BuilderIO/qwik/pull/5152](https://togithub.com/BuilderIO/qwik/pull/5152) - fix(github-action): do not validate draft PRs by [@​zanettin](https://togithub.com/zanettin) in [https://github.com/BuilderIO/qwik/pull/5153](https://togithub.com/BuilderIO/qwik/pull/5153) - fix(github-action): do not validate draft PRs - revert by [@​zanettin](https://togithub.com/zanettin) in [https://github.com/BuilderIO/qwik/pull/5155](https://togithub.com/BuilderIO/qwik/pull/5155) - docs: Add expobeds.com to the showcase by [@​ilianiv](https://togithub.com/ilianiv) in [https://github.com/BuilderIO/qwik/pull/5159](https://togithub.com/BuilderIO/qwik/pull/5159) - chore: Update 🐼 PandaCSS integration dev dependency by [@​mrhoodz](https://togithub.com/mrhoodz) in [https://github.com/BuilderIO/qwik/pull/5156](https://togithub.com/BuilderIO/qwik/pull/5156) - feat: leaflet map integration adapter by [@​anartzdev](https://togithub.com/anartzdev) in [https://github.com/BuilderIO/qwik/pull/5158](https://togithub.com/BuilderIO/qwik/pull/5158) - fix: Ignore blob URL on getting image info by [@​genki](https://togithub.com/genki) in [https://github.com/BuilderIO/qwik/pull/5150](https://togithub.com/BuilderIO/qwik/pull/5150) - docs(qwik-city): correct the links to endpoints page by [@​wtlin1228](https://togithub.com/wtlin1228) in [https://github.com/BuilderIO/qwik/pull/5167](https://togithub.com/BuilderIO/qwik/pull/5167) - docs(qwik-city): add validators by [@​wtlin1228](https://togithub.com/wtlin1228) in [https://github.com/BuilderIO/qwik/pull/5166](https://togithub.com/BuilderIO/qwik/pull/5166) - fix: Bun install by [@​EamonHeffernan](https://togithub.com/EamonHeffernan) in [https://github.com/BuilderIO/qwik/pull/5165](https://togithub.com/BuilderIO/qwik/pull/5165) - docs(qwik): Fixed Link by [@​pipisso](https://togithub.com/pipisso) in [https://github.com/BuilderIO/qwik/pull/5169](https://togithub.com/BuilderIO/qwik/pull/5169) - fix(qwik-city): Fix rewrite home route by [@​claudioshiver](https://togithub.com/claudioshiver) in [https://github.com/BuilderIO/qwik/pull/5168](https://togithub.com/BuilderIO/qwik/pull/5168) - docs: use import .css?inline instead of .css by [@​sapphi-red](https://togithub.com/sapphi-red) in [https://github.com/BuilderIO/qwik/pull/5161](https://togithub.com/BuilderIO/qwik/pull/5161) - fix(core.d.ts): export HTMLAttributes and DevJSX to fix TS4023 issue … by [@​gparlakov](https://togithub.com/gparlakov) in [https://github.com/BuilderIO/qwik/pull/5141](https://togithub.com/BuilderIO/qwik/pull/5141) - fix: excludedPath defaults for netlify edge by [@​adamdbradley](https://togithub.com/adamdbradley) in [https://github.com/BuilderIO/qwik/pull/5163](https://togithub.com/BuilderIO/qwik/pull/5163) - fix(labs): filter out (group layouts) by [@​mhevery](https://togithub.com/mhevery) in [https://github.com/BuilderIO/qwik/pull/5171](https://togithub.com/BuilderIO/qwik/pull/5171) - feat(core): added symbol name to error by [@​shairez](https://togithub.com/shairez) in [https://github.com/BuilderIO/qwik/pull/5182](https://togithub.com/BuilderIO/qwik/pull/5182) - feat: Bun Adapter by [@​EamonHeffernan](https://togithub.com/EamonHeffernan) in [https://github.com/BuilderIO/qwik/pull/5129](https://togithub.com/BuilderIO/qwik/pull/5129) - fix(qwik-auth): don't overwrite response headers in qwik auth by [@​Aslemammad](https://togithub.com/Aslemammad) in [https://github.com/BuilderIO/qwik/pull/5180](https://togithub.com/BuilderIO/qwik/pull/5180) - docs(qwik-city): Clean up docs for bun adapter by [@​EamonHeffernan](https://togithub.com/EamonHeffernan) in [https://github.com/BuilderIO/qwik/pull/5185](https://togithub.com/BuilderIO/qwik/pull/5185) - chore(qwik-auth): v0.1.2 by [@​mhevery](https://togithub.com/mhevery) in [https://github.com/BuilderIO/qwik/pull/5186](https://togithub.com/BuilderIO/qwik/pull/5186) - docs: added firebase to menu.md by [@​the-r3aper7](https://togithub.com/the-r3aper7) in [https://github.com/BuilderIO/qwik/pull/5183](https://togithub.com/BuilderIO/qwik/pull/5183) - chore: release 1.2.12 by [@​mhevery](https://togithub.com/mhevery) in [https://github.com/BuilderIO/qwik/pull/5187](https://togithub.com/BuilderIO/qwik/pull/5187) - chore: update Prisma versions package.json by [@​ruheni](https://togithub.com/ruheni) in [https://github.com/BuilderIO/qwik/pull/5184](https://togithub.com/BuilderIO/qwik/pull/5184) - docs: fix routing page - add missing attributes. by [@​hamatoyogi](https://togithub.com/hamatoyogi) in [https://github.com/BuilderIO/qwik/pull/5188](https://togithub.com/BuilderIO/qwik/pull/5188) - fix(qwik-city): do not write into a destroyed stream by [@​tuurbo](https://togithub.com/tuurbo) in [https://github.com/BuilderIO/qwik/pull/5172](https://togithub.com/BuilderIO/qwik/pull/5172) - fix(qwik-city): wait until action fully complete before resolving its… by [@​mhevery](https://togithub.com/mhevery) in [https://github.com/BuilderIO/qwik/pull/5190](https://togithub.com/BuilderIO/qwik/pull/5190) ##### New Contributors - [@​ilianiv](https://togithub.com/ilianiv) made their first contribution in [https://github.com/BuilderIO/qwik/pull/5159](https://togithub.com/BuilderIO/qwik/pull/5159) - [@​pipisso](https://togithub.com/pipisso) made their first contribution in [https://github.com/BuilderIO/qwik/pull/5169](https://togithub.com/BuilderIO/qwik/pull/5169) - [@​sapphi-red](https://togithub.com/sapphi-red) made their first contribution in [https://github.com/BuilderIO/qwik/pull/5161](https://togithub.com/BuilderIO/qwik/pull/5161) - [@​Aslemammad](https://togithub.com/Aslemammad) made their first contribution in [https://github.com/BuilderIO/qwik/pull/5180](https://togithub.com/BuilderIO/qwik/pull/5180) **Full Changelog**: QwikDev/qwik@v1.2.11...v1.2.12 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 9pm on sunday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ascorbic/unpic-img). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi45Ny4xIiwidXBkYXRlZEluVmVyIjoiMzYuOTcuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
COMP: qwik-city
STATUS-2: PR waiting for review
This PR is waiting for review and approval before merge
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
What is it?
Description
Check if the response is already destroyed similar to checking if the response is closed.
PR #5074 fixed some of the
Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed
errors but sometimesclosed
is undefined anddestroyed
is true.If checking for
destroyed
, I don't know if that makes checking forclosed
redundant so I kept theclosed
check.Use cases and why
Checklist: