NotFoundError: Failed to execute 'removeChild' on 'Node'" Error After Updating App from Dev to Release URL

Hello everyone,

I am encountering an issue with my Shopify app and need some assistance. Here are the details of the situation:

Problem Description: After deploying my app from the dev environment (URL: trycloudflare.com) to the release environment (URL: abc.fly.dev) and reinstalling the app on my Shopify store, I am receiving a “NotFoundError: Failed to execute ‘removeChild’ on ‘Node’” error (attached image). This error occurs when I modify the code in the dev environment, but it affects the installed app (pointing to abc.fly.dev).
Steps Tried:
Verified that the app configuration in the Shopify Partner Dashboard points to the correct release URL (abc.fly.dev).
Reinstalled the app on the Shopify store.
Ensured the latest code changes were deployed to abc.fly.dev.
Additional Information:
I am using Fly.io to host the app.
Everything works fine on the dev environment (trycloudflare.com) before switching to the release version.
No specific errors appear in the deployment logs on Fly.io, but the error only shows up on the Shopify admin interface after updating the code.

Questions:

Has anyone else experienced a similar error when transitioning from a dev to a release URL?
How can I safely sync code between the two environments without causing errors in the installed app?
Is there a way to investigate the “removeChild” error in more detail within the Shopify context?
I would greatly appreciate any help from the community! Thank you in advance.


I assume you’re using the official Shopify Remix template for your app. But if not let us know.

Yes you can maintain multiple apps with the same codebase, you just have to leverage environment variables appropriately so that these apps function properly in production vs development.

First I would:

  1. Verify that the production environment variables are correct - especially your Shopify App public and private keys.
  2. Double check the logic in your frontend code and loaders, potentially there’s an issue with hydration (see this GH issue as an example)
  3. Use console.log statements to help pinpoint where this error is happening.

Are you still seeing this issue @bom ?