stereobooster / react-snap

👻 Zero-configuration framework-agnostic static prerendering for SPAs
MIT License
5.05k stars 394 forks source link

No service worker - but index.html still flashing when visiting other routes #484

Open VexyCats opened 4 years ago

VexyCats commented 4 years ago

Bug Report

Current Behavior

When visiting a route such as mysite.com/profile it will flash the homepage before loading the new route. This happens on every route.

Using Create-react-app.

This doesn't happen when using the serviceworker, but that was causing caching issues so I removed our Service worker.

I'm following all the steps within the docs to use react-snap and I'm hosting on AWS s3 and cloudfront.

Cloudfront is serving 200.html from S3 as the origin. And S3 is using 200.html as the index.

Edit: Cloudfront serving index.html also has the same issue.

Is there some settings on AWS/S3/Cloudfront I'm missing or something that needs to be set up on the react side?

Currently, I have everything set up exactly as the example in the docs.

I've asked on stackoverflow and no response

AMessina2 commented 4 years ago

I've had the same problem. I fixed it by allowing public permissions on my s3 bucket

VexyCats commented 4 years ago

Thats not the solution, the website is being hosted from the bucket, its all public. Otherwise the site wouldn't load.

gvlatko commented 4 years ago

@VexyCats did u manage to fix this?

VexyCats commented 4 years ago

Nope - a lot of issues with react-snap it seems. I've just uninstalled it and won't be using it. No support on stackoverflow, no support on github, docs are outdated, and countless errors.

oosharma commented 3 years ago

I am having the same issue.

BlazeIsClone commented 2 years ago

I'm also facing the same issue on a self hosted server with react router v6.