Commit Graph

99 Commits

Author SHA1 Message Date
robrobrobrob
f02b926245
fix: linux arm64 check on windows arm (#8917)
Closes #8915
2022-09-08 08:20:59 +00:00
Henrik Skupin
e05c199a05
chore: revert IPv4 DNS resolution workaround for Firefox from PR 8447 (#8825) 2022-08-22 14:00:56 +02:00
jrandolf
bdcb748b98
chore: infrastructure for injecting scripts into DOMWorlds (#8801) 2022-08-17 14:39:41 +02:00
jrandolf
ddbe88b887
chore: add custom rule for formatting comments (#8777) 2022-08-12 14:15:26 +02:00
Alex Rudenko
ee2540baef
fix: use targetFilter in puppeteer.launch (#8774)
Drive-by: adds Symbol.toStringTag to Target to simplify
debugging.

Closes #8772
2022-08-11 09:15:00 +00:00
Alex Rudenko
2abd772c9c feat: detect Firefox in connect() automatically (#8718)
This PR implements automatic detection of the Firefox product when the `.connect()` method is used. This partially undoes the breaking change in https://github.com/puppeteer/puppeteer/pull/8520 but it's also a breaking change on its own since we don't accept an explicit product name anymore (it does not look like it was used anyway).
2022-08-02 13:18:51 +00:00
Alex Rudenko
96d9608d1d fix: disable AcceptCHFrame (#8706)
Closes: #8479
2022-08-02 13:18:49 +00:00
Alex Rudenko
2cbfdeb0ca feat: use CDP's auto-attach mechanism (#8520)
* feat: use CDP's auto-attach mechanism

In this PR, we refactor Puppeteer to make use of the CDP's auto-attach mechanism. This allows the backend to pause
new targets and give Puppeteer a chance to configure them properly. This fixes the flakiness related to dealing with
OOPIFs and should fix some other issues related to the network interception and navigations. If those are not fixed completely by this PR, the PR serves a solid base for fixing them.

Closes https://github.com/puppeteer/puppeteer/issues/8507, https://github.com/puppeteer/puppeteer/issues/7990
Unlocks https://github.com/puppeteer/puppeteer/issues/3667

BREAKING CHANGE: With Chromium, Puppeteer will now attach to page/iframe targets immediately to allow reliable configuration of targets.
2022-08-02 13:18:07 +00:00
jrandolf
34ab5ca503
fix: import URL (#8670) 2022-07-21 08:20:51 +02:00
jrandolf
066f440ba7
feat: add documentation (#8593) 2022-07-01 11:52:39 +00:00
jrandolf
7001322cd1
feat: export public types only (#8584) 2022-06-27 09:24:23 +02:00
Pablo Matías Gomez
9787a1d8df
fix: clean up tmp profile dirs when browser is closed (#8580)
* fix: clean up tmp profile dirs when browser is closed
2022-06-27 07:40:30 +02:00
jrandolf
347101883f
chore: split Launcher.ts (#8544) 2022-06-23 00:13:39 +02:00
jrandolf
84712cbc28
chore: use Google's TS style guide's format config (#8542) 2022-06-22 15:25:44 +02:00
jrandolf
ce0dd25349
chore: use braces in function bodies (#8525) 2022-06-15 12:42:21 +02:00
jrandolf
e6442dd767
chore: use curly (#8519) 2022-06-14 13:55:35 +02:00
jrandolf
0678343b53
chore: move helper.js to util.js (#8510) 2022-06-14 13:16:21 +02:00
jrandolf
6c960115a3
chore: use private fields (#8506) 2022-06-13 11:16:25 +02:00
jrandolf
4d359906a4
fix: use error-like (#8504) 2022-06-10 15:27:42 +02:00
jrandolf
465a7c405f
feat: export puppeteer methods (#8493) 2022-06-09 19:00:50 +02:00
James Diefenderfer
7dc8e37a23
fix: Kill browser process when killing process group fails (#8477)
Fixes #8476. Similar fix to #8352 which only covered Windows.
2022-06-07 15:25:45 +02:00
jrandolf
b54dc55f76
fix: robustly check for launch executable (#8468) 2022-06-07 15:25:04 +02:00
Randolf J
1b025b4c84 fix: only lookup localhost for DNS lookups 2022-06-04 01:04:38 +02:00
jrandolf
f2d8276d6e
feat: support node 18 (#8447) 2022-06-01 13:53:17 +02:00
jrandolf
30438e6532
chore: use ts-doc and factor out importFSModule (#8449) 2022-06-01 11:11:09 +02:00
jrandolf
3f4451eff7
chore: extract puppeteer launch options to type (#8448) 2022-05-31 17:54:25 +00:00
Yutaka Hirano
2219eed386
chore: fix network-service related chromium feature settings (#8350) 2022-05-31 17:32:54 +02:00
jrandolf
b4e751f29c
feat: use strict typescript (#8401) 2022-05-31 16:34:16 +02:00
Simon
dccfadb90e
fix: kill browser process when 'taskkill' fails on Windows (#8352) 2022-05-16 13:32:29 +00:00
Alex Rudenko
eec2bf882b
chore: set up daily jobs for latest Chromium builds (#8344) 2022-05-13 12:15:12 +00:00
Alex Rudenko
4854ad5b15
fix: disable AvoidUnnecessaryBeforeUnloadCheckSync to fix navigations (#8330) 2022-05-11 09:41:53 +02:00
jrandolf
6841bd68d8
feat: support ES modules (#8306) 2022-05-09 11:17:24 +00:00
Valentin Semirulnik
baa017db92
feat: add support for Apple Silicon chromium builds (#7546)
Google has published Chromium builds for Apple Silicon so we can fetch it now

Related to #6622
2022-05-05 07:33:19 +00:00
Alex Rudenko
e841d7f9f3
fix: tests failing in headful (#8273)
* fix: test failing in headful

* fix: install Firefox for headful tests

* fix: skip favicon.ico requests in test

* fix: auth test in headful

* fix: disable NetworkTimeServiceQuerying

* fix: filter more favicon requests

* fix: network test with favicon

* fix: improve fixes
2022-05-02 11:37:21 +02:00
Alex Rudenko
1308d9aa6a
feat: support chrome headless mode (#8260)
* feat: support chrome headless mode

Co-authored-by: Ergün Erdoğmuş <erdogmusergun@gmail.com>
2022-04-25 13:11:23 +02:00
Henrik Skupin
b6504d7186
fix: also kill Firefox when temporary profile is used (#8233)
* fix: also kill Firefox when temporary profile is used

* fix: use separate tests for Puppeteer.launch should filter out ignored default arguments
2022-04-19 12:09:23 +00:00
Alex Rudenko
9ac7318506
fix: disable bfcache in the launcher (#8196)
Puppeteer has problems handling navigations to pages that
are restored from the back-forward cache. Let's disable it
until we have the support and test coverage.

Issues: #8182
2022-04-06 09:04:31 +02:00
liangwu
8f13470af0
fix: chromium downloading hung at 99% (#8169)
set keep-alive header to fix downloading done without 'finish' event trigged on some devices.
2022-03-31 08:08:22 +02:00
Alex Rudenko
85decdc28d
fix: regression in --user-data-dir handling (#8060) 2022-02-23 19:21:17 +00:00
Junyan
543a4d44bc
chore: remove console.error (#7883)
* chore: remove console.error

* fix: replace console.error with debugError

Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
2022-02-18 08:47:14 +00:00
Pasi Tuominen
0eb9c78617
fix: change kill to signal the whole process group to terminate (#6859)
* fix: change kill to signal the whole process group to terminate immediately

* chore: ignore taskkill errors

Co-authored-by: Jan Scheffler <janscheffler@chromium.org>
2022-02-17 12:17:33 +00:00
Josh Bielick
6d6ea9bf59
fix: always use ENV executable path when present (#7985)
Some recent changes to allow arm64 environments (including M1 macs) to
launch a chromium installation successfully before arm-compatible builds
were downloadable prevented the usage of PUPPETEER_EXECUTABLE_PATH in
some environments. Currently, when the platform is not darwin and the
arch is arm64, an executable cannot be specified using the environment
variable.

Generally speaking, environment variables have highest precedence for
options such as this since they depend on system configuration.

These change:

1. allow the ENV variable to always be used when defined and not
   specified in LaunchOptions (and when not puppeteer-core)
2. Retain the existing behavior of assuming /usr/bin/chromium-browser on
   platforms like Ubuntu (exact if-conditions preserved to avoid any
   breaking changes)
3. Add some tests for this particular portion of the code.
2022-02-11 13:07:31 +00:00
Alex Rudenko
179ededa14
revert: esm modules (#7996)
* Revert "fix(puppeteer): export internals (#7991)"

This reverts commit 448118cbdb.

* Revert "feat(puppeteer): export esm modules in package.json (#7964)"

This reverts commit 523b487e88.
2022-02-10 13:34:36 +00:00
jrandolf
523b487e88
feat(puppeteer): export esm modules in package.json (#7964)
* feat(puppeteer): export esm modules in package.json

Signed-off-by: Randolf Jung <jrandolf@chromium.org>

Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
Co-authored-by: Randolf Jung <jrandolf@chromium.org>
2022-02-09 07:47:27 +00:00
Alex Rudenko
9afdc6300b
fix: make projectRoot optional in Puppeteer and launchers (#7967) 2022-02-07 12:59:44 +01:00
Alex Rudenko
0636513e34
fix: make more files work in strict-mode TypeScript (#7936) 2022-01-28 09:38:36 +00:00
Connor Clark
9f9b4ed72a
fix: clearer jsdoc for behavior of headless when devtools is true (#7748)
The existing comment suggests that only the default changes–however, even if you set `devtools: false` and `headless: true`, Puppeteer will still open with headful.
2021-11-16 21:31:24 +01:00
Henrik Skupin
fc94a28778
fix: try to remove the temporary user data directory after the process has been killed (#7761) 2021-11-15 11:52:09 +00:00
Henrik Skupin
51e61696c1
fix: only kill the process when there is no browser instance available (#7762)
When the browser has been started and we have a valid reference lets make use of it instead of force-killing the process. A force kill should probably be the last resort in cleaning up the process.

This will help with Firefox as described on #7668 (comment).
2021-11-11 09:19:23 +01:00
Henrik Skupin
790c7a0eb9
feat: support for custom user data (profile) directory for Firefox (#7684)
When using a custom Firefox profile for Puppeteer the modified
preferences as present in prefs.js need to be reset once the
profile is no longer needed by Puppeteer. If not done this could
cause side-effects when the profile is used next time outside
of Puppeteer.

As ride-along fix the "--foreground" argument for Firefox will
only be used on MacOS because that's the only supported platform.
2021-11-10 13:31:15 +01:00