Back

Task timed out after 5.00 seconds

  • 0
  • Auth
  • Web
  • Storage
  • Cloud
Fulton
17 Jul, 2024, 11:58

Does someone know why do i get this error when i try to load images on the deployed version on vercel, locally there is no errors, is there anything wrong with my code or it's a vercels problem ```const ImageUploadComponent = async () => { noStore(); const user = await getLoggedInUser(); const currentLoggedInUser = await getSavedUser(user?.$id);

const fileId = await currentLoggedInUser?.profileImage;

const userProileImage = fileId ? await getProfileImage(fileId) : null;

const currentImage = fileId ? new Buffer.from(userProileImage).toString("base64") : null;

return ( <section className="container px-2 md:px-10 py-10 mx-auto bg-white rounded-md"> <div> {/* <h3 className="title font-bold border-b mb-10">Photo de profile</h3> */} <div className="border border-dashed rounded-md flex flex-col sm:flex-row p-2 h-fit gap-2 "> {userProileImage && ( <ServerProfileImage fileId={fileId} currentImage={currentImage} /> )}

TypeScript
      <AvatarComponent fileId={fileId} />
      {/* )} */}
    </div>
  </div>
</section>

); };

export default ImageUploadComponent; ```

TL;DR
Error message: Task timed out after 5 seconds when trying to load images on deployed version on Vercel, but no errors locally. Possible issue with the async function causing the timeout. Image loading code needs to be optimized to prevent timeout errors on Vercel deployment.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more