This topic was automatically generated from Slack. You can find the original thread here.
Hiya, I’m really lost with this
Error: Process ended too soon
at handleError (/var/task/common.js:38:40)
at Runtime.handler (file:///var/task/lambda_handler.mjs:989:5)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
I’ve tested all the steps individually and they seem to pass individually. When i disable everything afterwards leaving just he trigger and the delay, i still get the error.
Sure lemme give a quick overview, we’re just tracking order data but adding more information about the customer from other sources:
• the delay is used to wait for external apis to fully complete processing order info
• the phone number of the customer is fetched from activecampaign api using python
• the event data is then added to facebook conversions api
• and an email is sent in case of errors
To my knowledge the whole script was working fine up for a couple of months. And i have similar scripts that i haven’t touched which are continuing to work fine.
Then around a month ago, i wanted to update the script to add more customer information, but (if i remember correctly) re-deploying without any changes broke the script and i had to end up updating the python version of the script which didn’t help but i can’t revert to the oldest working version of the script
That error sounds like the workflow ended execution before the step completed, we usually see that in Node.js code steps when a promise isn’t properly fulfilled before the workflow moves onto the next step.
Have you tried reverting to an older version of the Facebook package you’re using? There might be some kind of new change to the library that changes how requests are made
import time, re
from facebook_business.adobjects.serverside.action_source import ActionSource
from facebook_business.adobjects.serverside.content import Content
from facebook_business.adobjects.serverside.custom_data import CustomData
from facebook_business.adobjects.serverside.delivery_category import DeliveryCategory
from facebook_business.adobjects.serverside.event import Event
from facebook_business.adobjects.serverside.event_request import EventRequest
from facebook_business.adobjects.serverside.user_data import UserData
from facebook_business.api import FacebookAdsApi
def handler(pd: "pipedream"):
# Reference data from previous steps
access_token = 'EA...'
pixel_id = '...'
test_event_code='TEST4207'
#FacebookAdsApi.init(access_token=access_token)
user_data_dict = {
"emails": [pd.steps["trigger"]["event"]["body"]["billing_email"]]
}