al1abb / invoify

An invoice generator app built using Next.js, Typescript, and Shadcn
https://invoify.vercel.app
MIT License
368 stars 72 forks source link

[BUG] - Error in Vercel #329

Open mrcanelas opened 4 months ago

mrcanelas commented 4 months ago

Issue Summary When deploying my application to Vercel, I encounter a FUNCTION_INVOCATION_TIMEOUT error, indicating that there was a timeout during the invocation of one of my functions. This issue occurs only in the production environment on Vercel; locally, everything works fine.

Environment Browser/Platform: N/A (This issue pertains to server-side deployment on Vercel) Steps to Reproduce Deploy the application to Vercel. Access the application in the production environment. Expected Behavior The application should deploy successfully without any timeout errors, and it should function as expected in the production environment.

Actual Behavior During deployment to Vercel, the function invocation times out, resulting in a FUNCTION_INVOCATION_TIMEOUT error. The deployment fails, and the application does not function correctly in the production environment.

Screenshots/Logs N/A

Additional Information The issue occurs only in the production environment on Vercel. Locally, the application functions as expected. No recent changes have been made to the application code that could directly cause this timeout issue. The function that times out may be related to PDF generation using Puppeteer or Onedoc. The timeout may be due to resource constraints or limitations on Vercel's serverless environment. Possible Solutions Investigate potential optimizations in the function code to reduce execution time. Consider asynchronous processing or offloading heavy tasks to separate services. Verify resource usage and limitations on Vercel's serverless platform. Test alternative deployment strategies or serverless providers if necessary.

Acceptance Criteria

[x] The issue is confirmed and reproducible. [x] Relevant details about the environment are provided. [ ] Steps to reproduce are clear and concise. [x] Expected and actual behavior are described. [ ] Screenshots/logs (if applicable) are attached. [x] Any additional relevant information is included.

[Note: Please replace the placeholders in square brackets with specific information related to your bug report.]