[Critical Bug] fetch broken in all Checkout Extensions

Hello,

As of this morning, all of our merchants using Checkout Extensions that utilize external API access are broken with this critical error (in browser):

Error: fetch is not allowed

This is a critical bug in the Checkout Extensions system.

This means any Checkout Extensions are breaking customer checkouts if a fetch call is dependent on allowing the customer to continue through checkout.

Reproduction steps

  1. In a Checkout Extension, enable API access
  2. Perform a fetch call to any HTTP endpoint in the Checkout Extension
  3. Observe the fetch is not allowed error

This is huge issue for any Checkout Extension that also uses Buyer Journey Intercepts to block checkout until the customer performs some required action / validation by the extension.

See other partner reports here:

4 Likes

Experiencing this as well!

Our extensions are down as well

can confirm on my end

Facing the same issue. Most of our traffic is dead due to this issue

Same here. This has crippled our entire checkout process.

We’re also experiencing this.

To help anyone else Googling this - we’re finding the exception is in fetchOnBehalfOfWorker. We get the error: fetch is not allowed.

It looks as if the web worker functionality isn’t acknowledging that the permission has been set in the config, and as a result is throwing an error and blocking the request.

try {
            /*
              this error should only be surfaced if a developer attempts to
              subvert `getFetch` by postMessaging out of their extensions' web
              worker to attempt to call this directly
            */
            if (!allowNetworkAccess) {
              throw new Error('fetch is not allowed');
            }

            /*
              Don't allow the workers to read content from the iframe origin,
              https://extensions.shopifycdn.com, as this wouldn't require CORS.
            */
            if (new URL(url).origin === window.location.origin) {
              throw new Error('fetch to the iframe origin not allowed.');
            }

            if (new URL(url).protocol !== 'https:') {
              throw new Error('URL must be secure (HTTPS)');
            }
          } catch (error) {
            returnPort.postMessage({error});
            returnPort.close();
            return;
          }

the exact error in the try block is one for where the allowNetworkAccess property is set to false. something is going awry inside the webworker logic.

1 Like

Nice digging @Yosef_Grant

I wanted to double check that my app’s configuration was still set correctly.

The partner dashboard confirms my app’s extensions have network access enabled.

I also confirmed that the network_access property is enabled in the extension’s toml file.

I re-built and re-deployed just in case, but the problem still persists.

Shopify Partner Support has acknowledged that is is a known issue, but at this time shopifystatus.com still hasn’t been updated:

1 Like

Thanks for flagging folks - and for sharing examples. Our team have identified the root of the issue and are working on a fix.

1 Like

Thanks @Liam-Shopify !

I can confirm that this issue has been resolved. fetch is working once again!

1 Like