Skip to content

troubleshooting(webcontainer): how to fix infinite reload in chrome #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 25, 2023

Conversation

Nemikolh
Copy link
Member

PR Description

This PR provides some guidance on how to resolve the "Infinite reload page" issue.

This is an issue where when you open chrome's devtools on the preview page, doing a refresh will force the service worker to be re-installed. In doing so, it will:

  1. Take control of the page, refreshing it
  2. The page being refreshed and "update on reload" being checked, reinstall the service worker

Thus the loop. 🥸

Summary of my changes and explanation of my decisions

We add a section to troubleshooting explaining the step to follow to prevent that error: disable the update on reload option.

Self-check

Please check all that apply:

  • My code follows the style guidelines of this project
  • I have reviewed my code or content update and edited it to the best of my abilities
  • I have commented my code, particularly in hard-to-understand areas; my comments are concise

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link

netlify bot commented Jun 16, 2023

Deploy Preview for stackblitz-docs ready!

Name Link
🔨 Latest commit e0bb5a5
🔍 Latest deploy log https://app.netlify.com/sites/stackblitz-docs/deploys/6538fdf90280820008e114ce
😎 Deploy Preview https://deploy-preview-138--stackblitz-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Nemikolh Nemikolh force-pushed the joan/update-on-reload branch from ce16abb to bbd1056 Compare June 16, 2023 12:18
@Nemikolh Nemikolh requested review from d3lm and sylwiavargas June 16, 2023 14:58
Copy link
Contributor

@d3lm d3lm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks 🙏


If you have your preview in a separate tab and you open Chrome dev tools, you can observe an infinite reload loop after a refresh. This is usually caused by having the `Update on reload` checkbox checked in `Application > Service Workers`.

<img alt="Chrome DevTools with the Application tab selected showing the Service Workers section with the Update on reload checkbox checked" src="./assets/chrome-update-on-reload.png" width="800" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Co-authored-by: Dominic Elm <d3lm@users.noreply.github.com>
@Nemikolh Nemikolh requested a review from d3lm July 3, 2023 08:59
@sulco sulco merged commit 24f2d86 into main Oct 25, 2023
@sulco sulco deleted the joan/update-on-reload branch October 25, 2023 11:42
@sylwiavargas
Copy link
Contributor

🥰

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.

4 participants