-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
I have deployed the SAM2 web demo on a Jetstream2 instance following all the official setup steps. The deployment runs, but I’m experiencing an inconsistent and hard-to-debug issue:
Problem Overview
The SAM2 web demo works on some client machines but fails on others.
The failure is inconsistent — the same computer sometimes loads the app correctly, and other times the frontend/backend connection breaks.
The only temporary fix that restores functionality is to repeatedly clear browser cache + cookies, and sometimes even restart Chrome and the entire machine. After some time, the issue returns.
What I Observed:
Affected machines show frontend not loading the backend responses correctly (varies between blank mask outputs, stalled requests, or non-initializing demo UI).
- Clearing cache + cookies restores it temporarily.
- Works normally on some computers without any intervention.
- There is no consistent pattern related to network, OS, Chrome version, or account.
Why I Believe It’s a Frontend/Service Worker/Caching Issue
Based on the symptoms, behavior strongly points toward aggressive browser caching, stale service worker, or cached JS bundles interfering with newer backend responses.
Could also be related to:
- Stale index.html being served.
- Cached API endpoint URLs.
- Service worker serving outdated assets.
- Misconfigured cache headers from the demo server.
- Cookie/session inconsistencies.
Steps I Have Already Tried
- Verified server is running properly.
- Rebuilt and redeployed frontend.
- Tested from multiple networks.
- Tested with different browsers and Chrome profiles.
Impact
Because it works only intermittently, users cannot reliably use the demo. The behavior is confusing and unpredictable, making the demo unusable in a production or shared environment.
Request
Could the team confirm:
- Whether the web demo ships with a service worker or caching layer that might cause stale assets to persist.
- Expected caching headers for index.html and JS bundles.
- Any known issues with the demo using wrong environment variables or cached API URLs.
- Recommended configuration to disable caching entirely for development/self-hosting.
Any guidance on stabilizing the behavior across clients would be very helpful.