r/flask • u/coalcountrycoder • 12h ago
Ask r/Flask Flask page works on desktop, but iOS Safari (iOS 26) only shows "Script error." and won't initialise
I have a page that works perfectly on desktop Chrome but won't initialise on iPhone (iOS 26.5.2). The HTML, CSS and my shared base.js all load with no failed network requests, but the page-specific script never runs, and the iOS console shows only the generic "Script error." with no line number.
Both JS files are same-origin (/static/js/...), which is what confuses me — "Script error." is usually a cross-origin thing.
Full code (public repo):
- Page script: https://github.com/joshuablakemorekay/thaibridge-ai/blob/main/static/js/alphabet.js
- Shared base: https://github.com/joshuablakemorekay/thaibridge-ai/blob/main/static/js/base.js
- Template + inline data: https://github.com/joshuablakemorekay/thaibridge-ai/blob/main/templates/alphabet.html
What I've already ruled out:
- No Safari-unsupported syntax (lookbehind, replaceAll, .at(), logical-assignment, private fields).
- No service worker; assets are cache-busted; cleared cache + tried Private mode.
- Desktop: every function defined, page runs with zero console errors.
- The page recently gained three study modes + a Pointer Events drag-and-drop rebuild and lazy new Audio() — the failure started after that.
Questions:
On Windows (no Mac), what's the best way to reveal the real error behind iOS Safari's "Script error."? (I've added a window.onerror overlay.)
What are the usual WebKit-only runtime throws that pass fine in Chrome/Blink? Anything about Pointer Events + setPointerCapture or new Audio() on iOS that throws at init?
Thanks!
