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

Process dies when running with https after http request #10

Closed
alecalve opened this issue Sep 3, 2018 · 4 comments
Closed

Process dies when running with https after http request #10

alecalve opened this issue Sep 3, 2018 · 4 comments
Labels
bug Something isn't working

Comments

@alecalve
Copy link

alecalve commented Sep 3, 2018

$ spark-wallet -i 0.0.0.0
...
HTTPS server running on https://0.0.0.0:9737

running this in another term:

$ curl http://localhost:9737
curl: (52) Empty reply from server

Logs are:

uncaughtException, stopping process                 
TypeError: ParserIncomingMessage is not a constructor                                                    
    at HTTPParser.parserOnHeadersComplete (_http_common.js:81:21)                                        
    at socketOnData (_http_server.js:472:20)        
    at Socket.emit (events.js:180:13)               
    at Socket.Readable.read (_stream_readable.js:487:10)                                                 
    at flow (_stream_readable.js:858:34)            
    at resume_ (_stream_readable.js:840:3)          
    at process._tickCallback (internal/process/next_tick.js:178:19) 
@alecalve alecalve changed the title Process dies when running with https after http request on GET / happens Process dies when running with https after http request Sep 3, 2018
@shesek
Copy link
Owner

shesek commented Sep 3, 2018

Ugh. This is probably related to 62798ca.

Which version of nodejs are you running? Are you able to access the server using https://?

@shesek shesek added the bug Something isn't working label Sep 3, 2018
@alecalve
Copy link
Author

alecalve commented Sep 3, 2018

https:// works fine.

$ node -v
v9.11.2

@shesek shesek closed this as completed in 13c2bff Sep 3, 2018
@shesek
Copy link
Owner

shesek commented Sep 3, 2018

Looks like this was broken due to some changes introduced in node v9.6. 13c2bff should fix this. Can you run from master and confirm this works?

$ git clone https://github.com/shesek/spark-wallet && cd spark-wallet \
  && npm install && npm start -- --host 0.0.0.0

@shesek shesek reopened this Sep 3, 2018
@alecalve
Copy link
Author

alecalve commented Sep 4, 2018

It does! Thanks for the quick fix.

@alecalve alecalve closed this as completed Sep 4, 2018
shesek added a commit that referenced this issue Sep 6, 2018
Make sure to set `socket.server` to the appropriate server handler before delegating.

This became required as of node v9.6, due to the changes introduced in nodejs/node@c247cb0

Fixes #10.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants