Production build call data fetching function twice (server components, app directory) #44966
                
   Open
            
              
      
      
  
    1 task done
  
        Labels
        
  
            
              template: bug
  A user has filled out the bug report template. Issue needs triaging 
        
      
Verify canary release
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP Wed Nov 23 01:01:46 UTC 2022 Binaries: Node: 16.19.0 npm: 9.3.0 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.1.3-canary.2 eslint-config-next: 13.1.2 react: 18.2.0 react-dom: 18.2.0Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true), Data fetching (gS(S)P, getInitialProps)
Link to the code that reproduces this issue
https://github.com/havran/nextjs-13.1.2-called-twice
To Reproduce
Steps:
Describe the Bug
When I run production build, my data fetching method is called twice (based by observation of console.time method).
When I run app as dev, this behave as expected, data fetching method is called once.
Expected Behavior
Data fetching method should be called once with production build.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
next start
The text was updated successfully, but these errors were encountered: