First time load breaks #14012
-
Hi guys, im having this problem with first time users who load my page for the first time. After refresh the page works on every occasion. In my build or console i cant see the problem and dont know how to fix this if im not receiving some clue on what its breaking it. I made a test in webpagetest who show the first time rendering and it show the same error on first time users. Here is the link with the image error. https://www.webpagetest.org/result/200610_53_e85d1d405e3bedec5264484b132e00e1/ Any clue on what could be wrong ? i was thinking it was the google tag manager or the styled component on ssr i put in my _document but if i remove it , doesnt change anything. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
any chance you can share any code? |
Beta Was this translation helpful? Give feedback.
-
`import React from 'react' import { GA_TRACKING_ID } from '../lib/gtag' export default class extends Document { static async getInitialProps(ctx) {
} ) } }` this _document.js differs to my other projects working right, |
Beta Was this translation helpful? Give feedback.
-
There are my updated build logs
Even the vercel image show the first time load as error. @jamesmosier i be able to reproduce the error in the console, thanks god, but im not getting the meaning. The "framework" undefined value is on _next/static/chunks/framework Hope with this error you could help me |
Beta Was this translation helpful? Give feedback.
-
You are totally right! data.value is an useSwr checking for localStorage item that doesnt exist when users initialize the page :D and return undefined ! thank you James you are great. |
Beta Was this translation helpful? Give feedback.
You are totally right! data.value is an useSwr checking for localStorage item that doesnt exist when users initialize the page :D and return undefined ! thank you James you are great.