I am getting error when running the scrapper function in a cron, and throw the error at the second run.
TypeError: Cannot read properties of null (reading 'type') at Object.createResource
async function secretAgentFunction({ url }) {
await agent.goto(url);
console.log('Running ----- ', url)
await agent.close();
}