Bryan3
Bryan3
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Bryan3 on 8/25/2023 in #questions
TRPC vanilla client load failed when called on mobile browser
Hi, I have created a vanilla client to use TRPC without hooks in a create-t3-app project:
import { createTRPCProxyClient, httpBatchLink } from "@trpc/client";
import type { AppRouter } from "~/server/api/root";
import SuperJSON from "superjson";

export const trpcClient = createTRPCProxyClient<AppRouter>({
links: [
httpBatchLink({
url: "http://localhost:3000/api/trpc",
}),
],
transformer: SuperJSON,
});
import { createTRPCProxyClient, httpBatchLink } from "@trpc/client";
import type { AppRouter } from "~/server/api/root";
import SuperJSON from "superjson";

export const trpcClient = createTRPCProxyClient<AppRouter>({
links: [
httpBatchLink({
url: "http://localhost:3000/api/trpc",
}),
],
transformer: SuperJSON,
});
When I call const res = await trpcClient.example.hello.query({ text: "123" }); It works on desktop, but when using a mobile browser (tested on iOS safari and chrome), the following error is returned with no additional information being logged:
Unhandled Runtime Error
TRPCClientError: Load failed
Unhandled Runtime Error
TRPCClientError: Load failed
Is the error an issue with how the vanilla client is created and how might I be able to fix it? Thanks.
6 replies
TTCTheo's Typesafe Cult
Created by Bryan3 on 7/21/2023 in #questions
Backend equivalent to Create T3 App
Hi everyone, is there a backend equivalent to create T3 app for example with express/typescript/eslint installed? Thanks.
16 replies
TTCTheo's Typesafe Cult
Created by Bryan3 on 11/25/2022 in #questions
How to display two divs in exact same position using tailwind
Hi everyone, what's the best way display two divs on top of each other in the exact same position using tailwind? I've found some tutorials that mention using grid-area: https://css-tricks.com/positioning-overlay-content-with-css-grid/#aa-the-overlay-grid-area But tailwind doesn't seem to support grid-area (found a library that extends it but not sure if there's a simpler way). Thanks for your help!
3 replies
TTCTheo's Typesafe Cult
Created by Bryan3 on 11/19/2022 in #questions
How to trigger NextJS Image fetch again if not loaded in 3 seconds
Hi, I'm fetching images from an unreliable gateway that sometimes require multiple tries (same URL) to load the image. Is there a way using Next Image/Future Image to trigger a fetch from the same src link again if it is still loading after 3 seconds or if the load has failed? Thanks for your help!
15 replies