Hi,
When i run the below code on my local N8N (npm installed) in function node , the code work fine and i get the status code the site, where as the same code i am executing on a N8N ( containerised) which also has puppeteer and other plugins installed, i get the error " ERROR: Cannot read property ‘split’ of undefined "
I am unable to find the reason as to why the containerised N8N is throwing this error message where as the local one works just fine. Please refer the code and error screen shot.
const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
puppeteer.use(StealthPlugin());
//const puppeteer = require('puppeteer');
const browser = await puppeteer.launch({ headless: true, executablePath: '/usr/bin/chromium-browser', slowMo:10 }) //args: ['--start-fullscreen']
const page = await browser.newPage()
const data = await page.goto('https://google.com', {
waitUntil: 'networkidle0',
});
var status = data.status();
return { status }
await browser.close();
Error Screenshot
Note: I know i can use a HTTP Node to get the status code, but the agenda is not to get the status code using puppeteer, its more than that. I want to try using puppeteer in a function node rather than using it on a execute node.