0

I'm experiencing a strange problem with Nuxt and Netlify with static generation on a JAMstack e-commerce.

I pushed my website on Netlify and everything went good, no error on console in the generation phase. When i visit the generated site on desktop everything is fine and loaded correctly. On mobile instead the content disappears! The dynamic content fetched from Prismic during generation won't load if navigate from the homepage (need to reload the page in order to view them).

I'll leave a netlify preview link of the build so you can experiencing the same problem. Load the homepage (on mobile) and click the button "Shop Now", you'll see a page with no content; try reloading the page and everything will come back to normal. I noticed that if you refresh or land in a page that it's not the homepage and start navigating the site everything works fine, so the problem only occurs when the start of navigation is from the homepage on mobile! Furthermore, if you land on the homepage, go to Shop Now, and then go back without reloading, even the content on the homepage disappear!

https://60352eb4c2e7180007325b89--leconturbanti.netlify.app/en

I can't understand why since there is no console error anywhere. While on desktop everything is fine. There's no css hide rule, no v-if for mobile, nothing. It seems like there's a bug on Nuxt hydration?

Anyone having the same problem?

sintj
  • 804
  • 2
  • 11
  • 23
  • 1
    I do see that you have a service worker, check if it does not interfere with your view logic of displaying the items somehow. – kissu Feb 23 '21 at 17:28
  • Didn't think that way, later i'll check! Maybe the start_url property interfere with this preview branch while not being on the primary domain? – sintj Feb 23 '21 at 17:37
  • Can totally be env related too ofc ! – kissu Feb 23 '21 at 17:38
  • So service workers on desktop are "ignored"? – sintj Feb 23 '21 at 17:40
  • Not saying that but I don't know what your CTA is doing but if you go to the `shop` path in a mobile view + incognito mode new window, it displays the data properly. – kissu Feb 23 '21 at 17:42
  • You say? I can't replicate the same behavior, and also tried to disabled pwa module but with no luck.. :( – sintj Feb 23 '21 at 20:20
  • Open à new windows private tab, toggle dev tools, mobile view and paste the url (while in mobile viewport), you should see it as on the "view that should not work". – kissu Feb 23 '21 at 23:20

0 Answers0