Skip to content

Bug: v19.2 fails to complete in Cloudflare Workflow #2493

@jonathanstanley

Description

@jonathanstanley

Describe the bug

I have a Cloudflare Workflow and one of the steps is to fetch data from Stripe. This worked fine through version 19.1, however on 19.2, the workflow step fails to complete in the usual 1-3 seconds.

Tracing the exact change that is causing the problem is challenging, but it could be:

  1. an un-awaited fetch response
  2. a fetch response that is never consumed
  3. possibly a conflict between bun / stripe / cloudflare workers / cloudflare workflows

To Reproduce

  1. fetch an checkout (running on a cloudflare workflow step)
 let expandedCheckout = (await stripe.checkout.sessions.retrieve(
    myCheckoutId,
    {
      expand: ["line_items", "line_items.data.price.product"],
    }
  )) 
return JSON.stringify(expandedCheckout);
  1. run when depending on 19.1 and it works.
  2. run when depending on 19.2.1 / 19.3.0, and it fails

Expected behavior

The Cloudflare workflow step should complete without timeout.

OS

cloudflare

Node version

bun 1.3.1

Library version

stripe-node v19.2.0 / 19.3.0

API version

default via const stripe = new Stripe(STRIPE_API_KEY, {});

Additional context

After a number of tests, it appears that this issue was introduced in 19.2.1. When I force the package to 19.2.0, it works well. 19.2.1 it fails.

Image

Notice that normally these complete in a couple seconds. however the tests when running 19.3 showed wall time of 10-30+ minutes.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions