My Store Went White Screen at 2 AM — How I Fixed It in 10 Minutes
Phone buzzed at 2:14 AM. A customer DM'd: "Your website is just white." Here's the exact debugging sequence I ran, the culprit I found, and the checklist I now use so this never happens again.
If you run a Shopify store long enough, you will eventually wake up to messages telling you your site is down. It's not a matter of if — it's when. And it usually happens at the worst possible time.
For me, it was 2:14 AM on a Wednesday. I was asleep. My phone buzzed with an Instagram DM from a customer in Australia: "Hey, your website is just a white screen. Is everything okay?"
I opened my store on my phone. White screen. Refreshed. White screen. Tried on desktop. White screen. Checked Shopify admin — still accessible, orders still coming in from repeat customers using direct links. But the storefront was completely dead. Every page. Every product. Just blank white.
Here's exactly how I debugged it, what caused it, and the 5-minute prevention routine I run weekly now.
The 3-Step Debugging Sequence
Step 1: Isolate the Layer (1 minute)
When your store is a white screen, the problem is almost always JavaScript. A blank page means the browser stopped rendering because a script threw an unrecoverable error. Your job is to figure out which script.
First thing I did: opened Chrome DevTools (F12 → Console). The console was flooded with red. One error repeated hundreds of times: Uncaught TypeError: Cannot read properties of undefined (reading 'price'). The error originated from a file named upsell-widget.js — a script I didn't recognize.
Second thing: I checked which apps were injecting that script. Shopify → Online Store → Themes → Edit Code → theme.liquid. Searched for upsell-widget. Found it. It was from an upsell app I had uninstalled 6 months ago. The app was gone from my app list. Its subscription was canceled. But the script tag it injected into my theme.liquid file was still there, loading a JavaScript file from a CDN that no longer existed.
The CDN had finally been decommissioned. Instead of returning a 404, the CDN returned an empty response with a 200 status code. The browser tried to parse an empty file as JavaScript, which threw a syntax error that cascaded into every other script on the page failing to initialize. White screen.
Step 2: Quick Fix — Kill the Offending Script (2 minutes)
I deleted the orphaned <script> tag from theme.liquid, saved, and refreshed. Store was back. Total downtime: about 3 minutes once I started debugging.
But this raised a bigger question: how many other orphaned script tags were sitting in my theme, loading dead resources from apps I uninstalled months or years ago?
Step 3: Full Theme Audit (5 minutes)
I searched theme.liquid for every <script src="https:// tag that wasn't from Shopify or a known, currently-installed app. I found seven orphaned script tags. Seven apps I had uninstalled but whose code remained in my theme.
Two of them were still loading successfully from CDNs — meaning my store was loading JavaScript from apps I no longer used, adding weight to every page load for literally no reason. Three of them were loading resources that returned errors (which I never noticed because they failed silently — they didn't crash the page, they just added latency). And one was the upsell widget that finally took my store down when its CDN was decommissioned.
I deleted all seven. Page load time improved by 0.4 seconds on mobile.
Why This Happens (And Why Shopify Doesn't Fix It)
Shopify's app architecture gives apps permission to write to your theme files during installation. This is how apps add features — they inject the code they need to function. When you uninstall an app, Shopify removes the app's access, but it does not roll back the theme modifications. The injected code stays.
This is by design — rolling back theme changes could break things if multiple apps modified the same file. But it means every store accumulates technical debt with every app install and uninstall cycle.
Over 3 years, I installed and uninstalled roughly 40 apps. Seven left code behind. That's a 17.5% orphan rate.
My Weekly Prevention Routine (5 Minutes)
I now run this check every Monday morning. It takes 5 minutes and has caught two additional orphaned scripts before they caused problems:
- Search theme.liquid for external scripts: Open theme.liquid. Ctrl+F for
script src="http. For each match, ask: "Is this from an app I still use?" If no, delete it. - Check the browser console on your storefront: Open your store in incognito. F12 → Console. Look for red errors. Any 404s? Any failed script loads? Any warnings about deprecated APIs? Investigate each one.
- Audit your installed apps monthly: Settings → Apps and sales channels. Count them. If it's more than 12, audit. Remove anything you haven't configured or used in 30 days. Then repeat step 1 — the uninstall might leave code behind.
- Use a store monitoring tool: I set up a free uptime monitor that checks my store every 5 minutes and texts me if it returns a non-200 status or if the page contains the word "error." Total setup time: 10 minutes.
script src="http. Count how many external scripts are there. Now cross-reference with your installed apps. I bet you find at least one orphan. Every one you delete makes your store faster and more stable.The irony: this entire incident was caused by an app I stopped paying for 6 months ago. It cost me maybe 2-3 hours of lost sales (it was 2 AM, traffic was low). But if it had happened during a flash sale or holiday rush, it could have been thousands of dollars.
The fix took 2 minutes. The prevention routine takes 5 minutes a week. The peace of mind is worth far more than that.
Loading comments...