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

grunt dev sometimes reloads the app while the backend is down after a shared file change #1564

Open
snowteamer opened this issue Apr 29, 2023 · 0 comments · May be fixed by #1565
Open

grunt dev sometimes reloads the app while the backend is down after a shared file change #1564

snowteamer opened this issue Apr 29, 2023 · 0 comments · May be fixed by #1565
Assignees

Comments

@snowteamer
Copy link
Collaborator

Problem

Steps to reproduce:

  1. Run export GI_PERSIST= && grunt or export GI_PERSIST=sqlite && grunt dev, with enough files in ./data to make a server restart slow enough, i.e. at least slower than a frontend rebuild. The issue won't show up otherwise.
  2. Visit http://localhost:3000
  3. Make a trivial change in a shared file, e.g. remove a character in a comment in ./shared/functions.js

Expected behavior:

The app should display a "Trying to reconnect..." banner for a while, then reload normally without that banner nor errors in the console.

Actual behavior:

The app quickly reloads, but starts displaying a "Trying to reconnect..." banner for a while, then the banner disappears but the page is unable to finish loading (the page load indicator stays cross-shaped). There are connection errors and reconnection attempt messages in the console:

image

Solution

Make sure to only reload the browser when the backend is fully ready to accept connections and serve assets.

@snowteamer snowteamer self-assigned this Apr 29, 2023
snowteamer added a commit to snowteamer/group-income that referenced this issue Apr 29, 2023
@snowteamer snowteamer linked a pull request Apr 29, 2023 that will close this issue
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 a pull request may close this issue.

1 participant