I'm trying to test my scheduled functions locally using nodejs 16*. Doesn't seem to kick off. When i do try to run it from the browser i get the following error.
functions: TypeError: Cannot read properties of undefined (reading 'data')
This how i try to force it -
http://localhost:5001/<my_projectt_id>/us-central1/cronAppData-0
This is the scheduled task. Run on the cloud fine, only failing locally.
const cronAppData = functions.pubsub
.schedule('*/1 * * * *')
.onRun(async(context) => {
// this is another fuction doing the processing (doesn't make it this far)
const data = await run();
return;
});
Any ideas?