- Puppeteer version: 9.0.0
 - Platform / OS version: google cloud functions
 - Node.js version: 14
 
const puppeteer = require('puppeteer')
exports.MyFunc = function MyFunc(req, res) {
  MyFunc(req, res);
  async function MyFunc(req, res) {
    const browser = await puppeteer.launch();
    const page = await browser.newPage();
    await getSearchResults();
    
     async function getSearchResults() {
      const url = `https://abc.redacted.com/search?q=${query}&f=&orderBy=${sort_by}&skip=0&take=10`;
      console.log(url);
      await page.goto(url, { waitUntil: "domcontentloaded" });
      console.log("Page downloaded"); // It console logs till here
      const getResults =  await page.evaluate(() => {
      let items = [];
      const results = document.querySelectorAll(
        "#mainArea > router-view > ma-serp > div > div.results > div > compose > div > div.results > ma-card"
      );
      console.log(results);
      for (let result of results) {
        console.log(result.querySelector("span")?.innerText ?? "");
        items.push({ title: result.querySelector("span")?.innerText ?? "", })
      };
      return items;
      });
      const data = getResults;
      res.status(200).json(data);  // just getting {}
      await browser.close();
      }
  }
}
IDK why but page.evaluate() doesn't console log anything and doesn't return anything to node environment. From three days I'm trying different solutions on stack overflow and GitHub issues but no success until now.
- I've also tried 
promise.resolve()when returning frompage.evaluatebut that doesn't work either.