Client Fetch error when deploying next js app to netlify

https://deetz-web.netlify.app/api/auth/session

This just does not work even after setting the NEXT AUTH URL variable as well , have checked all possible configurations and everything seems to be correct but not sure now.

I just keep getting the client fetch error.

Build logs below

8:00:07 AM: ────────────────────────────────────────────────────────────────
8:00:07 AM: ​
8:00:07 AM: $ npm run build
8:00:08 AM: > deetz-signup@0.1.0 build
8:00:08 AM: > next build
8:00:08 AM: info - Loaded env from /opt/build/repo/.env.local
8:00:08 AM: info - Loaded env from /opt/build/repo/.env.production
8:00:08 AM: info - Linting and checking validity of types…
8:00:09 AM: info - Creating an optimized production build…
8:00:15 AM: info - Compiled successfully
8:00:15 AM: info - Collecting page data…
8:00:19 AM: info - Generating static pages (0/11)
8:00:22 AM: info - Generating static pages (2/11)
8:00:22 AM: info - Generating static pages (5/11)
8:00:22 AM: info - Generating static pages (8/11)
8:00:23 AM: info - Generating static pages (11/11)
8:00:23 AM: info - Finalizing page optimization…
8:00:23 AM: Route (pages) Size First Load JS
8:00:23 AM: ┌ /_app 0 B 200 kB
8:00:23 AM: ├ ○ /404 194 B 200 kB
8:00:23 AM: ├ λ /api/auth/[…nextauth] 0 B 200 kB
8:00:23 AM: ├ λ /api/hello 0 B 200 kB
8:00:23 AM: ├ ○ /dashboard/user-account (3016 ms) 32.5 kB 279 kB
8:00:23 AM: ├ ○ /google (2618 ms) 420 B 200 kB
8:00:23 AM: ├ ○ /profile (3021 ms) 2.3 kB 253 kB
8:00:23 AM: ├ ○ /profile/vendor (3091 ms) 2.35 kB 253 kB
8:00:23 AM: ├ ○ /sign-in (3081 ms) 3.36 kB 232 kB
8:00:23 AM: ├ ○ /sign-up (3115 ms) 2.83 kB 254 kB
8:00:23 AM: ├ ○ /sign-up/vendor (3233 ms) 2.9 kB 254 kB
8:00:23 AM: ├ ○ /success (3152 ms) 1.12 kB 206 kB
8:00:23 AM: └ ○ /verify-email (2900 ms) 2.35 kB 207 kB
8:00:23 AM: + First Load JS shared by all 226 kB
8:00:23 AM: ├ chunks/framework-4556c45dd113b893.js 45.2 kB
8:00:23 AM: ├ chunks/main-c56944aad6ab8280.js 31.4 kB
8:00:23 AM: ├ chunks/pages/_app-5acab1470c3b596f.js 122 kB
8:00:23 AM: ├ chunks/webpack-be42ab225d639761.js 1.07 kB
8:00:23 AM: └ css/e9f634e8c94e26af.css 25.9 kB
8:00:23 AM: λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
8:00:23 AM: ○ (Static) automatically rendered as static HTML (uses no initial props)
8:00:23 AM: ​
8:00:23 AM: (build.command completed in 15.7s)
8:00:23 AM: ​
8:00:23 AM: 3. @netlify/plugin-nextjs (onBuild event)
8:00:23 AM: ────────────────────────────────────────────────────────────────
8:00:23 AM: ​
8:00:23 AM: NextAuth package detected, NEXTAUTH_URL environment variable set by user in Netlify configuration to https://deetz-web.netlify.app

@johrikush Can you provide the full build log?

Hi @nathanmartin
I was able to solve it by adding NEXTAUTH_SECRET to the next_auth.js file and was able to resolve it , Thanks for the reply though !!!

Hi @johrikush glad you found a solution! thanks for sharing thsi with the community. (: