Krulknul
Krulknul
TtRPC
Created by Krulknul on 8/16/2024 in #❓-help
The string did not match the expected pattern
Well, I figured it out. Seems somehow ngrok was the problem anyway. Since HTML was being returned (the ngrok browser warning screen), the json deserialization was failing, resulting in this error. To fix, I added the ngrok-skip-browser-warning header, which worked:
const trpc = createTRPCClient<AppRouter>({
links: [
httpBatchLink({
url: "https://[redacted].ngrok-free.app",
headers: new Headers({
"ngrok-skip-browser-warning": "1",
}),
}),
],
});
const trpc = createTRPCClient<AppRouter>({
links: [
httpBatchLink({
url: "https://[redacted].ngrok-free.app",
headers: new Headers({
"ngrok-skip-browser-warning": "1",
}),
}),
],
});
4 replies