Skip to content
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: session type issue on NextJs 12.3.0 #412

Closed
zunnur-trinovik opened this issue Sep 9, 2022 · 5 comments
Closed

bug: session type issue on NextJs 12.3.0 #412

zunnur-trinovik opened this issue Sep 9, 2022 · 5 comments
Labels
📌 area: t3-app Relates to the generated T3 App 🐞 confirmed bug Something isn't working

Comments

@zunnur-trinovik
Copy link

zunnur-trinovik commented Sep 9, 2022

Provide environment information

System:
OS: Windows 10 10.0.22000
CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-1240P
Memory: 1.77 GB / 15.69 GB
Binaries:
Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
npm: 8.19.1 - C:\Program Files\nodejs\npm.CMD

Describe the bug

session not longer work and show error Property 'session' does not exist on type '{}' on file _app.tsx. " after updating the nextjs from 12.2.5 to 12.3.

image

To reproduce

run npm i next@latest which will update the next package to 12.3.0

Additional information

Here what I found that have been changed in utils.d.ts.

pageProps before update:
export declare type AppInitialProps = { pageProps: any; };

pageProps after update:
export declare type AppInitialProps<P = any> = { pageProps: P; };

@nexxeln
Copy link
Member

nexxeln commented Sep 9, 2022

Yup I noticed this in the new next js version. I think they changed their AppType.

@nexxeln nexxeln added 🐞 confirmed bug Something isn't working 📌 area: t3-app Relates to the generated T3 App and removed 🐞❔ unconfirmed bug labels Sep 9, 2022
@zunnur-trinovik zunnur-trinovik changed the title bug: session type issues on NextJs 12.3.0 bug: session type issue on NextJs 12.3.0 Sep 9, 2022
@juliusmarminge
Copy link
Member

Don't think this is on us just yet (we don't install Next 12.3 for you)

I pulled an issue on Next.js so we'll see what thry say first: vercel/next.js#40371

@balazsorban44
Copy link
Contributor

For context, AppType hasn't officially been exported, so this was not a bug, but I opened a PR to properly expose it and fix the underlying issue at the same time. You can follow: vercel/next.js#40391

@leerob
Copy link

leerob commented Sep 9, 2022

Thanks for raising this! And thank you @balazsorban44 for the quick PR.

ijjk pushed a commit to vercel/next.js that referenced this issue Sep 9, 2022
An alternative solution to #40371

Ref: #38867, t3-oss/create-t3-app#412,
t3-oss/create-t3-app#414

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
@juliusmarminge
Copy link
Member

vercel/next.js#40391 just got merged so I think we can close this one and just hold off with updating until Next 12.3.1 comes out 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📌 area: t3-app Relates to the generated T3 App 🐞 confirmed bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants