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