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

ERR_INVALID_CALLBACK & ERR_HTTP_HEADERS_SENT on Nodjs10.X #150

Closed
Smax2k opened this issue Aug 21, 2018 · 2 comments
Closed

ERR_INVALID_CALLBACK & ERR_HTTP_HEADERS_SENT on Nodjs10.X #150

Smax2k opened this issue Aug 21, 2018 · 2 comments
Labels

Comments

@Smax2k
Copy link

Smax2k commented Aug 21, 2018

Hello,

I love your app but is not working on my vps on Debian 8 (nodejs 10.x) when i add a torrent.

Server : http://91.134.122.218:9000/

Errors :

`Listening on http://localhost:9000
previous state not found
GET /torrents 304 5.307 ms - -
adding b3a61bdaf92821d3f8ab7772fb66b2550ffa796c
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at makeCallback (fs.js:135:11)
at Object.unlink (fs.js:903:14)
at /usr/lib/node_modules/peerflix-server/server/index.js:91:8
at /usr/lib/node_modules/peerflix-server/server/store.js:52:9
at /usr/lib/node_modules/peerflix-server/node_modules/read-torrent/index.js:18:13
at process._tickCallback (internal/process/next_tick.js:61:11)
_http_outgoing.js:470
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:470:11)
at ServerResponse.res.setHeader (/usr/lib/node_modules/peerflix-server/node_modules/connect/lib/patch.js:134:22)
at ServerResponse.res.set.res.header (/usr/lib/node_modules/peerflix-server/node_modules/express/lib/response.js:595:10)
at ServerResponse.res.send (/usr/lib/node_modules/peerflix-server/node_modules/express/lib/response.js:151:12)
at ServerResponse.res.json (/usr/lib/node_modules/peerflix-server/node_modules/express/lib/response.js:237:15)
at ServerResponse.res.send (/usr/lib/node_modules/peerflix-server/node_modules/express/lib/response.js:139:21)
at /usr/lib/node_modules/peerflix-server/server/index.js:87:11
at /usr/lib/node_modules/peerflix-server/server/store.js:54:9
at /usr/lib/node_modules/peerflix-server/node_modules/read-torrent/index.js:18:13
at process._tickCallback (internal/process/next_tick.js:61:11)
`

@asapach asapach added the bug label Aug 21, 2018
@asapach
Copy link
Owner

asapach commented Aug 21, 2018

Looks like a compatibility problem with Node 10. I'll take a look at it over the weekend. In the meantime you can try downgrading to Node 8.

@Smax2k Smax2k changed the title ERR_INVALID_CALLBACK & ERR_HTTP_HEADERS_SENT ERR_INVALID_CALLBACK & ERR_HTTP_HEADERS_SENT on Nodjs10.X Aug 21, 2018
@Smax2k
Copy link
Author

Smax2k commented Aug 21, 2018

Ok thank you is working now !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants