Skip to content
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]: Timed out after 60000 ms while trying to connect to the browser! Only Chrome at revision r1083080 is guaranteed to work. #9920

Closed
maxcountryman opened this issue Mar 27, 2023 · 8 comments

Comments

@maxcountryman
Copy link

maxcountryman commented Mar 27, 2023

Bug expectation

The browser to launch successfully.

It launches successfully for several periodic runs, every hour, until I see this error:

Timed out after 60000 ms while trying to connect to the browser! Only Chrome at revision r1083080 is guaranteed to work.

After this point Puppeteer no longer executes successfully and the program must be stopped and restarted.

Strangely, I see linger Chrome processes:

systemd+  950876  0.0  0.0 33575992 644 ?        Sl   10:00   0:00 /opt/google/chrome/chrome_crashpad_handler --monitor-self --monitor-self-annotation=ptype=crashpad-handler --database=/home/pptruser/.con
systemd+  950878  0.0  0.0 33567780   0 ?        Sl   10:00   0:00 /opt/google/chrome/chrome_crashpad_handler --no-periodic-tasks --monitor-self-annotation=ptype=crashpad-handler --database=/home/pptruser
systemd+  950884  0.0  0.0 33851664 168 ?        S    10:00   0:00 /opt/google/chrome/chrome --type=zygote --no-zygote-sandbox --headless=new --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerr
systemd+  950885  0.0  0.2 33851648 2084 ?       S    10:00   0:00 /opt/google/chrome/chrome --type=zygote --headless=new --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-
systemd+  950886  0.0  0.0 33568520   4 ?        S    10:00   0:00 /opt/google/chrome/nacl_helper
systemd+  950889  0.0  0.5 33851672 5680 ?       S    10:00   0:00 /opt/google/chrome/chrome --type=zygote --headless=new --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-
systemd+  950908  0.0  2.5 33944460 25584 ?      Sl   10:00   0:06 /opt/google/chrome/chrome --type=gpu-process --disable-dev-shm-usage --disable-breakpad --headless=new --ozone-platform=headless --use-an
systemd+  950909  0.0  1.2 33893052 12620 ?      Sl   10:00   0:02 /opt/google/chrome/chrome --type=utility --utility-sub-type=storage.mojom.StorageService --lang=en-US --service-sandbox-type=utility --di
systemd+  950959  0.0  0.4 1185805624 4100 ?     Sl   10:00   0:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  951239  0.3  6.1 1192121964 61888 ?    Sl   10:00   0:47 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  951269  0.0  0.3 1185805624 3996 ?     Sl   10:00   0:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  951547  0.0  1.6 1185824776 16676 ?    Sl   10:01   0:01 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  951559  0.0  1.5 1185813904 15740 ?    Sl   10:01   0:01 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  951591  0.0  0.8 1185805568 8272 ?     Sl   10:01   0:11 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  951602  0.0  0.5 1185797200 5316 ?     Sl   10:01   0:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  951629  0.1  6.5 1185806276 65220 ?    Sl   10:01   0:19 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  951667  0.1  4.5 1185814532 45292 ?    Sl   10:02   0:27 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  951682  0.0  0.3 1185805624 4000 ?     Sl   10:02   0:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  951982  0.0  9.0 1185805684 90832 ?    Sl   10:02   0:05 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  952004  0.0  0.3 33877632 3412 ?       Sl   10:02   0:02 /opt/google/chrome/chrome --type=utility --utility-sub-type=audio.mojom.AudioService --lang=en-US --service-sandbox-type=none --disable-d
systemd+  952023  0.0  0.4 1185805624 4140 ?     Sl   10:03   0:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  952304  0.3  6.9 1185814048 69264 ?    Sl   10:03   0:49 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  952330  0.0  0.4 1185805624 4272 ?     Sl   10:03   0:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  952597  0.0  0.4 1185805624 4088 ?     Sl   10:04   0:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  952860  0.0  0.4 1185805624 4276 ?     Sl   10:04   0:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  953143  0.0  1.9 1185814336 19380 ?    Sl   10:04   0:01 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  953170  0.0  2.3 1185814228 23256 ?    Sl   10:04   0:01 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  953210  0.0  0.6 1185801452 6008 ?     Sl   10:05   0:01 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  953221  0.0  0.8 1185823524 8496 ?     Sl   10:05   0:01 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  953255  0.0  0.6 1185805624 6924 ?     Sl   10:05   0:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  953561  0.1  6.3 1187920736 63356 ?    Sl   10:06   0:25 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  953597  0.3  2.3 1185814184 23992 ?    Sl   10:06   0:47 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  953669  0.2  5.4 1185813876 54276 ?    Sl   10:07   0:44 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  953682  0.0  0.6 1185797200 6228 ?     Sl   10:07   0:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  953718  0.0  0.6 1185808108 6632 ?     Sl   10:07   0:00 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  953753  0.2  6.9 1185817404 69732 ?    Sl   10:07   0:37 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  953888  0.2  5.4 1187919028 54440 ?    Sl   10:08   0:36 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp
systemd+  953957  0.0  1.4 1185820740 14400 ?    Sl   10:09   0:01 /opt/google/chrome/chrome --type=renderer --crashpad-handler-pid=19629 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/pupp```

### Bug behavior

- [X] Flaky
- [ ] PDF

### Minimal, reproducible example

```TypeScript
// Not easily reproducible, although happy to share generic parts of the Node module that may be related.

Error string

Timed out after 60000 ms while trying to connect to the browser! Only Chrome at revision r1083080 is guaranteed to work.

Puppeteer configuration

FROM node:19.6-slim

RUN apt-get update \
    && apt-get install -y wget gnupg \
    && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/googlechrome-linux-keyring.gpg \
    && sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/googlechrome-linux-keyring.gpg] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
    && apt-get update \
    && apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst fonts-freefont-ttf libxss1 \
      --no-install-recommends \
    && rm -rf /var/lib/apt/lists/*

ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
    PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome-stable

# [OMITTED]: Install Node executable leveraging Puppeteer...

Puppeteer version

19.6.3

Node version

19.6.1

Package manager

npm

Package manager version

9.4.0

Operating system

Linux

@github-actions
Copy link

github-actions bot commented Mar 27, 2023

This issue has an outdated Puppeteer version: 19.6.3. Please verify your issue on the latest 19.8.0 version. Then update the form accordingly.


Analyzer run

@github-actions github-actions bot added invalid and removed invalid labels Mar 27, 2023
@maxcountryman
Copy link
Author

I'm updating to the latest version and will report back. If that fails, I'll try to set up a separate repo with a project that demonstrates the issue. It's a bit tricky, because:

  1. The issue only occurs after some time where the Node process is operating as cron, periodically invoking the Puppeteer script and
  2. The site itself is somewhat slow; I won't be able to share the code directly, so I'll need to try to approximate this environment.

@OrKoN
Copy link
Collaborator

OrKoN commented Mar 28, 2023

Try using the official docker image we provide https://github.com/puppeteer/puppeteer/pkgs/container/puppeteer Perhaps it helps. But it looks like somehow the processes are not getting killed and perhaps the new ones don't start due to low memory.

@maxcountryman
Copy link
Author

@OrKoN what's different about the official image aside from it being Node 18? (Unless I missed something important, it should be copy/pasted.)

I unfortunately need Node 19 so I'll need a custom image either way.

@OrKoN
Copy link
Collaborator

OrKoN commented Mar 28, 2023

@maxcountryman the official image uses the Chromium version that is compatible with the Puppeteer version and in your image you use google-chrome-stable which might or might not be compatible with the current Puppeteer version. Plus there are slight differences between Chrome and Chromium builds.

@maxcountryman
Copy link
Author

I see. Well I can certainly alter it to use Chromium if you think that's important or could be related to this issue.

@stale
Copy link

stale bot commented May 27, 2023

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

@stale stale bot added the unconfirmed label May 27, 2023
@stale
Copy link

stale bot commented Jun 26, 2023

We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accommodate it!

@stale stale bot closed this as completed Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants