Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

237
Vistas
getServerSideProps giving error request time out after deployment
export async function getServerSideProps(context) {
    const docRef = doc(db, "chats", context.query.id);
    const messagesRes = await getDocs(query(collection(docRef, "messages"), orderBy('timestamp','asc')));
    const messages = messagesRes.docs.map((doc) => ({
     id: doc.id,
     ...doc.data(),
   }))
   .map((messages) => ({
     ...messages,
     timestamp: messages.timestamp.toDate().getTime(),
   }));

   const chatRes = await getDoc(docRef);
   const chat = {
    id: chatRes.id,
    ...chatRes.data()
   }
   return {
     props: {
       messages: JSON.stringify(messages),
       chat: chat,
     },
   };
}

This is my code for fetching the data from Firestore and using the data for populating my pages before rendering on web pages. This works fine when I am using in localhost before deployment, But after deployment on Vercel, it is taking too much time to render the pages on-screen and then shows request time out on screen. And an error in the function logs below:-

Some errors in function logs on Vercel:

some errors in function logs on vercel

Can anybody tell me why I am getting this error after deployment as it works fine before deployment. Below I am also attaching the link to the project https://chitzzapp.vercel.app/

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda