Giter VIP home page Giter VIP logo

Comments (9)

jurby avatar jurby commented on May 12, 2024 6

+1

from serverless-chrome.

martingagne avatar martingagne commented on May 12, 2024 3

Anybody was able to get headless Chrome running in Azure Function or Cloud Services? I am also facing the issue where chrome.exe does not seem to start.

from serverless-chrome.

adieuadieu avatar adieuadieu commented on May 12, 2024 2

I'm not currently interested in supporting Azure with this project, so I will close this issue.

from serverless-chrome.

seangwright avatar seangwright commented on May 12, 2024

At a high level, what are the steps required to get a version of this deployed to Azure Functions?
Are there low-level implementation details that need changed or is it more about the configuration?

I'm really interested in getting some variation of headless Chrome deployed to Azure Functions.

Thanks!

from serverless-chrome.

Ciantic avatar Ciantic commented on May 12, 2024

Have you tested that it works in "regular" Azure either? I had a problems running even the webkitopdf thing because Azure didn't have fonts etc. available. The regular Azure runs under some sandboxed Windows environment.

In the end I had to run Linux App service in Azure, which is a clunky, to generate PDF's.

from serverless-chrome.

seangwright avatar seangwright commented on May 12, 2024

From what I've been looking into recently wkhtmltopdf works fine even in Azure Functions' sandboxed environment if the fonts being used are webfonts (like https://fonts.google.com/specimen/Roboto).

You are right - if fonts need to be installed then you're out of luck.

I tested Puppeteer in Azure Functions and in Azure App Service within the past two weeks and was running into issues when node was spawning the chrome.exe process.

I started to look into the Linux Azure App Service but they are so new that support / documentation isn't really there.

from serverless-chrome.

Ciantic avatar Ciantic commented on May 12, 2024

@sgwatgit there is no documentation, but if you really need the Linux App Services I found out only way to use them is to create template using Visual Studio, it deploys normally to Azure. There is bunch of instructions for Linux App Services and all are outdated, but that is the only thing that worked for me.

I'm running a phantomjs/node thing at the moment in Linux App Service for generating PDFs.

from serverless-chrome.

hdd42 avatar hdd42 commented on May 12, 2024

had same problem and tried to use linux as ops (while you create your web app or web app for container select linux instead of windows )
this solved first part of the problem (it took you out of sandbox restrictions) after that select built -in runtime for your app (in my case selected node 8.x) and deployed it.

at that point I have to install missing necessary shared library dependencies for chrome.
Running Puppeteer in Docker

just use web ssh and install those deps maually

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &&\ sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' &&\ apt-get update &&\ apt-get install -y google-chrome-unstable

now everything ready to use Headless Chrome with Puppeteer but one more gotcha in your code need to be done,
chrome has to be launched with no-sanbox flags

let browser = await puppeteer.launch({ args: [ '--no-sandbox', '--disable-setuid-sandbox' ] });

this is the only workaround i could find, hope that helps to someone

from serverless-chrome.

remote-specialist avatar remote-specialist commented on May 12, 2024

any progress on this issue? we need it!:)

from serverless-chrome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.