You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
🐛 Bug Report:🐛 Bug Report: am getting an error on a cloud function, Internal curl errors has occurred within the executor! Error Number: 52. Error Msg: Empty reply from server\nError Code: 500 #9240
create a function, and deploy it to your appwriting hosting and execute it with bun, am using appwrite selfhosted, export
asyncfunctionsendEmail(options){try{// Validate scheduledAt dateconstscheduledAt=formatScheduledTime(options.scheduledAt,options.delayInMs);if(scheduledAt&&newDate(scheduledAt)<=newDate()){thrownewError('Scheduled time must be in the future.');}constpayload={messageId: options.messageId||generateUniqueId(),subject: options.subject,content: options.content,topics: options.topics||[],users: options.users||[],targets: options.targets||[],cc: options.cc||[],bcc: options.bcc||[],attachments: options.attachments||[],draft: options.draft||false,html: options.html??true,
scheduledAt,};console.log(payload)constresponse=awaitaxios.post(`${process.env.APPWRITE_FUNCTION_API_ENDPOINT}/messaging/messages/email`,payload,{headers: {'Content-Type': 'application/json','X-Appwrite-Project': process.env.APPWRITE_FUNCTION_PROJECT_ID,'X-Appwrite-Key': process.env.APPWRITE_API_KEY,},});console.log('Email sent successfully:')thrownewError("error")}catch(error){console.log("An error occured")thrownewError("error")}}// Utility to generate a unique IDfunctiongenerateUniqueId(){return(Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)).substring(0,36);// Ensures max length of 36 chars}
this is the code am calling to send the emails.
awaitsendEmail({messageId: ID.unique(),subject: '🎉 Welcome to Fundi Wangu - Your Home Service Solution!',content: "hello",users: [userId],html: true,});returnres.json({success: true});}catch(error){returnres.json({success: false,error: error.message,},500);}
i keep on getting this error on the cloud functions online
Internal curl errors has occurred within the executor! Error Number: 52. Error Msg: Empty reply from server\nError Code: 500
but the email is sent perfectly, here is my appwrite config
The error should not be there since am returning json data and the function is sendin the email
👎 Actual Behavior
The function sends the email , but in the appwrite dashboard it shows error, Internal curl errors has occurred within the executor! Error Number: 52. Error Msg: Empty reply from server\nError Code: 500 and a failed status
🎲 Appwrite version
Version 1.6.x
💻 Operating system
Linux
🧱 Your Environment
No response
👀 Have you spent some time to check if this issue has been raised before?
changed the title [-]🐛 Bug Report:[/-][+]🐛 Bug Report:🐛 Bug Report: am getting an error on a cloud function, Internal curl errors has occurred within the executor! Error Number: 52. Error Msg: Empty reply from server\nError Code: 500[/+]on Jan 18, 2025
This issue has been labeled as a 'question', indicating that it requires additional information from the requestor. It has been inactive for 7 days. If no further activity occurs, this issue will be closed in 14 days.
Activity
[-]🐛 Bug Report:[/-][+]🐛 Bug Report:🐛 Bug Report: am getting an error on a cloud function, Internal curl errors has occurred within the executor! Error Number: 52. Error Msg: Empty reply from server\nError Code: 500[/+]DH-555 commentedon Jan 22, 2025
What's the environment of this?
Self hosting? If so, what version and machine specs?
github-actions commentedon Feb 1, 2025
This issue has been labeled as a 'question', indicating that it requires additional information from the requestor. It has been inactive for 7 days. If no further activity occurs, this issue will be closed in 14 days.
github-actions commentedon Feb 15, 2025
This issue has been closed due to inactivity. If you still require assistance, please provide the requested information.