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

Server shutdown with "Error: Can't set headers after they are sent." #937

Closed
LavrovArtem opened this issue Nov 14, 2016 · 4 comments
Closed
Labels
AREA: server STATE: Auto-locked Issues that were automatically locked by the Lock bot TYPE: bug
Milestone

Comments

@LavrovArtem
Copy link
Contributor

Reproducing on https://e.mail.ru/messages/inbox/
The fatalError event emits two times.
First stack:

    at RequestPipelineContext.closeWithError (d:\Projects\testcafe-hammerhead\lib\request-pipeline\context.js:268:44)
    at error (d:\Projects\testcafe-hammerhead\lib\request-pipeline\index.js:264:85)
    at DestinationRequest.<anonymous> (d:\Projects\testcafe-hammerhead\lib\request-pipeline\index.js:95:24)
    at emitOne (events.js:77:13)
    at DestinationRequest.emit (events.js:169:7)
    at DestinationRequest._onError (d:\Projects\testcafe-hammerhead\lib\request-pipeline\destination-request\index.js:184:46)
    at ClientRequest.<anonymous> (d:\Projects\testcafe-hammerhead\lib\request-pipeline\destination-request\index.js:103:31)
    at emitOne (events.js:77:13)
    at ClientRequest.emit (events.js:169:7)
    at TLSSocket.socketCloseListener (_http_client.js:235:9)

Second stack:

    at RequestPipelineContext.closeWithError (d:\Projects\testcafe-hammerhead\lib\request-pipeline\context.js:268:44)
    at error (d:\Projects\testcafe-hammerhead\lib\request-pipeline\index.js:264:85)
    at DestinationRequest.<anonymous> (d:\Projects\testcafe-hammerhead\lib\request-pipeline\index.js:95:24)
    at emitOne (events.js:77:13)
    at DestinationRequest.emit (events.js:169:7)
    at DestinationRequest._onTimeout (d:\Projects\testcafe-hammerhead\lib\request-pipeline\destination-request\index.js:176:18)
    at ClientRequest.<anonymous> (d:\Projects\testcafe-hammerhead\lib\request-pipeline\destination-request\index.js:106:31)
    at ClientRequest.g (events.js:260:16)
    at emitNone (events.js:67:13)
    at ClientRequest.emit (events.js:166:7)
@LavrovArtem
Copy link
Contributor Author

I'm working on this

@inikulin
Copy link
Contributor

@LavrovArtem Node throws this error when you try to modify response headers once you already started sending the body

@LavrovArtem
Copy link
Contributor Author

@inikulin I know

LavrovArtem added a commit to LavrovArtem/testcafe-hammerhead that referenced this issue Nov 15, 2016
LavrovArtem added a commit to LavrovArtem/testcafe-hammerhead that referenced this issue Nov 15, 2016
LavrovArtem added a commit to LavrovArtem/testcafe-hammerhead that referenced this issue Nov 15, 2016
LavrovArtem added a commit to LavrovArtem/testcafe-hammerhead that referenced this issue Nov 15, 2016
AndreyBelym pushed a commit to AndreyBelym/testcafe-hammerhead that referenced this issue Feb 28, 2019
@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked Issues that were automatically locked by the Lock bot label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AREA: server STATE: Auto-locked Issues that were automatically locked by the Lock bot TYPE: bug
Projects
None yet
Development

No branches or pull requests

2 participants