Commit Graph

2595 Commits

Author SHA1 Message Date
Dmitry Gozman
2bed312911
fix(electron): emit close events in the correct order (#3111) 2020-07-23 11:02:43 -07:00
Dmitry Gozman
30e21e0bee
test: fix api coverage (#3114)
Coverage for browser-specific events was missing.
2020-07-23 10:30:47 -07:00
Dmitry Gozman
244ce45799
test: add a test for mouse.dblclick (#3115)
We never call it the tests, but coverage does not catch it.
2020-07-23 10:30:35 -07:00
Yury Semikhatsky
c895c972ae
browser(webkit): kick-off build for #3100 (#3113) 2020-07-23 09:32:22 -07:00
Yury Semikhatsky
08b0dc6b8a
feat(webkit,firefox): bump versions (#3110) 2020-07-23 09:17:30 -07:00
Yury Semikhatsky
1cfba7f582
browser(webkit): periodically capture frames on mac regardless of updates 2020-07-22 23:38:48 -07:00
Yury Semikhatsky
26c57846bb
Rebase (#3096) 2020-07-22 23:34:52 -07:00
Yury Semikhatsky
3d37e4586e
browser(firefox): pass actual frame duration to the codec (#3101)
#1158
2020-07-22 23:27:49 -07:00
Pavel Feldman
b271624fcb
browser(webkit): hardcode woff enabled on win (#3103) 2020-07-22 20:46:00 -07:00
Dmitry Gozman
68c4f79b02
feat(rpc): convert protocol to yaml (#3102) 2020-07-22 19:38:19 -07:00
Dmitry Gozman
b1a5a02154
feat(rpc): client-side parameters validation (#3069) 2020-07-22 18:05:07 -07:00
Pavel Feldman
e56e148597
test(postData): add a failing firefox test (#3098) 2020-07-22 17:27:05 -07:00
Dmitry Gozman
65002a0ac2
feat(rpc): support firefox user prefs (#3093)
Also ignore firefoxUserPrefs in launchPersistentContext according to our api.
2020-07-22 17:20:00 -07:00
Pavel Feldman
80c0711d98
feat(firefox): roll firefox to r1137 (#3095) 2020-07-22 15:59:37 -07:00
Pavel Feldman
2a08883ef8
chore(download): follow up to remove the redundant checks (#3097) 2020-07-22 15:59:11 -07:00
Pavel Feldman
baa0956915
Revert "test: screenshot on failure (#3053)" (#3091)
It should be opt-in and configurable. The folder we collect information
into should be consistent with the rest of the artifacts we collect.
Lets revisit it later.
2020-07-22 15:00:37 -07:00
Ross Wollman
d8a17fb0ab
api(download): Add saveAs helper (#2872) 2020-07-22 14:55:27 -07:00
Dmitry Gozman
4db035dff4
chore: roll_browser to also update docs (#3088) 2020-07-22 11:03:35 -07:00
Andrey Lushnikov
ea5dfdbec7
fix: re-write Chromium startup error with clear instructions (#3070)
This patch detects Chromium crash with a sandboxing error and re-writes
the error to surface information nicely.

#### Error Before:

```sh
pwuser@23592d09b3bd:~/tmp$ node a.js
(node:324) UnhandledPromiseRejectionWarning: browserType.launch: Protocol error (Browser.getVersion): Target closed.
=========================== logs ===========================
[browser] <launching> /home/pwuser/.cache/ms-playwright/chromium-790602/chrome-linux/chrome --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disab
le-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies --disable-hang-monitor --disab
le-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --user-data-dir=/tmp/playwrig
ht_chromiumdev_profile-mjSfr2 --remote-debugging-pipe --headless --hide-scrollbars --mute-audio --no-startup-window
[browser] <launched> pid=401
[browser] [0722/170825.030020:FATAL:zygote_host_impl_linux.cc(117)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live
dangerously and need an immediate workaround, you can try using --no-sandbox.
[browser] #0 0x55ac4f8c7be9 base::debug::CollectStackTrace()
[browser] #1 0x55ac4f841c13 base::debug::StackTrace::StackTrace()
[browser] #2 0x55ac4f853680 logging::LogMessage::~LogMessage()
[browser] #3 0x55ac4df2307e content::ZygoteHostImpl::Init()
[browser] #4 0x55ac4f40dd47 content::ContentMainRunnerImpl::Initialize()
[browser] #5 0x55ac4f45c9fa service_manager::Main()
[browser] #6 0x55ac4f40c361 content::ContentMain()
[browser] #7 0x55ac4f45b5bd headless::(anonymous namespace)::RunContentMain()
[browser] #8 0x55ac4f45b2bc headless::HeadlessShellMain()
[browser] #9 0x55ac4ccc22e7 ChromeMain
[browser] #10 0x7f0f3d736b97 __libc_start_main
[browser] #11 0x55ac4ccc212a _start
[browser]
[browser] Received signal 6
[browser] #0 0x55ac4f8c7be9 base::debug::CollectStackTrace()
[browser] #1 0x55ac4f841c13 base::debug::StackTrace::StackTrace()
[browser] #2 0x55ac4f8c7785 base::debug::(anonymous namespace)::StackDumpSignalHandler()
[browser] #3 0x7f0f437b3890 (/lib/x86_64-linux-gnu/libpthread-2.27.so+0x1288f)
[browser] #4 0x7f0f3d753e97 gsignal
[browser] #5 0x7f0f3d755801 abort
[browser] #6 0x55ac4f8c66e5 base::debug::BreakDebugger()
[browser] #7 0x55ac4f853aeb logging::LogMessage::~LogMessage()
[browser] #8 0x55ac4df2307e content::ZygoteHostImpl::Init()
[browser] #9 0x55ac4f40dd47 content::ContentMainRunnerImpl::Initialize()
[browser] #10 0x55ac4f45c9fa service_manager::Main()
[browser] #11 0x55ac4f40c361 content::ContentMain()
[browser] #12 0x55ac4f45b5bd headless::(anonymous namespace)::RunContentMain()
[browser] #13 0x55ac4f45b2bc headless::HeadlessShellMain()
[browser] #14 0x55ac4ccc22e7 ChromeMain
[browser] #15 0x7f0f3d736b97 __libc_start_main
[browser] #16 0x55ac4ccc212a _start
[browser]   r8: 0000000000000000  r9: 00007ffd38a863b0 r10: 0000000000000008 r11: 0000000000000246
[browser]  r12: 00007ffd38a87680 r13: 00007ffd38a86610 r14: 00007ffd38a87690 r15: aaaaaaaaaaaaaaaa
[browser]   di: 0000000000000002  si: 00007ffd38a863b0  bp: 00007ffd38a86600  bx: 00007ffd38a86e44
[browser]   dx: 0000000000000000  ax: 0000000000000000  cx: 00007f0f3d753e97  sp: 00007ffd38a863b0
[browser]   ip: 00007f0f3d753e97 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
[browser]  trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[browser] [end of stack trace]
[browser] Calling _exit(1). Core file will not be generated.
============================================================
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.Error
    at /home/pwuser/tmp/node_modules/playwright/lib/chromium/crConnection.js:131:63
    at new Promise (<anonymous>)
    at CRSession.send (/home/pwuser/tmp/node_modules/playwright/lib/chromium/crConnection.js:130:16)
    at CRSession.send (/home/pwuser/tmp/node_modules/playwright/lib/helper.js:78:31)
    at Function.connect (/home/pwuser/tmp/node_modules/playwright/lib/chromium/crBrowser.js:54:39)
    at Chromium._connectToTransport (/home/pwuser/tmp/node_modules/playwright/lib/server/chromium.js:52:38)
    at Chromium._innerLaunch (/home/pwuser/tmp/node_modules/playwright/lib/server/browserType.js:87:36)
    at async ProgressController.run (/home/pwuser/tmp/node_modules/playwright/lib/progress.js:75:28)
    at async Chromium.launch (/home/pwuser/tmp/node_modules/playwright/lib/server/browserType.js:60:25)
    at async /home/pwuser/tmp/a.js:4:19
(node:324) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise reject
ion, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:324) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
```


#### Error After:

```sh
pwuser@23592d09b3bd:~/tmp$ node a.js
(node:222) UnhandledPromiseRejectionWarning: browserType.launch: Chromium sandboxing failed!
================================
To workaround sandboxing issues, do either of the following:
  - (preferred): Configure environment to support sandboxing: https://github.com/microsoft/playwright/blob/master/docs/troubleshooting.md
  - (alternative): Launch Chromium without sandbox using 'chromiumSandbox: false' option
================================
Error
    at /home/pwuser/tmp/node_modules/playwright/lib/chromium/crConnection.js:131:63
    at new Promise (<anonymous>)
    at CRSession.send (/home/pwuser/tmp/node_modules/playwright/lib/chromium/crConnection.js:130:16)
    at CRSession.send (/home/pwuser/tmp/node_modules/playwright/lib/helper.js:78:31)
    at Function.connect (/home/pwuser/tmp/node_modules/playwright/lib/chromium/crBrowser.js:54:27)
    at Chromium._connectToTransport (/home/pwuser/tmp/node_modules/playwright/lib/server/chromium.js:53:38)
    at Chromium._innerLaunch (/home/pwuser/tmp/node_modules/playwright/lib/server/browserType.js:89:36)
    at async ProgressController.run (/home/pwuser/tmp/node_modules/playwright/lib/progress.js:75:28)
    at async Chromium.launch (/home/pwuser/tmp/node_modules/playwright/lib/server/browserType.js:61:25)
    at async /home/pwuser/tmp/a.js:4:19
(node:222) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise reject
ion, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:222) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
```

References #2745
2020-07-22 10:57:58 -07:00
Dmitry Gozman
1aee8dfc7c
feat(rpc): align types/guids in the protocol with their pdl definition (#3079)
This makes the protocol self-explanatory, and avoids silly conversions
in codegenerators, e.g. cdpSession <-> CDPSession.
2020-07-22 10:37:21 -07:00
Pavel Feldman
f50f228a1f
browser(chromium): roll chromium to r790602 (#3082) 2020-07-22 09:21:23 -07:00
Joel Einbinder
773ee08e9d
chore(test): restore api coverage checks (#3068)
* chore(test): restore api coverage checks

* try to catch the correct error on the bots

* try to trick github into taking the new code

* uninstall coverage

* dgozman comments
2020-07-22 09:08:10 -07:00
Yury Semikhatsky
6e75533c63
chore: respect jest params in npm run wtest (#3085) 2020-07-22 08:57:54 -07:00
Pavel Feldman
2b0b0a9119
fix(misc): assorted fixes (#3031) 2020-07-21 23:48:21 -07:00
Dmitry Gozman
ced0bc2d1b
api: make clear the use of null in page.emulateMedia (#3078)
We can pass null to disable emulating particular feature.
This change updates the docs and rpc protocol accordingly.
2020-07-21 18:56:41 -07:00
Yury Semikhatsky
f751ab1791
browser(webkit): write screencast video to .webm instead of .ivf (#3081) 2020-07-21 18:49:52 -07:00
Andrey Lushnikov
c0d9ccfebf
docs: update documentation on Chromium sandbox (#3077)
This patch:
- updates docker seccomp profile to use a slightly modified default docker
profile
- removes SUID sandbox documentation since it doesn't seem to work

References #2745
2020-07-21 17:43:41 -07:00
Joel Einbinder
f4b7ed5542
fix(chromium): reland support selectAll on macos (#3038)
Co-authored-by: Joel Einbinder <joel.einbinde@gmail.com>
2020-07-21 16:33:46 -07:00
Joel Einbinder
3c151d8f1d
fix(test): don't output babel's debug info on the bots (#3073) 2020-07-21 16:23:46 -07:00
Dmitry Gozman
db4e856a57
feat(rpc): use SerializedValue for CDPSession (#3076)
This is our way to define a schema for arbitrary values.
2020-07-21 15:58:00 -07:00
Dmitry Gozman
1553f19bab
chore: update error messages to match future rpc validator (#3075) 2020-07-21 15:25:31 -07:00
Dmitry Gozman
18cb1c017a
feat(rpc): inline selectors.register options in the protocol (#3072) 2020-07-21 14:41:33 -07:00
Dmitry Gozman
3dd61629e0
feat(rpc): update Response.finished to return string instead of Error (#3071) 2020-07-21 14:40:53 -07:00
Andrey Lushnikov
47e30f047b
feat: introduce chromiumSandbox launch option (#3067)
The option is intended to be used instead of the `--no-sandbox`
argument that is accepted exclusively by Chromium and crashes
WebKit.

References #2745
2020-07-21 13:49:09 -07:00
Andrey Lushnikov
af20d2704f
fix: auto-add --no-sandbox when running Chromium under root (#3064)
References #2745
2020-07-21 13:21:42 -07:00
Andrey Lushnikov
2120a2361b
docs(readme): add link to system requirements (#3057) 2020-07-21 13:19:22 -07:00
Dmitry Gozman
3dead4c8d1
feat(rpc): remove last union types from the protocol (#3059) 2020-07-21 12:44:30 -07:00
Pavel Feldman
de9570ee3a
browser(webkit): roll to ToT 07/21/2020 (#3066) 2020-07-21 12:26:21 -07:00
Yury Semikhatsky
babd0cbcea
browser(firefox): fix Windows build (#3065) 2020-07-21 10:02:14 -07:00
Pavel Feldman
7f29275aa2
browser(firefox): use base64 to deliver post data (#3063) 2020-07-21 09:55:46 -07:00
Pavel Feldman
99658c2d32
feat(bringToFront): enable on all browsers (#3052) 2020-07-21 09:36:54 -07:00
Joel Einbinder
a03f1dd156
test: screenshot on failure (#3053) 2020-07-21 09:32:13 -07:00
Yury Semikhatsky
a5cb983768
browser(firefox): write video to .webm instead of .ivf (#3062) 2020-07-21 09:26:59 -07:00
Dmitry Gozman
2d59a8f9c2
feat(rpc): remove some union types (#3058) 2020-07-21 08:26:48 -07:00
Dmitry Gozman
5848ed8f41
feat(rpc): introduce protocol.pdl (#3054)
We now generate channels.ts from the protocol definition. There are still some shortcomings,
like union types - these will be addressed in follow ups.
2020-07-20 17:38:06 -07:00
Pavel Feldman
726f636b5c
browser(firefox): implement Page.bringToFront (#3051) 2020-07-20 16:47:27 -07:00
Yury Semikhatsky
eb14c4711f
browser(webkit): do not mask WebGL vendor/renderer info (#3050) 2020-07-20 15:01:40 -07:00
Yury Semikhatsky
6db8962125
browser(firefox): smooth resize in headless (#3043) 2020-07-20 14:24:52 -07:00
Joel Einbinder
23f506b3e6
fix(test): write after end in proxy test (#3039) 2020-07-20 13:31:24 -07:00
Yury Semikhatsky
d1f937d651
browser(firefox): stop video recording if page closed (#3040) 2020-07-20 10:44:11 -07:00