Production extension is not working

Hi all, hope you are having a great weekend. I recently deployed a Gadget post-purchase upsell app to production and installed it onto a test store. Previously, to view the extension and it's functionality, I had to copy the extension root URL from the development/local environment, using the Shopify Developer tools. However, now that I have deployed the app onto a production environment, I have installed the application on a development store, but no longer see the extension in action. From my understanding, on a production environment, I no longer need to use the Shopify Developer tools to view the extension. Is that correct? I wonder if I have missed a step or am doing something wrong, can someone please assist? I am happy to provide all necessary details. Thanks!
1 Reply
Emil
EmilOP5mo ago
I have been doing some further digging up and have come up with a question: is it possible to test a production app on a development store? It seems that even if the gadget production environment is installed on a dev store, it still tries to connect to a development app. I get this error:
Uncaught (in promise) NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://prescription-criminal-vessels-pregnant.trycloudflare.com/extensions/fe1618f8-d3f2-46a6-80c9-f4fc261fc13d/assets/post-purchase-ui.js' failed to load.
Uncaught (in promise) NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://prescription-criminal-vessels-pregnant.trycloudflare.com/extensions/fe1618f8-d3f2-46a6-80c9-f4fc261fc13d/assets/post-purchase-ui.js' failed to load.
It is either this, or I have homehow not connected the extension to the app in Shopify partners maybe? Just one more mention, the extension is showing in the Extensions page in Shopify Partners, but unsure whether that means it has been deployed. Strangely, my production extension logs to the development environment. Okay I think I figured it out! I forgot to pass the environment parameter to the API client in the extension code.

Did you find this page helpful?