Fix: Shopify App Conflicts
An app injected scripts that broke your theme. Here's how to find the culprit and safely disable it — without losing data.
Last updated: October 2026
Check the browser console (F12 → Console) on the broken page. Look for errors with app domains in the source path:
Uncaught TypeError: Cannot read property 'xyz' of undefined
at https://cdn.someapp.com/scripts/widget.js:42
↑ that's your app
Every app injects scripts from its own CDN. The error names it.
The 5 real causes
Two apps registering the same widget slot
Both apps inject into the same theme hook — like a "product page widget" or "cart drawer extension". They fight over the same DOM element.
Common pairs:
- Two review apps (Judge.me + Yotpo) both injecting review widgets
- Two currency converters both rewriting prices
- Two upsell apps both modifying the cart
- Two analytics apps both firing on page load
Rule: One app per function. If two apps do the same thing, pick one and uninstall the other.
App script breaks theme JavaScript
An app injects JavaScript that overrides a global variable or function your theme depends on. Common cases:
- App defines
window.cartorwindow.product, breaking theme code - App monkeypatches
fetchand intercepts theme requests - App adds event listeners that prevent default on form submits
- App bundles its own jQuery, conflicting with theme's jQuery version
Silent breakage: The app script may not throw an error itself — it just clobbers something your theme expects. Check the console for undefined errors even when the app isn't mentioned.
App injects CSS that overrides theme styles
App stylesheets use high-specificity selectors that override your theme's CSS. Layout shifts, broken grids, wrong colors.
Check with DevTools:
- Open DevTools → Elements tab
- Find the mis-styled element
- Look at the "Styles" panel — which rule is winning?
- If it comes from an app CDN, that's your culprit
Pro tip: App CSS usually has a recognizable prefix (.yotpo-widget, .judge-me-review). Search the DevTools styles panel for those prefixes.
App leaves orphaned code after removal
You uninstalled the app, but its script tag, style tag, or Liquid snippet is still in your theme. The app is gone but its ghost is causing problems.
Search your theme for:
# In theme.liquid, snippets/, sections/
{% comment %} Search for:
# - App-name references: {{ 'app-name.js' | asset_url }}
# - App-handle Liquid objects: shop.metafields.app_name
# - App-specific CSS classes: .app-name-widget
# - Script tags with app CDN URLs: cdn.app-name.com
Orphaned code is common when apps uninstall uncleanly. The theme files reference an app that no longer exists, causing 404s or console errors.
App ScriptTag timing
Shopify's ScriptTag API loads app scripts asynchronously. If the app script assumes a theme element exists before the theme finishes rendering it, the app fails silently or throws errors.
Symptoms:
- App works sometimes, fails other times
- App breaks on slow connections but works on fast ones
- App errors appear right after page load, then disappear
This is an app-side bug, not yours. Report it to the app's support. In the meantime, some apps let you configure a DOM-ready delay in their settings.
Isolate the culprit app
Method 1 — console inspection (fastest)
- Open DevTools → Console tab
- Refresh the page
- Note the domain in each error's source path (e.g.,
cdn.judge.me) - Match the domain to the app
Method 2 — disable apps in batches (bisect)
If the console doesn't point to a specific app:
- Apps → select half your apps → Disable
- Reload the broken page
- If fixed → culprit is in the disabled half. Re-enable one at a time.
- If still broken → culprit is in the enabled half. Disable those.
- Repeat with the smaller half
Pro tip: Apps → "Apps and sales channels" shows all installed apps. Disable is instant. Re-enable is instant. No data loss either way.
Method 3 — check theme.liquid for injected code
Some apps inject code directly into your theme instead of using ScriptTag API. Search theme files:
# Search for common app markers in your theme
grep -r "shopify-app" sections/ snippets/ layout/
grep -r "<script.*app" layout/theme.liquid
grep -r "app-block\|app-embed" sections/
🛡️ Safely disable or uninstall an app
Disable (reversible):
- Shopify Admin → Apps
- Click the app
- Choose Disable or Deactivate
- App stops injecting scripts immediately
- Data stays intact; re-enable anytime
Uninstall (removes app):
- Same flow, but choose Uninstall
- App typically schedules data deletion after 30-60 days
- Data is preserved during the grace period — you can reinstall and recover it
- After the grace period, data is permanently deleted
Before uninstalling: Export any data you need. Some apps let you export reviews, orders, customer data. Don't assume it'll be recoverable after 60 days.
After uninstalling, check for orphans:
- Edit theme code (Online Store → Themes → Edit code)
- Search for the app's name/handle in theme files
- Remove any remaining script tags, style tags, or Liquid references
- Test the theme in a duplicate first
🛡️ How to prevent app conflicts
- One app per function. Two review apps, two currency converters, two analytics — pick one of each.
- Test apps on a development store first. Free with a Shopify Partners account. Test the full customer journey before installing on production.
- Check the app's script weight. Look at the app's CDN domain in DevTools Network tab. If it loads 200KB+ of JS for one small widget, find a lighter alternative.
- Review installed apps quarterly. Uninstall apps you're not using — they're all injecting scripts, whether you use them or not.
- Prefer apps with theme app extensions. Modern Shopify apps use "theme app extensions" which require merchant approval before injecting code. This is cleaner than the old ScriptTag API.
- Keep a list of installed apps and what each does. When something breaks, you have a starting point.
- Watch Core Web Vitals after installing. If LCP or TBT jumps, the app is costing you SEO.
❓ Frequently asked questions
How do I find which Shopify app is breaking my theme?
Disable apps one at a time (or in batches) via Apps → the app → Disable. Test your theme after each. Or check the browser console — app scripts usually have identifiable sources like cdn.someapp.com or app-embed.someapp.io.
Does disabling a Shopify app delete its data?
No. Disabling stops the app from running but keeps all data. You can re-enable it later. Uninstalling removes the app entirely and typically schedules data deletion after a grace period. Prefer disabling for testing.
Why do two Shopify apps conflict?
Both apps inject scripts on the same page, or both try to modify the same cart/checkout behavior. Common conflicts: two review apps, two currency converters, two upsell apps, or two analytics apps tracking the same events.
How do I prevent app script conflicts?
Only install one app per function. If two apps do the same thing, pick one. Use Shopify's script tag management tools to load app scripts conditionally. And check the app's script location — some inject inline, others use a CDN, and inline scripts are harder to isolate.
Does uninstalling a Shopify app remove its scripts?
Usually yes, but some apps leave lingering script tags in theme.liquid that need manual cleanup. Check theme.liquid, sections, and snippets for orphaned app code after uninstalling.
How do I test apps on staging before installing?
Install apps on a development store first (free with a Shopify Partners account). Test the full customer flow. Then install on production. This avoids surprises when an app script breaks your live theme.