joschan21 / quill

Quill - A Modern SaaS-Platform Built With Next.js 13
1.86k stars 490 forks source link

[404] getFile?batch=1 404 #3

Open johanguse opened 11 months ago

johanguse commented 11 months ago

Hi, I tried running it on my localhost and encountered an error after uploading a PDF: POST http://localhost:3000/api/trpc/getFile?batch=1 404 (Not Found) httpUtils-0cb58db4.mjs:104

https://github.com/joschan21/quill/assets/6184866/d5c1dc0c-1fb5-434c-826c-c6c3b87a2b0d

abdulrehmanjaved-1 commented 11 months ago

Hey Joschan! I would like to work on it.

fxellence commented 11 months ago

Hello Guys, i am seeing the same issue, file uploaded fine, i can also see database entry for, it just take too much time for processing and then give me error "only 5 page is allowed" and i can see the same error "/api/trpc/getFile?batch=1 404 (Not Found) " in the browser console.. i am using just one page pdf.

KLGH24 commented 10 months ago

I get the exact same error. Anyone find a fix for this?

I think it has something to do with the pathing and indexing since batch=1 is the second in list of index but it should be batch=0 (when only one file). Not totally sure.

Roromus commented 10 months ago

It's totally normal. It's this code that does it in ChatWrapper.tsx const { data, isLoading } = trpc.getFileUploadStatus.useQuery( { fileId }, { refetchInterval: (data) => data?.status === "SUCESS" || data?.status === "FAILED" ? false : 500, } );

engmsaleh commented 10 months ago

Same issues any updates?

MrArabAi commented 10 months ago

any updates?

engmsaleh commented 10 months ago

What I have found until now is the problem is onUploadComplete isn't being called on the production environment and that is the cause getfile or getFileUploadStatus fails as the file is uploaded to uploadthing but not firing back the callback onUploadComplete on production

and as there is a polling loop it will wait forever for it without any progress My workaround is to make the next js app run in dev using npm run dev even on production

either on Vercel or any other host BTW: there is an issue on uploadthing repo about that issue, but isn't completed or defined yet

maximBurinskyi commented 9 months ago

Can someone explain how to run npm run dev in production?

ck18sss commented 8 months ago

I had this issue, What fixed the problem for me was that I had my OpenAI key spelled differently in my env file as compared to my /uploadthing/core file.

Aadityakesarwani commented 8 months ago

Any updates ? How to solve this issue.