[Bug]: Randomly getting ExtensionUsageError which doesn't go away

Has anyone seen this kind of error and found a solution for it? For context:

  • It shows up randomly in dev / production across different apps
  • It’s produced even when I return a completely empty extension (screenshot 2)
  • Re-deploying, re-installing dependencies, installing on a fresh store, different node versions, etc, doesn’t seem to help
  • It’s also reproducible across different devices / users

I get either this one (ExtensionUsageError: NetworkError), or a variant (ExtensionUsageError: TypeError: cannot read properties of undefined) in different scenarios and I have no context on how to fix it. Any help is appreciated!


Hi @sid

I’m also unfortunately facing the same error at my end as mentioned on Slack on the checkout-extensions channel.

I hope someone’s able to work out a fix / help with this specific issue.

Regards

Hi folks - thanks for flagging this, have connected with the checkout team to investigate this issue.

1 Like

Thanks Liam!

For further reference, I eventually managed to get this to work by deleting and recreating the extension - with no code-facing changes. Also interestingly, while I’d tried this before, it just happened to work when I tried it again later.

While I got lucky with this particular instance, it was still a major blocker for our team which occured randomly, so it would be great to understand the cause here. Happy to share any details you might need to help with this!

Hi @sid,

We’d like to investigate the issue (ExtensionUsageError: NetworkError). This would indicate there is a problem downloading and executing your extension code.

While a ExtensionUsageError: TypeError would likely indicate a separate issue where a runtime exception is occurring within the extension itself. - such as trying to access a property that doesn’t exist.

Unfortunately, we weren’t able to reproduce your issue using the extension code you provided.

Can you share what version of the API (in your TOML config) and the version of the ui-extensions package you are using? Is there a shop we can view your extension on?

Hi @James_Vidler,

I agree ExtensionUsageError: TypeError usually pops up from logical errors in the code, in this case I believe it refused to go away because of the NetworkError (maybe because the fixed code was never being deployed back to Shopify?)

I’m using api_version = "2025-01" in my extension TOML, and tested against api_version = "2024-10" as well, to no avail. My dependencies looks like this: "@shopify/ui-extensions": "2025.1.x", "@shopify/ui-extensions-react": "2025.1.x" (also backtested against 2024-10).

Since recreating the extension, I haven’t had this issue yet, so unfortunately I don’t have a store to share right now. Though I can confirm that this particular version of my extension was facing this issue (not sure if I can share this in a better way?).

Additional note: The error says “the script at … failed to load”, however, clicking on the link downloaded the extension file correctly in the browser. There were no errors in the network panel either.

Please do let me know if there’s any other information I can share to help debug this!

Hey @James_Vidler, bumping this up,

We have this issue resurfacing again today (again randomly, with 0 changes to the code since the last working version)

You can see the same error on this checkout in our dev store.

Also, here’s a link to the extension which is failing as well.

We’ve tried to delete and recreate the extension, to no avail this time. This is currently a problem we are facing with no tools to debug, please let us know if there’s something that can be done!

Hi @sid,

I was able to reproduce a different error on your shop, not the network error you mentioned.

The error appears to be occurring from react/react-reconciler from within the extension code. Could your package.json to illustrate your extension’s dependancies? It could be related to an incompatibility.

Do you get the same error when you run the extension locally?

1 Like

Hi @James_Vidler , here’s the extension’s package.json file’s contents.

{
  "name": "discount-auto-add-item",
  "private": true,
  "version": "1.0.0",
  "license": "UNLICENSED",
  "dependencies": {
    "react": "^18.3.1",
    "@shopify/ui-extensions": "2025.1.x",
    "@shopify/ui-extensions-react": "2025.1.x",
    "react-reconciler": "0.31.0"
  },
  "devDependencies": {
    "@types/react": "^18.3.18"
  }
}

Do you get the same error when you run the extension locally?

Yes, we get the same error when running locally as well.

Hi @James_Vidler, wanted to check in and see if we had any updates on this?

We’ve merchants reporting in about the issue and would need to give them a resolution on priority as they depend on this extension’s functionality greatly.

I’ve also gone ahead and raised a support ticket with the partner API team - ID 55027579 that you can reference at your side.

Looking forward to hearing back soon.

Thanks

Hello Team Shopify, I am a plus member, and facing alot of issues because of the bug in this functionality. I urge you to please look into this matter ASAP and get it fixed as it is hurting my orders and customer. Please share an expected ETA of fixation

We’re having the same issue

{
  "name": "checkout-footer",
  "private": true,
  "version": "1.0.0",
  "license": "UNLICENSED",
  "dependencies": {
    "@shopify/ui-extensions": "2024.10.x",
    "@shopify/ui-extensions-react": "2024.10.x",
    "react": "^18.0.0"
  },
  "devDependencies": {
    "@types/react": "^18.0.0",
    "react-reconciler": "0.31.0"
  }
}

Hey @James_Vidler,

We do face this same error on dev (either this, or the NetworkError) - I suspect the TypeError is just raised because of the NetworkError.

I also quickly tested recreating the extension without React (instead using the barebones .subscribe() APIs) - and still had the same error on this app.

As a temporary fix for merchants relying on us, we’ve spun up custom apps for each store to serve just this extension - which works fine with the exact same code, config and dependency versions.

It does seem like once the error occurs (for whatever reason), it persists for a long time and there’s no reliable way to fix this or debug further.

Hi @sid, @lezlet, @Faizan_Khan

I was able to reproduce the TypeError: Cannot read properties of undefined (reading 'S') after using the same dependancies you shared.

The root issue here is that react-reconciler version 0.31.0 only supports React 19.

Please set the react-reconciler to the supported version 0.29.0 and these errors should go away.

Please let us know if this resolves your issues.

1 Like

Hey James!

I confirm updating the version here fixes this issue, but it doesn’t seem like a complete solution.

Even with the right versions in my package.json I do face the NetworkError issue occasionally and unpredictably in my local dev environment:

Do you think this might have something to do with a certain package manager? I’ve tested against npm, pnpm and bun, with no success.

@sid,

This error can occur if there was a problem download the extension asset. The next time it happens, can you confirm if the HTTP result of fetching the asset using Dev Tools?

Hi @James_Vidler,

Turns out the react-reconciler version was indeed the culprit yet again (the module was being loaded based on the root package.json, instead of extensions/**/package.json which had the right version).

It might be interesting to have some helpful error logging related to this, but for now this forum thread should suffice! Thanks for your help, have a great day!