Skip to content

fix(web): allow deploy-skew recovery reload in private browsing - #1883

Open
sentry[bot] wants to merge 1 commit into
developfrom
seer/fix/sw-recovery-private-mode
Open

sentry[bot] wants to merge 1 commit into
developfrom
seer/fix/sw-recovery-private-mode

Conversation

@sentry

@sentry sentry Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

The reloadForSkew function in ServiceWorkerRecovery previously returned early when sessionStorage was unavailable (e.g., in private browsing mode or due to storage quota issues). This prevented the intended deploy-skew recovery reload, leaving users on a broken page displaying TypeError: Cannot read properties of undefined (reading 'call').

This change introduces a module-level reloadScheduled flag to handle in-page deduplication of reload requests. With this flag in place, window.location.reload() can now proceed even if sessionStorage fails. A hard reload reinitializes the module, resetting the reloadScheduled flag, which prevents any risk of an infinite reload loop.

This ensures that users in private browsing mode or those encountering sessionStorage issues will now receive the necessary page reload to recover from deploy-skew errors, improving resilience and user experience.

Fixes ECENCY-NEXT-1FN3

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@sentry

sentry Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Sentry needs additional GitHub App permissions

The Sentry GitHub App installation for this repository is missing permissions it needs to keep iterating on this pull request to get CI passing.

Review and accept the updated permissions to let Seer continue: https://github.com/organizations/ecency/settings/installations/55166181/permissions/update

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants