title: Chrome_Headless - Puppeteer returns empty content
body: <p>I am using Vuejs to create a web application to list invoices and I am using Chrome Headless to convert the content of that page to PDF. Everything runs inside docker containers.  </p>
  
  <p>I have two containers:<br>
  1. WebApp<br>
  2. Invoice processor</p>
  
  <p>I am trying to get the webpage content using puppeteer and then process it to convert its contents to PDF. The problem is that the content of the page is returning blank. I monitored the webapp logs and for some reason the requests to load the data from the server are not triggered.  </p>
  
  <p>Inside the webpage, I have dynamic content as it is an SPA, and I have multiple lists populated with  directives.</p>
  
  <p>Running puppeteer inside Docker is a little bit different because it does not install the Chromium dependencies, and they have to be installed manually.</p>
  
  <p>I followed those guidelines describe at the <a href="https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md" rel="nofollow noreferrer">troubleshooting section</a></p>
  
  <p>This is my Dockerfile:</p>
  
  <pre><code>FROM node:8-slim
  RUN apt-get update &amp;&amp; \
    apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
    libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
    libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
    libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
    ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
  
  COPY . /app/
  WORKDIR app
  
  RUN npm install -g
  
  ARG CACHEBUST=1
  RUN npm install puppeteer@0.13.0
  
  RUN groupadd -r pptruser &amp;&amp; useradd -r -g pptruser -G audio,video pptruser \
      &amp;&amp; mkdir -p /home/pptruser/Downloads \
      &amp;&amp; chown -R pptruser:pptruser /home/pptruser \
      &amp;&amp; chown -R pptruser:pptruser /app
  
  USER pptruser
  CMD ["npm", "start"]
  </code></pre>
  
  <p>The container runs perfectly and it starts to make requests to the <em>webApp container</em>.</p>
  
  <p>This is the code that I'm using to make the requests to the page</p>
  
  <pre><code>const browser = await puppeteer.launch({
    args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage']
  });
  const page = await browser.newPage();
  await page.goto(URL, { waitUntil: 'networkidle0' });
  await page.waitFor(5000);
  
  const aHandle = await context.evaluateHandle(() =&gt; document.body);
  const resultHandle = await context.evaluateHandle(body =&gt; body.innerHTML, aHandle);
  await aHandle.dispose();
  await resultHandle.dispose();
  
  await page.pdf({ path: path.join(__dirname, './page8.pdf') });
  await browser.close();
  </code></pre>
  
  <p>The webpage that should have been loaded is like </p>
  
  <pre><code>&lt;ul class="items"&gt;
    &lt;component v-for="item in dataList"
      :key="item.id"
      v-bind:value="item.value"/&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>dataList is inside my component data and is loaded from the server. The problem is that this list is not being populated, and the PDF that is being printed has those tables empty.</p>
  
  <p>IMPORTANT: Everything mentioned before works locally but not inside the Docker container.</p>
  
  <p>Thanks! :) </p>