title: Puppeteer Cluster Inconsistent Results
body: <p>I've recently converted a script over from Puppeteer to Puppeteer Cluster and during testing I've observed some odd results when testing multiple pages concurrently.</p>
  <p>Effectively I'm loading a single page and then iterating over the product options on the page and gathering the price for any product variants.</p>
  <p>One particular product has around 9 product variants, sometimes I will accurately capture all 9 variants, whereas on the next testing cycle it may only return 2 or 3 variants.</p>
  <p>Any help would be greatly appreciated!</p>
  <pre><code>const puppeteer = require('puppeteer');
  const { Cluster } = require('puppeteer-cluster');
  
  const Product = require('../utils/product')
  
  const config = require('../config/config.json')
  const selectors = config.productData;
  
  (async () =&gt; {
  
      const urls = [
          {link: ...},
          {link: ...},
          {link: ...}
      ]
  
      const cluster = await Cluster.launch({
          concurrency: Cluster.CONCURRENCY_CONTEXT,
          maxConcurrency: 5,
          puppeteerOptions: {
            headless: false
          },
      });
      
      
      await cluster.task(async ({ page, data: url }) =&gt; {
  
          //instantiate a new product object
          const product = new Product();
  
          await page.goto(url, { waitUntil: 'load' });
  
          const skuprice = await page.$eval(selectors.price, element =&gt; element.innerText);
  
          console.log('Sku Price:' + skuprice)
  
          //deal with variants
          const options = await page.$$eval(selectors.variant, elements =&gt; elements.map(element=&gt;element.id))
  
          if (options.length &gt; 0) {
  
              //set up a variants array
              for (let index = 0; index &lt; options.length; index++) {
              
                  const element = options[index];
  
                  await page.waitForSelector(`#${element}`);
                  await page.$eval(`#${element}`, radio =&gt; radio.click());
                  await page.waitForTimeout(500);
  
                  const variantprice = await page.$eval(selectors.price, element =&gt; element.innerText);
  
                  console.log('Variant Price:' + variantprice)
  
              }
  
          }
  
      });
  
      urls.forEach(url =&gt; { 
          cluster.queue(url.link);
      })
      
      // many more pages
      await cluster.idle();
      await cluster.close();
  
  
  })();
  </code></pre>