#Ryan Montgomery

1 messages ยท Page 1 of 1 (latest)

minor portalBOT
astral ether
#

Hello, what exactly is refusing the connection? Are events getting to your server and it is responding with that?

green wharf
#

dial tcp: lookup myapp.dev on 192.168.1.254:53: read udp 192.168.1.95:57008->192.168.1.254:53: i/o timeout

#

This is what I'm getting back from the Stripe CLI:

#
[ERROR] Failed to POST: Post "https://myapp.dev/stripe/events": dial tcp: lookup myapp.dev on 192.168.1.254:53: read udp 192.168.1.95:57008->192.168.1.254:53: i/o timeout
#
curl -X POST https://myapp.dev/stripe/events

This curl returns the page I expect.

#

It's an error Stripe::SignatureVerificationError but that's expected because I'm not sending the signing header.

#

But it connects

astral ether
#

Do you see any traffic at your myapp.dev server or does this seem to be timing out before you even get that?

green wharf
#

There is no traffic on the server. It times out before that.

#

(thanks for responding so quickly and helping me troubleshoot this btw, that's really awesome of you)

astral ether
#

Gotcha, thanks for checking. I will reach out to a colleague for help here, will get back to you soon

next fossil
#

Hi ๐Ÿ‘‹
This may seem kind of silly but can you try appending a / to your forward-to URL?

#

Also, just to confirm, this URL is running locally on your dev box, correct?

green wharf
#

yes this is running locally and I will give that try

#
stripe listen --forward-to https://myapp.dev/stripe/events/ --skip-verify
next fossil
#

Just to be clear, I mean https://myapp.dev/stripe/events/. Some web frameworks don't like POST requests that don't end in a / by default

green wharf
#
Failed to POST: Post "https://myapp.dev/stripe/events/": dial tcp 23.202.231.169:443: connect: connection refused
#

๐Ÿค”

next fossil
#

Damn.

#

Let me try on my integration. I have it served on an HTTPS URL but also locahost. I normally run the stripe listen command with the localhost URL

green wharf
#

Yeah I was going to try that next. We use puma-dev to run our app locally and so we can test things like subdomains.

next fossil
#

I was successful in mapping my own local dev to an https: route. I would try using the localhost address and, if you are still hitting this error, I think you may need to review any security rules that might refuse connections.

green wharf
#

Ok. Thank you. I'll try localhost and see what they produces.

#

If it's helpful to anyone on the dev team I was able to get ngrok to work with our local server running puma-dev.

#

With puma-dev apparently host-header needs to be set. ngrok http --host-header=myapp.dev 443

#

I also see in the ngrok logs reconnecting (context deadline exceeded) but then a second later it fixes itself and connects fine.

astral ether
#

Nice! Glad you could get that config working and thanks for sharing