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

Attempt to fix chunk loading errors #1333

Merged
merged 2 commits into from
Aug 3, 2020
Merged

Conversation

mariusandra
Copy link
Collaborator

Changes

If we detect a "chunk loading error", do one of two things:

  • If this is the first page the user opened, show a "network error" image (screenshot below)
  • If this is not the first page (e.g. the user clicked something to load a new page), do a browser reload. Hopefully that will load in the new JS and it'll be a seamless transition.

Screenshot 2020-08-03 at 17 18 00

This hog should only show up if the first page you open somehow doesn't load.

Checklist

  • All querysets/queries filter by Team (if this PR affects any querysets/queries)
  • Backend tests (if this PR affects the backend)
  • Cypress E2E tests (if this PR affects the front and/or backend)

@timgl timgl temporarily deployed to posthog-chunk-loading-e-nwksr0 August 3, 2020 15:24 Inactive
@mariusandra
Copy link
Collaborator Author

2020-08-03 17 24 20

<ReloadOutlined /> Reload the page!
</Button>
</p>
<HedgehogOverlay type="sad" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure we should add the old logo back in. I think the page would look OK without a logo

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, it looks cleaner without it. The 404 page will still be hogged

@mariusandra mariusandra temporarily deployed to posthog-chunk-loading-e-nwksr0 August 3, 2020 18:05 Inactive
@mariusandra mariusandra merged commit a7fafb4 into master Aug 3, 2020
@mariusandra mariusandra deleted the chunk-loading-errors branch August 3, 2020 18:14
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.

None yet

2 participants