Hi there,
I created a create-t3-app stack with drizzle, nextjs, typescript, nextauth, trpc, and db at planetscale. It works fine on local. But when i deploy it to vercel i get:
Application error: a server-side exception has occurred (see the server logs for more information).
Digest: 1526301433
In the vercel logs i see like:
<< query #2 post.hello {
input: { text: 'from tRPC' },
result: TRPCClientError: Unexpected token ; in JSON at position 4
at TRPCClientError.from (/var/task/.next/server/chunks/152.js:1:25003)
at /var/task/.next/server/chunks/152.js:1:29521
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
meta: undefined,
shape: undefined,
data: undefined,
[cause]: SyntaxError: Unexpected token ; in JSON at position 4
at JSON.parse (<anonymous>)
at parse (/var/task/.next/server/chunks/152.js:5:4111)
at /var/task/.next/server/chunks/152.js:5:3218
at onChunk (/var/task/.next/server/chunks/152.js:5:3371)
at readStandardChunks (/var/task/.next/server/chunks/152.js:5:3698)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async readLines (/var/task/.next/server/chunks/152.js:5:3452)
at async parseJSONStream (/var/task/.next/server/chunks/152.js:5:3058)
},
elapsedMs: 39
}
Why can this be?
Solution:Jump to solution
Disabling "settings / deployment protection / vercel authentication" solved the issue.
9 Replies
Solution
Disabling "settings / deployment protection / vercel authentication" solved the issue.
how did you even find this
thanks a lot I had the same problem for a while
just search this channel. I figured somebody should already have asked this. And they did. Success.
this helped me buyt this is some duuuuumb shit. stuff like this really makes you question the world
thank you lord and savior @oguzhankukul
Thank you! that fixed it for me too
Facing a similar issue with SST. Does anyone know of a solution?
in your src/trpc/react
you'll find unstable_httpBatchStreamLink just change it to using httpBatchLink that worked for me
@Khalil Thanks, that seems to have resolved that error. However, now I'm getting
TRPCClientError: Unable to transform response from server
... Does T3 App work with SST? I can't seem to find a working example of T3 App with SST using app router.That's probably something to do with superjson if it says transformer im not sure didnt get that one before try disabling it and see what that does and from there you can figure something out maybe