Skip to content
Back

Can't see the logs from my appwrite function

  • 0
  • React Native
  • Cloud
SorryLad2
23 Nov, 2024, 21:54

Hey guys, I'm new here so please feel free to beat me up for being dumb. I am running a function using Node.js and keep getting the error below. I am trying to troubleshoot it, but I can't get any console.logs or console.errors to actually print out. Maybe I am looking for them in the wrong place? Maybe getting written natively and not to appwrite logs? Help!

TypeError: Cannot read properties of undefined (reading 'res') at module.exports (/usr/local/server/src/function/src/main.js:73:20) at execute (/usr/local/server/src/server.js:210:22) at action (/usr/local/server/src/server.js:225:27) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async /usr/local/server/src/server.js:14:5

TL;DR
Developers, having trouble viewing logs for an appwrite function in Node.js. Facing a TypeError: Cannot read properties of undefined error. Need help debugging and locating console logs. Solution: The error may be due to an undefined property 'res'. Check the code at line 73 in main.js to fix the issue.
SorryLad2
23 Nov, 2024, 21:56

For context, I am expecting a pre-build json payload from my front-end which I am passing to openAI api for image analysis, have no idea where it's blowing up... How do most people debug functions? Is there a way to do it locally or something?

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