0

Im trying to install a chrome binary, on a server which located at firebase server; but, I don't really know where I can install it,

so I've try a couple of ways , first, by using the google cloud shell, I manage to install it using those command on the cloud shell: from the google cloud shell

   myusername@cloudshell:~

first the download:

$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

then, the installation :

sudo apt install ./google-chrome-stable_current_amd64.deb

its a good place to say that, I have no idea, where this installation take place, and I don't know if my firebase project even 'know' about this..

but it worth a try, so in my index.js file , I have a function that supposes to go to the 'path' in which this installation was done, according to the the info I found in the web, its supposed to be at:

enter image description here

and so tried my luck and give this path to my function :

enter image description here

this lead to an error in the firebase logs, that tells me that the binary is no where to be found in the given path:

enter image description here

so, this lead me to ask a couple questions:

  1. can I navigate to my firebase project from the google cloud shell?, and then install there the chrome binary? in which folder that I choose to? , or even do more things, like installing packages etc, iike is was my local machine?

  2. my general idea is to run a selenium web driver, on the firebase servers, is that possible?

yehudshe
  • 45
  • 7
  • 1
    The common way to do this is through puppeteer. See https://stackoverflow.com/questions/43732991/possible-to-run-headless-chrome-chromium-in-a-google-cloud-function and more from https://www.google.com/search?q=use+chrome+in+cloud+functions – Frank van Puffelen Jan 17 '22 at 19:29
  • I have posted an answer instead of the comment expecting it can help other users with similar issues. – Alex Jan 28 '22 at 20:29

1 Answers1

0

In case you are trying to do this using Cloud functions, at this moment you cannot install any custom software, as already discussed in this question. As an alternative, the answer offers using Google App Engine to process heavy work. I would suggest making another question with the reason why you want to install Chrome or use it with your Cloud function. Maybe that would give better results, as the only options I see are following Frank’s commented question with headless Chrome or using GAE.

Alex
  • 778
  • 1
  • 15