-
Notifications
You must be signed in to change notification settings - Fork 7
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]: getServerSideProps not triggered #74
Comments
so after doing some digging reverting back to next-pwa i was seeing the same issues show up there. it has to do with the cache strategy in the service worker that is being used there, so maybe this helps with this issue as well but this is what fixed it for me for next-pwa: |
@mick-feller oh, thanks for investigating! This behaviour will be changed in v9. |
@DuCanhGH awesome looking forward to it. more then happy to test this as I want to get off next-pwa sooner then later to clean up some snyk security reports. |
@mick-feller will most likely come with 9.0.0-preview.4! You can use Serwist preview for now, then migrate back to stable later. Up to you, though. |
Once I get a chance I'll try it out! Thanks! |
@mick-feller should be fixed in the latest preview :) Closing this issue. |
@DuCanhGH upgraded to serwist preview and working like a charm! thanks for the quick fix! |
Provide environment information
package versions used:
"@serwist/next": "^8.4.4",
"@serwist/precaching": "^8.4.4",
"@serwist/sw": "^8.4.4",
Which project is this issue for?
@serwist/next
Link to reproduction - Issues with a link to complete (but minimal) reproduction code help us address them faster
To reproduce
sw.js file:
next.config.js
Describe the bug
I recently moved to serwist from next-pwa as i'm slowly going to start migrating to app directory.
While i'm not in app directory yet i noticed that somehow when i do a route change in the browser it seems to pull a fully cached page back and not trigger getServerSideProps anymore and my data comes back empty that i expect to be there.
It's working all fine without service workers involved and with next-pwa this was working properly as well.
If i stay on the page and then actually refresh the browser all the data shows up.
I also tried setting navigationPreloa, clientsClaim and cacheOnFrontEndNav to false without much success.
minimal repo will be tough this seems to also only happen when i run nextjs build. if i enable service worker in local dev environment everything works just fine.
Expected behavior
i expect that my data still comes back from getServerSideProps when a nextjs Link component is clicked.
Screenshots (if relevant)
No response
Additional information (if relevant)
No response
The text was updated successfully, but these errors were encountered: