stripe/stripe-cli

Docker container crashes when listening for webhooks

Closed this issue · 6 comments

I'm running stripe-cli from docker compose without version specified, so when I updated the image from 1.19.2 to 1.19.3, it stopped working with a weird error:

Checking for new versions...
Getting ready...
time=“Wed, 27 Mar 2024 11:39:36 UTC” level=fatal msg=“Error while authenticating with Stripe: Post “https://api.stripe.com/v1/stripecli/sessions”: context canceled”

This is how I use it inside docker-compose

services:
    stripe:
        image: stripe/stripe-cli
        container_name: stripe-webhooks
        command: listen --api-key <api-key> --forward-to http://host.docker.internal:10220/api/stripe/webhook

Issue

The whole container crashes when trying to listen for webhook events using the --api-key argument. When triggering events with the same --api-key argument, it works. So the problem is probably only for webhooks?

When running the same stripe-cli listen command inside my macOS terminal, it works.

Expected Behavior

I'm expecting the container to start up without crashing, and listen to webhooks, as it works on 1.19.2

Steps to reproduce

Use the stripe/stripe-cli:1.19.3 image in docker and run the listen command with api key argument on startup. This crahes the whole container with the message shown above. It should start the stripe-cli, show the webhook signing secret and forward the webhooks

Traceback

Using --log-level debug:

2024-03-27 13:38:12 Checking for new versions...
2024-03-27 13:38:12 
2024-03-27 13:38:12 time="Wed, 27 Mar 2024 12:38:12 UTC" level=debug msg="Authenticating with Stripe..." prefix=stripeauth.client.Authorize
2024-03-27 13:38:12 Getting ready...
2024-03-27 13:38:12 
2024-03-27 13:38:12 time="Wed, 27 Mar 2024 12:38:12 UTC" level=fatal msg="Error while authenticating with Stripe: Post "https://api.stripe.com/v1/stripecli/sessions": context canceled"

Environment

macOS

@davidprokopec I am also experiencing this error with the latest docker image, I have downgraded to 1.19.2 to fix it temporarily

It appears to at least be related to #1155 (@ianjabour-stripe )

spent the past few hours debugging and it looks like I'm not the only one. This broke on 1.19.3 and it works when i downgraded too to 1.19.2

Hi all! Sorry for the trouble, we'll revert that PR and run a new release shortly.

Oops Github automatically closed this. We just released 1.19.4 with a revert, let us know if things look like they're working again!

@tomer-stripe thanks for quick turnaround