Desktop Safari crash (RangeError in makeRequest) reproduces on one specific Mac only, not others - related to #133?
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 40/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript, typescript
Research direction
Examine the shinylive.js file, particularly the makeRequest function and Service Worker registration logic. Look at the virtual routing path handling and the error stack trace from Safari's Web Inspector. Compare with issue #133 to see if it's the same root cause. Test on the specific failing Mac to gather more diagnostics, such as Service Worker lifecycle events and network interception failures.
Written by the indexing model from the issue text.
Description
Summary
On one specific Mac (desktop Safari, latest macOS/Safari), a shinylive-exported app deployed to GitHub Pages consistently fails with an unhandled RangeError: Maximum call stack size exceeded thrown inside makeRequest in shinylive.js. This looks like the same failure class as #133 ("Uncaught error: ServiceWorker controller not found!"), but with a twist: it reproduces reliably on this one Mac across every mitigation I tried, while the same deployed app and same link work correctly on other machines (another Mac, two different iPhones) running Safari/WebKit.
Environment
- shinylive R package: tested on both 0.5.0 (assets v0.10.12) and the GitHub dev version 0.5.0.9000 (assets v0.10.15) — same crash on both.
- Deployed via shinylive::export() to GitHub Pages (static hosting, no backend).
- Live example: https://alvarolf90.github.io/estudo_havayanas/
- Failing machine: a specific Mac, macOS updated all the way to macOS 27 (latest available) with matching latest Safari, specifically to rule out a stale-OS cause.
- Working machines with the same app/link: a different Mac (same household, different Safari install) — works correctly; the failing machine's own owner's iPhone Safari — works correctly; a second person's iPhone Safari — works correctly.
Steps to reproduce (on the affected Mac only)
-
Open https://alvarolf90.github.io/estudo_havayanas/ (or any URL with a #seq=... hash) in Safari on the affected Mac.
-
In a normal tab: the page shows a literal "404 File not found" response rendered inside the shinylive iframe.
-
In a private/incognito tab: the page just stays blank/white, no visible error in the UI.
-
Safari Web Inspector console (both cases) shows the Service Worker registering, then:
Unhandled Promise Rejection: RangeError: Maximum call stack size exceeded
thrown from makeRequest in shinylive.js, following a request to the app's virtual routing path (app_/...) that was not intercepted by the Service Worker and fell through to a real network request (which 404s, since that path doesn't exist as a static file).
What I've ruled out
- Stale/cached Service Worker — fully cleared Safari's site data for the domain and retested: same crash.
- shinylive assets version — upgraded from 0.5.0 (assets v0.10.12) to the GitHub dev build 0.5.0.9000 (assets v0.10.15), redeployed, retested: same crash. Checked the changelog; no release through 0.5.0 mentions a Safari/WebKit/Service-Worker-related fix.
- Payload size / storage quota — checked the exported app.json size across the app's whole commit history; it's been flat around ~10 MB the entire time this feature has existed, well under any realistic quota, and the failure mode (a direct 404 on an internal route) doesn't match a quota-exceeded symptom anyway.
- Outdated macOS/Safari build — updated the affected Mac all the way to macOS 27 (latest available at the time) and retested after a restart: same crash.
- Safari extensions/content blockers — checked Safari's Extensions preferences on the affected Mac; only an inactive password-manager extension (Bitwarden) is installed, nothing that should intercept network/SW behavior.
- Corrupted per-origin Service Worker storage — with Full Disk Access granted to Terminal, inspected the actual on-disk per-origin WebKit storage (~/Library/Containers/com.apple.Safari/Data/Library/WebKit/WebsiteData/Default//) for the affected origin. This turned out to be exactly what Safari's own "Remove Website Data" UI feature already clears (already tried in the first bullet above), so there was nothing additional to manually delete.
What works
Same exact app/link on: a different Mac's Safari (same network/household), and two different iPhones' Safari (tested independently by two different people) — all work correctly, no crash.
Question
Given this reproduces consistently on one specific desktop Safari installation but not on other Macs or any tested iPhone (all WebKit), is this expected to be the same underlying cause as #133, or could there be a separate, more Safari-desktop-specific trigger? Any known workaround, or additional diagnostics I could gather from the affected machine, would be very welcome — happy to test anything.
- Dominant language
- TypeScript
- Stars
- 253
- Forks
- 25
- Avg merge
- 6d 22h
- Merged PRs (30d)
- 13
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from posit-dev/shinylive
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
dependencies enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
posit-dev/shinylive#221 · 8 comments · 2 reactions ·
Maintainers usually reply within 1 day
All issues in posit-dev/shinylive
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
laststance/design-world#98 ·
Maintainers usually reply within 1 day
-
Add: KCM True crimeOpenapproved check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
triage: failed
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
oxc-project/tsrs#1277 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ardia-browser/ardia#6798 ·
Maintainers usually reply within 1 day