Skip to content
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

🐛 BUG: Safari production build losing reactivity on refresh #3878

Closed
1 task done
hughsername opened this issue Jul 10, 2022 · 0 comments · Fixed by #3891
Closed
1 task done

🐛 BUG: Safari production build losing reactivity on refresh #3878

hughsername opened this issue Jul 10, 2022 · 0 comments · Fixed by #3891
Assignees
Labels
- P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority)

Comments

@hughsername
Copy link

What version of astro are you using?

v1.0.0-beta.65

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Mac

Describe the Bug

I think I’m losing reactivity on the example counter component when I refresh a production build in Safari. It feels like caching is getting me somehow, but I’m not sure how and I don’t have a lot to go on.

  1. npm init astro — —template framework-react, running Astro v1.0.0-beta.65 and node v16.15.0. Follow the prompts to get a working dev server.
  2. Open localhost:3000 in Safari. Counter works correctly.
  3. npm run build, to generate a production build.
  4. npm run preview to preview the production build locally. Counter works correctly.
  5. Refresh page. Counter stops working, without any console messages.
  6. Quitting Safari, re-opening localhost:3000 restores reactivity, but repeating step 5 above recreates the problem.

This only happens in Safari (works in Chrome) and only when I’m running my production build (through either astro preview or Netlify).

I’ve reproduced it using the Astro framework examples for both React and Solid.

Link to Minimal Reproducible Example

https://github.com/withastro/astro/tree/main/examples/framework-react

Participation

  • I am willing to submit a pull request for this issue.
@hughsername hughsername changed the title 🐛 BUG: 🐛 BUG: Safari production build losing reactivity on refresh Jul 10, 2022
@matthewp matthewp self-assigned this Jul 11, 2022
@matthewp matthewp added the - P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority) label Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P5: urgent Fix build-breaking bugs affecting most users, should be released ASAP (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants