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!
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!
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?
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!
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!
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?