MadaShindeInai
MadaShindeInai
Explore posts from servers
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
No description
15 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
768 same thing
15 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
Hi. Trouble is, as I said earlier, I can't do stable reproduction. (I tried!) Even in current project, if I remove unnecessary routes, leaving only the ones that crashed with an error before and build again - build goes fine. But increasing the number of routes - the errors start dropping again. However, I can send an invite to the repository where this happens, and share environment variables in DM. Would that work?
15 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
:trpc:
15 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
UPD. tRPC v474 gives the same errors.
15 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
No type errors. From the types/linters side, everything is ok. typescript latest, eslint 9.19
15 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
Uh, almost forgot, Package versions: "@tanstack/react-query": "5.66.0", "@trpc/client": "11.0.0-rc.730", "@trpc/next": "11.0.0-rc.730", "@trpc/react-query": "11.0.0-rc.730", "@trpc/server": "11.0.0-rc.730",
15 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
No description
15 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
And really helper.dyhydrate() returns promise like data mixed with real responses. (I removed real one).
{
"json": {
"mutations": [],
"queries": [
{
"state": {
"data": null,
"dataUpdateCount": 0,
"dataUpdatedAt": 0,
"error": null,
"errorUpdateCount": 0,
"errorUpdatedAt": 0,
"fetchFailureCount": 0,
"fetchFailureReason": null,
"fetchMeta": null,
"isInvalidated": false,
"status": "pending",
"fetchStatus": "fetching"
},
"queryKey": [
[
"questions",
"getQuestionBySlug"
],
{
"input": {
"slug": "title2036261-ZB86Y"
},
"type": "query"
}
],
"queryHash": "[[\"questions\",\"getQuestionBySlug\"],{\"input\":{\"slug\":\"title2036261-ZB86Y\"},\"type\":\"query\"}]",
"promise": {}
},
]
},
"meta": {
"values": {
"queries.0.state.data": [
"undefined"
],
}
}
}
{
"json": {
"mutations": [],
"queries": [
{
"state": {
"data": null,
"dataUpdateCount": 0,
"dataUpdatedAt": 0,
"error": null,
"errorUpdateCount": 0,
"errorUpdatedAt": 0,
"fetchFailureCount": 0,
"fetchFailureReason": null,
"fetchMeta": null,
"isInvalidated": false,
"status": "pending",
"fetchStatus": "fetching"
},
"queryKey": [
[
"questions",
"getQuestionBySlug"
],
{
"input": {
"slug": "title2036261-ZB86Y"
},
"type": "query"
}
],
"queryHash": "[[\"questions\",\"getQuestionBySlug\"],{\"input\":{\"slug\":\"title2036261-ZB86Y\"},\"type\":\"query\"}]",
"promise": {}
},
]
},
"meta": {
"values": {
"queries.0.state.data": [
"undefined"
],
}
}
}
15 replies
TtRPC
Created by MadaShindeInai on 2/4/2025 in #❓-help
Error: Error serializing `.trpcState.json.queries[3].promise` returned from `getStaticProps`
I also double checked all chains from the "await prefetchHelper." up to prisma query, and can confirm that all async / await declarations are in place and defined explicitly.
15 replies
TtRPC
Created by DINO on 9/1/2024 in #❓-help
How do I create a React/Node full-stack project with tRPC?
I meant https://create.t3.gg/ T3-app setup. Just decouple NextJs from there and replace it with Remix 🙂 I may be wrong, but Idea is that you need to have both FE and BE part in your app (in the same repo). You can achieve it with Fullstack framework or maybe React + SST framework.
9 replies
TtRPC
Created by DINO on 9/1/2024 in #❓-help
How do I create a React/Node full-stack project with tRPC?
You can use Create-T3-app to create already configured app. If NextJS if not framework of your choise, you can use this setup as example.
9 replies
TtRPC
Created by brumbrum_brum on 8/17/2024 in #❓-help
Procedures with paramters.
I'm doing this 🙂 But you can check T3-app + Clerk.io integration example. They pass Clerk auth there.
9 replies
TtRPC
Created by brumbrum_brum on 8/17/2024 in #❓-help
Procedures with paramters.
You can pass any data to context and then access it in procedure
9 replies
TtRPC
Created by MadaShindeInai on 8/17/2024 in #❓-help
Prefertch() privateProcedure (Clerk) in gSSP
Ah, I needed to pass "auth" from gSSP to prefetchHelper. Works.
type getPrefetchHelperArgs = {
auth: Parameters<typeof createInnerTRPCContext>[number]["auth"];
};
export const getPrefetchHelper = ({ auth }: getPrefetchHelperArgs) => {
const prefetchHelper = createServerSideHelpers({
router: appRouter,
ctx: createInnerTRPCContext({ auth }),
transformer: superjson, // optional - adds superjson serialization
});
return prefetchHelper;
};
type getPrefetchHelperArgs = {
auth: Parameters<typeof createInnerTRPCContext>[number]["auth"];
};
export const getPrefetchHelper = ({ auth }: getPrefetchHelperArgs) => {
const prefetchHelper = createServerSideHelpers({
router: appRouter,
ctx: createInnerTRPCContext({ auth }),
transformer: superjson, // optional - adds superjson serialization
});
return prefetchHelper;
};
3 replies
TtRPC
Created by MadaShindeInai on 5/29/2023 in #❓-help
T3 app tRPC external calls
Upd. found that if using Clerk's webhooks, in opts.req.headers getting 'svix-webhooks/ ..." as user-agent. Will use that is identifier. Thank you.
10 replies
TtRPC
Created by MadaShindeInai on 5/29/2023 in #❓-help
T3 app tRPC external calls
yeah. It become a bit easier. Maybe you also can suggest an easy way to check from what domain request was sent? (To drop everything that was sent not from Clerk)
10 replies
TtRPC
Created by MadaShindeInai on 5/29/2023 in #❓-help
T3 app tRPC external calls
I'm sending a request from Clerk webhook (user.create, and maybe user update later). Maybe there are some kind of more smooth solutions for that?
10 replies