-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: Errors with clean T3 install #1961
Comments
I have the same errors |
I'm getting something very similar (fresh setup with tRPC, NextAuth, Drizzle)
|
I succeeded to fix my issue by re-creating the project via an older version of |
I was able to fix it in 7.36.2 by adding await to getLatest.prefetch.
|
that worked for me too @Guria |
can confirm adding await to line #11 of page.tsx inside the app folder; also worked for me to eliminate this error message. Will check back to see if there is any new information.. |
@eltonstewart @ryanhell Please don't treat it as long term fix. This issue still requires investigation and proper long term fix. Personally I decided to bootstrap with 7.34 version. |
Just had this exact same error and @Guria's temporary fix works for me. |
@eltonstewart @ryanhell @NightClover-code @ScottyMaher @lorenzocorallo |
I'm using Drizzle with a Turso database |
Hmm. With latest 7.37 I have this issue with Postgres + Prisma, and no issue with Postgres + Drizzle. |
Ok, I've found the descrepancy. |
Fixes t3-oss#1961 Fix the issue with errors on a fresh T3 app install by changing `getLatest` to use `publicProcedure` instead of `protectedProcedure`. * **cli/template/extras/src/server/api/routers/post/with-auth.ts** - Change `getLatest` to use `publicProcedure` instead of `protectedProcedure`. * **cli/template/extras/src/server/api/routers/post/with-auth-prisma.ts** - Change `getLatest` to use `publicProcedure` instead of `protectedProcedure`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/t3-oss/create-t3-app/issues/1961?shareId=XXXX-XXXX-XXXX-XXXX).
Fixes t3-oss#1961 Add condition to prefetch `getLatest` only if the user is authenticated. * Modify `cli/template/extras/src/app/page/with-auth-trpc-tw.tsx` to add a condition to prefetch `getLatest` only if the user is authenticated. * Modify `cli/template/extras/src/app/page/with-auth-trpc.tsx` to add a condition to prefetch `getLatest` only if the user is authenticated. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/t3-oss/create-t3-app/issues/1961?shareId=XXXX-XXXX-XXXX-XXXX).
Fixes t3-oss#1961 Add condition to prefetch `getLatest` only if the user is authenticated.
Fixes t3-oss#1961 Add condition to prefetch `getLatest` only if the user is authenticated.
…ss#1961) closes t3-oss#1961 Add condition to prefetch `getLatest` only if the user is authenticated.
I have the same issue ! |
@electroheadfx just make prefetch conditional based on session. See #1969 |
Closed by #1969 |
Provide environment information
System:
OS: Windows 10 10.0.19045
CPU: (8) x64 Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
Memory: 5.50 GB / 15.89 GB
Binaries:
Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
bun: 1.1.22 - ~.bun\bin\bun.EXE
"ct3aMetadata": {
"initVersion": "7.36.2"
}
Describe the bug
[TRPC] post.getLatest took 153ms to execute
A query that was dehydrated as pending ended up rejecting. [[["post","getLatest"],{"type":"query"}]]: TRPCError: UNAUTHORIZED; The error will be redacted in production builds
Error: redacted
at eval (webpack-internal:///(rsc)/./node_modules/@tanstack/query-core/build/modern/hydration.js:37:31) {
digest: '1184500366'
}
GET / 200 in 8406ms
⨯ Internal error: Error: redacted
at eval (./node_modules/@tanstack/query-core/build/modern/hydration.js:37:31)
digest: "1184500366"
⨯ unhandledRejection: Error: redacted
at eval (webpack-internal:///(rsc)/./node_modules/@tanstack/query-core/build/modern/hydration.js:37:31) {
digest: '1184500366'
}
⨯ unhandledRejection: Error: redacted
at eval (webpack-internal:///(rsc)/./node_modules/@tanstack/query-core/build/modern/hydration.js:37:31) {
digest: '1184500366'
}
Reproduction repo
It's a fresh create t3-app@latest, with only the .env changed as described
To reproduce
◇ Will you be using TypeScript or JavaScript?
│ TypeScript
│
◇ Will you be using Tailwind CSS for styling?
│ Yes
│
◇ Would you like to use tRPC?
│ Yes
│
◇ What authentication provider would you like to use?
│ NextAuth.js
│
◇ What database ORM would you like to use?
│ None (I also tried with Prisma)
│
◇ Would you like to use Next.js App Router?
│ Yes
Additional information
I tried GPTing my way to a solution, but it was not helpful.
The text was updated successfully, but these errors were encountered: