c9 / core

Cloud9 Core - Part of the Cloud9 SDK for Plugin Development https://c9.github.io/core/ https://c9.io
Other
2.56k stars 921 forks source link

[macOS] Cannot set headers after they are sent to the client #505

Open neosalmon opened 6 years ago

neosalmon commented 6 years ago

I encountered the following issue after installing c9sdk:

username@root: node server.js -p 8080 -a :
Starting standalone
Connect server listening at http://127.0.0.1:8080
CDN: version standalone initialized /Users/username/code/c9sdk/build
Started '/Users/username/code/c9sdk/configs/standalone' with config 'standalone'!
Cloud9 is up and running
cache /Users/username/code/c9sdk/build/standalone/skin/default/dark.css
_http_outgoing.js:471
    throw new ERR_HTTP_HEADERS_SENT('set');
    ^

Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    at ServerResponse.setHeader (_http_outgoing.js:471:11)
    at ServerResponse.res.setHeader (/Users/username/code/c9sdk/node_modules/connect/lib/patch.js:63:22)
    at ServerResponse.<anonymous> (/Users/username/code/c9sdk/node_modules/connect/lib/patch.js:80:14)
    at Array.forEach (<anonymous>)
    at ServerResponse.res.writeHead (/Users/username/code/c9sdk/node_modules/connect/lib/patch.js:79:28)
    at ServerResponse.res.json (/Users/username/code/c9sdk/node_modules/frontdoor/lib/middleware.js:23:17)
    at IncomingMessage.<anonymous> (/Users/username/code/c9sdk/plugins/c9.vfs.server/vfs.server.js:141:21)
    at IncomingMessage.emit (events.js:182:13)
    at resOnFinish (_http_server.js:564:7)
    at ServerResponse.emit (events.js:182:13)
jnvm commented 6 years ago

see https://github.com/c9/core/issues/496