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

Can't set headers after they are sent. #76

Closed
defel opened this Issue Nov 2, 2012 · 14 comments

Comments

Projects
None yet
6 participants
@defel

defel commented Nov 2, 2012

Hi,

this is the error I get, after I installed testem with npm and startet it on the cli: Can't set headers after they are sent.

Stacktrace:

http.js:644
    throw new Error('Can\'t set headers after they are sent.');
          ^
Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (http.js:644:11)
    at ServerResponse.res.setHeader (/usr/local/lib/node_modules/testem/node_modules/express/node_modules/connect/lib/patch.js:62:20)
    at exports.send (/usr/local/lib/node_modules/testem/node_modules/express/node_modules/connect/lib/middleware/static.js:168:11)
    at Object.oncomplete (fs.js:308:15)
    at process.startup.processMakeCallback.process._makeCallback (node.js:248:20)

Steps to reproduce:

  • sudo npm install testem -g
  • cd /tmp && mkdir test && cd test
  • testem -l firefox
  • => new tab is created, blank page, stacktrace is displayed
  • or:
  • testem
  • => then I open http://localhost:7357/ in the browser and the exception is immediately displayed in the console, and a blank page in the browser

Test with testem 0.2.23 and 0.2.24.

I have no idea what's wrong.

@airportyh

This comment has been minimized.

Show comment
Hide comment
@airportyh

airportyh Nov 3, 2012

Collaborator

I am not able to reproduce. What OS, node version, and what express version? Try npm ls -g to determine express version.

Collaborator

airportyh commented Nov 3, 2012

I am not able to reproduce. What OS, node version, and what express version? Try npm ls -g to determine express version.

@defel

This comment has been minimized.

Show comment
Hide comment
@defel

defel Nov 6, 2012

OS: Linux 3.0.0-23-generic x86_64
Node: v0.9.2
express: @2.5.10

I experimented with different express-versions, but didnt get a testem-version running. I will checkout from trunk as next, had installed the current version per npm install -g.

defel commented Nov 6, 2012

OS: Linux 3.0.0-23-generic x86_64
Node: v0.9.2
express: @2.5.10

I experimented with different express-versions, but didnt get a testem-version running. I will checkout from trunk as next, had installed the current version per npm install -g.

@davemo

This comment has been minimized.

Show comment
Hide comment
@davemo

davemo Nov 6, 2012

Contributor

I'd be interested in seeing if this occurs on the latest stable release of node which is 0.8.14.

Contributor

davemo commented Nov 6, 2012

I'd be interested in seeing if this occurs on the latest stable release of node which is 0.8.14.

@defel

This comment has been minimized.

Show comment
Hide comment
@defel

defel Nov 6, 2012

Ok, works with node v0.8.14!

Thanks for the hint ;)

defel commented Nov 6, 2012

Ok, works with node v0.8.14!

Thanks for the hint ;)

@davemo

This comment has been minimized.

Show comment
Hide comment
@davemo

davemo Nov 6, 2012

Contributor

@defel You're welcome! In general I try and avoid the bleeding edge releases of node; they are always mucking stuff up with core API's in unpredictable ways :)

Contributor

davemo commented Nov 6, 2012

@defel You're welcome! In general I try and avoid the bleeding edge releases of node; they are always mucking stuff up with core API's in unpredictable ways :)

@airportyh airportyh closed this Nov 7, 2012

@jboesch

This comment has been minimized.

Show comment
Hide comment
@jboesch

jboesch Mar 12, 2013

I would re-open this issue. I've been using testem successfully with node 0.8.14 and decided to update to the latest 0.10 version of node. I also updated testem too. Now I get:

Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (http.js:708:11)
at ServerResponse.res.setHeader (/usr/local/lib/node_modules/testem/node_modules/express/node_modules/connect/lib/patch.js:62:20)
at next (/usr/local/lib/node_modules/testem/node_modules/express/node_modules/connect/lib/http.js:171:13)
at /usr/local/lib/node_modules/testem/node_modules/express/node_modules/connect/lib/middleware/static.js:150:11
at Object.oncomplete (fs.js:93:15)

jboesch commented Mar 12, 2013

I would re-open this issue. I've been using testem successfully with node 0.8.14 and decided to update to the latest 0.10 version of node. I also updated testem too. Now I get:

Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (http.js:708:11)
at ServerResponse.res.setHeader (/usr/local/lib/node_modules/testem/node_modules/express/node_modules/connect/lib/patch.js:62:20)
at next (/usr/local/lib/node_modules/testem/node_modules/express/node_modules/connect/lib/http.js:171:13)
at /usr/local/lib/node_modules/testem/node_modules/express/node_modules/connect/lib/middleware/static.js:150:11
at Object.oncomplete (fs.js:93:15)

@dastagg

This comment has been minimized.

Show comment
Hide comment
@dastagg

dastagg Mar 12, 2013

I can confirm this. I am seeing the same thing after moving from 0.8.20 to 0.10.0.

dastagg commented Mar 12, 2013

I can confirm this. I am seeing the same thing after moving from 0.8.20 to 0.10.0.

@airportyh

This comment has been minimized.

Show comment
Hide comment
@airportyh

airportyh Mar 13, 2013

Collaborator

Dup of #179

Collaborator

airportyh commented Mar 13, 2013

Dup of #179

@airportyh

This comment has been minimized.

Show comment
Hide comment
@airportyh

airportyh Apr 25, 2013

Collaborator

It was 78325ce, published in version 0.2.74. Which version of node and OS?

Collaborator

airportyh commented Apr 25, 2013

It was 78325ce, published in version 0.2.74. Which version of node and OS?

@coderberry

This comment has been minimized.

Show comment
Hide comment
@coderberry

coderberry May 10, 2013

I am seeing the same error.

OSX 10.8.3
Node: v0.10.5

coderberry commented May 10, 2013

I am seeing the same error.

OSX 10.8.3
Node: v0.10.5

@airportyh

This comment has been minimized.

Show comment
Hide comment
@airportyh

airportyh May 11, 2013

Collaborator

I don't have OSX 10.8.3, only 10.7.5. Tested on Node 0.10.5 but could not reproduce. Are you getting this on the simplest examples?

Collaborator

airportyh commented May 11, 2013

I don't have OSX 10.8.3, only 10.7.5. Tested on Node 0.10.5 but could not reproduce. Are you getting this on the simplest examples?

@airportyh airportyh reopened this May 11, 2013

@coderberry

This comment has been minimized.

Show comment
Hide comment
@coderberry

coderberry May 20, 2013

I am. If I run testem in any folder and open up the url http://localhost:7357. It appears that the reason for the failure is that it cannot access the scripts.

Screenshots:

screen shot 2013-05-20 at 11 52 12 am

screen shot 2013-05-20 at 11 51 13 am

coderberry commented May 20, 2013

I am. If I run testem in any folder and open up the url http://localhost:7357. It appears that the reason for the failure is that it cannot access the scripts.

Screenshots:

screen shot 2013-05-20 at 11 52 12 am

screen shot 2013-05-20 at 11 51 13 am

@defel

This comment has been minimized.

Show comment
Hide comment
@defel

defel May 20, 2013

@cavneb this is definitly an other bug. please open a new bug-report.

defel commented May 20, 2013

@cavneb this is definitly an other bug. please open a new bug-report.

@coderberry

This comment has been minimized.

Show comment
Hide comment
@coderberry

coderberry commented May 24, 2013

New ticket: #217

@airportyh airportyh closed this Jun 20, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment