Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 7

Smee Refuses Connection to Github App

I'm using the guide to set up my development evironment here:

https://developer.github.com/apps/quickstart-guides/setting-up-your-development-environment/

 

Everything seems to work fine until I get to step 7 which says to try installing your app to see if the server is listening. When I do this, I get a connection refused error. Here is the full output:

 

smee error.PNG

I found the same problem here, but there don't seem to be any listed solutions:

https://github.com/probot/smee-client/issues/38

 

Any ideas of how to fix this?

6 Replies
Community Manager
Message 2 of 7

Re: Smee Refuses Connection to Github App

It appears that you have your destination address set incorrectly. It looks like you have it set to `http://127.0.0.1:3000C:/Program Files/Git/event_handler`, which isn't a valid URL? It looks like it is doing its best to figure it out and connects to 127.0.0.1 at port 80, but that doesn't look to be what you're wanting either.

 

I hope that helps!

Copilot Lvl 3
Message 3 of 7

Re: Smee Refuses Connection to Github App

Hi Lee, thanks for your reply!

 

I think you're right, but I haven't done something like this before so I'm not sure. Assuming that is the problem, how can I set a correct address instead? Should I change my port to 80 since it seems that is where it is looking for? I just copied the command from the guide, so that's why I set the port to 3000.

Community Manager
Message 4 of 7

Re: Smee Refuses Connection to Github App

It looks like you executed this line from the documentation incorrectly:

 

smee --url [your smee URL here] --path /event_handler --port 3000

I suspect you changed the `path` parameter value. Follow the instructions and things should work better. And no, you should use 3000 as the port number unless you're certain you need something different.

Copilot Lvl 3
Message 5 of 7

Re: Smee Refuses Connection to Github App

Thanks for your reply, Lee.

 

How did I execute that line incorrectly? I just copied and pasted it and substituted my smee url for the one given. I never changed the path parameter, but is there some way to check if it is wrong?

 

Also, I executed all of the steps from scratch again with the same result. Did I miss the point of your post, or is there something else I can try?

 

 

Community Manager
Message 6 of 7

Re: Smee Refuses Connection to Github App

It looks like perhaps whatever shell you're running on top of Windows is interpreting the parameter `/event_handler` incorrectly. Can you try executing the same command but wrap that parameter in double-quotes?

Copilot Lvl 3
Message 7 of 7

Re: Smee Refuses Connection to Github App

I'm using git bash as my shell. I tried putting it in double quotes, but with the same result:

smee --url https://smee.io/oiDHhQC2JD4jf2ya --path "/event_handler" --port 3000
Forwarding https://smee.io/oiDHhQC2JD4jf2ya to http://127.0.0.1:3000C:/Program Files/Git/event_handler
Connected https://smee.io/oiDHhQC2JD4jf2ya
{ Error: connect ECONNREFUSED 127.0.0.1:80
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 80,
  response: undefined }

I also tried the same thing on cmd. When I install the app it seems like it works correctly, and I get 200 status back, but when I uninstall the app I get an internal server error with status 500. This is the same when there are quotes or no quotes around the /event-handler parameter. This seems pretty strange to me; is there supposed to be an error after uninstalling the app?

smee --url https://smee.io/oiDHhQC2JD4jf2ya --path /event_handler --port 3000
Forwarding https://smee.io/oiDHhQC2JD4jf2ya to http://127.0.0.1:3000/event_handler
Connected https://smee.io/oiDHhQC2JD4jf2ya
POST http://127.0.0.1:3000/event_handler - 200
POST http://127.0.0.1:3000/event_handler - 200 { Error: Internal Server Error at Request.callback (C:\Users\arman\AppData\Roaming\npm\node_modules\smee-client\node_modules\superagent\lib\node\index.js:706:15) at IncomingMessage.parser (C:\Users\arman\AppData\Roaming\npm\node_modules\smee-client\node_modules\superagent\lib\node\index.js:916:18) at IncomingMessage.emit (events.js:203:15) at endReadableNT (_stream_readable.js:1145:12) at process._tickCallback (internal/process/next_tick.js:63:19) status: 500, response: Response { _events: [Object: null prototype] {}, _eventsCount: 0, _maxListeners: undefined, res: IncomingMessage { _readableState: [ReadableState], readable: false, _events: [Object], _eventsCount: 4, _maxListeners: undefined, socket: [Socket], connection: [Socket], httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: [Object], rawHeaders: [Array], trailers: {}, rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 500, statusMessage: 'Internal Server Error ', client: [Socket], _consuming: true, _dumped: false, req: [ClientRequest], text: '<!DOCTYPE html>\n<html>\n<head>\n <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>\n
...
...

Then there is a large amount of html and some further headers and statuses and stuff.