joschan21 / quill

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

Uploading Files stays in redirect phase #51

Open JasonMKY opened 9 months ago

JasonMKY commented 9 months ago

How do I fix this error? https://github.com/Manice18/chatdocu/issues/1#issue-2029424709

inextdeve commented 9 months ago

The problem is in the database that you're using, check the aborted_client variable in the database you will find it increment by one every time you upload a file, this error mean that the client died without closing the connection properly. Solutions : 1- try another databases, if sql databases does not work properly, change to the noSql databases, if you choose noSql db don't forget to modify the prisma schema for make it compatible with the noSql database 2- use an sql driver to connect with your db not ORM

anand-mukul commented 7 months ago

@JasonMKY Here is how you can do it:

  1. Delete node_modules and .next
  2. Copy my package.json then pnpm install
  3. Don't update the package.json file.
  4. For other issues Check my Repo

Demo: PDF Ninja Demo

Note: Check out my repository for reference 👍

You can also refer to this link for other issues: PDF Ninja Repository

If you find the project helpful, don't forget to give it a star ⭐️ on GitHub!

gptsparky commented 5 months ago

I had the same issue, file uploading didn't work when deployed. It was stuck at the upload box loading. Looking at the logs, the api/trpc/getFile endpoint was being polled every few seconds and never stopped (also error 404).

Afterward, I noticed the file was successfully uploaded to UploadThing but it was NOT added to the database (thus the infinite polling), so the issue was the code to add the file to the database wasn't running (the code in the callback onUploadComplete in src/app/api/uploadthing/core.ts).

Turns out Vercel was the issue, it allowed a maximum of a few seconds of computing at a time so the uploaded file was never added to the database as the code to do it timed out. Thus, the infinite polling.

TLDR; the solution is to deploy elsewhere like Netlify or upgrade from the Hobby plan on Vercel.