-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Google Cloud Run deployment not working #33313
Comments
After 48 hours of non-stop debugging, I found a solution: Turns out that many linux versions (such as However, there is a linux image that you can take :
Here is the final Dockerfile that works now :
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
1.48.2
Steps to reproduce
I try to deploy my nodeJS project to a Google Cloud Run.
But unfortunately, the location where chromium gets installed is corrupt !!
Normally, I do not have problems to deploy to Google Cloud Run.
But using your library
playwright
makes it hard.Inside my
package.json
file I add the following dependency:And I am using
yarn
.My method in my application looks as follows:
I am using the following ENV variable inside my Google Cloud Run:
PLAYWRIGHT_BROWSERS_PATH=0
(And I tried endless times to set this env var to something else so that it would work.
BUT I HAVE NO IDEA WHAT THIS
PLAYWRIGHT_BROWSERS_PATH
MUST BE ???? Any help here appreciated.But let'ts continue with my explanation:
The deployment works !
The chromium gets installed. I see this in the log of the GCR deployment log.
As you can see, it downloaded it to
/root/chromium-browser/chromium-1140
(or any other folder that I define in the Dockerfile.
--> Now the problem:
Whenever I call my method
createBuffer()
, then I get the following error-message inside the application log:CASE 1
--> if I use the followng cmd inside Dockerfile:
RUN npx -y [email protected] install --with-deps chromium
CASE 2
--> if I use the followng cmd inside Dockerfile:
RUN PLAYWRIGHT_BROWSERS_PATH=/root/chromium-browser npx -y [email protected] install --with-deps chromium
Error message :
My Dockerfile:
Expected behavior
I expect to be able to deploy into a Google Cloud Run, installing chromium and using the browser from playwright in my calling method in nodeJS.
Actual behavior
Two bugs:
Case I: If I don't use PLAYWRIGHT_BROWSERS_PATH inside the Dockerfile as ENV var :
It keeps telling me
Case II: I I do use PLAYWRIGHT_BROWSERS_PATH in the Dockerfile:
It keeps telling me
Failed to launch chromium because executable doesn't exist at <whatever I define as the ENV var>
Additional context
No response
Environment
Questions:
1. How can I make this deployment in Google Cloud Run work ?
2. How can I better determine where the Chromium is really installed ? And how do I refer to it in
executablePath
of the calling method ?3. How do I use
PLAYWRIGHT_BROWSERS_PATH
exactly ?? Is it needed in the Dockerfile ? If yes, how ?4. What else is missing ? Is there a working example of a Google Cloud Run deployment using nodeJS and Dockerfile ?
The text was updated successfully, but these errors were encountered: