Theo's Typesafe Cult

TTC

Theo's Typesafe Cult

Join the community to ask questions about Theo's Typesafe Cult and get answers from other members.

Join

ERROR handleCallbackRequest Failed to register callback result

I've integrated UploadThing in my platform. The client is a NextJS application and the server is a cluster of NestJS microservices. The issue is that after a successful file upload (on UploadThing the file is present), the onUploadComplete callback is not executed, thus not finishing the upload correctly on the client, because I'm getting: ```js...
Solution:
hey - that error you're getting is probably cause you're returning a string from onUploadComplete. We expect the return to be an object. I've submitted a patch that will type-error when returning primitive values so this will become a compile-time error instead of a surfacing first at runtime https://github.com/pingdotgg/uploadthing/pull/968

Vercel deployment: [cause]: SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON

I'm unsure where the error lies, but I'm getting [cause]: SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON During deployments on Vercel. This happens during the Generate Static Asssets step....

Missing API Key - server callback

https://uploadthing.com/api/serverCallback is returning 400 "Missing API Key" for some users, but not others, using the same server. The request Authorization header has the JWT from /api/uploadthing?actionType=upload pollingJWT on our site, and the requests look identical for users where it returns 200 and 400. What could be going wrong?

?CloudFlare - `Validating asset` "Pages only supports files up to 25 MiB in size"

Basic T3 / tRPC + Tw + R3F And I do have extensive Asset Images and content.json List, Located within the public folder, But besides that all I have is one basic welcome Page, and one simple THREE Canvas Page....

Question for YTbers / influencers

What kinds of contracts and agreements do you use and have written if any, especially if you also sell a product.

NextJS 14.2 Parallel Routes Change?

Finally going through Theo's awesome modern react tutorial [1]. I got to the point of deleting images and when the modal is visible it fails. This is because /src/app/@modal/(.)img/[id]/page.tsx has the modal which has the FullPageImageView component. That component calls getImage which checks to see if the image exists while getting it and throws an exception if it's not found (queries.ts->getImage if(!image) throw). Since the image was just deleted, it doesn't exist. I was bashing my head against the wall trying to find what was different. I even pulled the sample repo down and got it locally running without the error. Then I changed my package.json to reference "next": "14.1.3" (from sample code) instead of "^14.2.4" which it pulled in when I created the project. So, did something change in Next 14.2 parallel routes that causes a re-render before redirect('/') (imported from "next/navigation") where it didn't re-render before redirect on next 14.1? Looking at release notes [2, 3] there are several mentions about parallel routes [4 - 7]. But 4 is about not requiring a dummy default. 5 is about multi-slot layouts, which I don't think is at play here. 6 is about catch all slots, which again, doesn't seem to be in play. 7 may be related, but I frankly can't tell what it means. I think it has to do with inadvertant blank pages instead of loading states....

"Invalid signing secret" after upgrading to v7

Updated to v7, followed migration guide, but getting "Invalid signing secret". Anybody else getting this?

Uploaded Video Not Playing in Browser

I manually uploaded a video to Uploadthing a while back (e.g. via the website), which I’ve embedded on my website. It was working fine until today. I checked, and the file still exists in Uploadthing. When I visit the URL directly, I can hear the audio, and if I download the video, it plays perfectly on my device. However, it no longer plays in the browser, either at the direct link or when embedded on my website. I haven't made any changes on my end, so I’m wondering if there might be something I’m missing or if there’s an issue with the file and/or transcoding? Any help or suggestions would be greatly appreciated! (btw this is happening with all videos on my website, but not images)....

_error.tsx on nextjs pages

Do you guys know if its possible to make a custom page for Vercel serverless timeouts, I tried _error and 500 on pages folder doesnt seem to work. Existing discussion on Vercel's github doesnt have replies either....

ENV variable parsed with quotes "\""

I initialized t3-app with t3-env package to validate env variable on a Windows machine, the validation fails as the env variable is parsed as z.string().url() the .url() validation fails as the variable is parsed as "url" with the quotes, initially env variables was set as...

Sending arraybuffer/blob over trpc

Is it possible for me to send arraybuffer to frontend using trpc , because i think it JSON.stringifies the contents. Im hitting a api from backend which returns pdf data , when i try to send blob to frontend and convert from there to a document, it creates a blank pdf instead. Is there any way i can do it w/o uploading to aws.

T3 Stack with App router - Can't see new posts after mutation

Hey, I'm using the default T3 stack with App router, TRPC and Drizzzzzle. I have 2 pages: /posts and /posts/new. Why when submitting a new post, when I go to /posts I do not see the newly created post, only after a refresh? Please help, I'm losing my mind over App Router and kinda frankly hating it so far...

based on this video https://www.youtube.com/watch?v=14B85quRQhw at min 26:02

if you return from your context : ```const authProviderValue = { sessionExpired, authenticated, user,...

Correct setup for user-store with zustand react-query and axios

I'm starting a new react project and i trying to use all these library together: - zustand - react-query - axios - react router...

Fixing a difference between Gecko and Webkit

Looking at this in firefox and chrome leads to different results, firefox seemingly being broken. firefox is using the max possible width of the child rather than the width: auto; calculated width when calculating the size of the parent changing the auto width to a set pixel with fixes it, but ruins responsiveness. in chromium browsers, behavior is as expected. can anyone think up a non-js solution? or am i stuck using some weird hackiness to make it work https://play.tailwindcss.com/cD6Mxb4y4i?layout=horizontal...

Looking for a calendar aggregation service with a decent API

I'm writing a dashboard which contains a calendar agenda and am looking for a good free aggregator service for google, outlook, slack etc. which has a good api to fetch the agenda of the user. Any good suggestions?...

platforms to deploy node js backend with free plans

hey guys I am developing a node js backend with mysql I am looking for deployment platforms with free plans this is a portfolio project i don't want to spend any money on it

useQuery vs useSuspenseQuery

I'm having a hard time understanding in what's the main difference between useQuery and useSuspenseQuery? For example I prefetch one endpoint at page.tsx, considering that prefetch will prefill the cache then what will happen if I call useQuery instead on useSuspenseQuery? Also if a component is using useSuspenseQuery for some data, then how to invalidate that and fetch new data from some other component? With useQuery we do have invalidate function that I can call!...

HTML To .doc

Hey! I've added the below code to extract the html from a TipTap text editor and let the user generate/download a word .doc file. There isn't a whole lot of documentation on this type of code that i can find. Can anyone see any security issues with this or anything i should be aware of before giving users this functionality? const handleDownloadClick = () => { const htmlContent = editor.getHTML(); ...

Mac Terminal App

Hi! I was wondering which Terminal Apps yall use? I know this was asked before, but its been quite a bit since then so opinions may have changed. This is my first question here, I’m sorry if it is too noob-ish. I was also wondering which one Theo uses, because it seems to have autocompletion of some kind....