chrome-remote-interface
Advanced tools
Comparing version 0.24.3 to 0.24.4
@@ -12,3 +12,3 @@ { | ||
"homepage": "https://github.com/cyrus-and/chrome-remote-interface", | ||
"version": "0.24.3", | ||
"version": "0.24.4", | ||
"repository": { | ||
@@ -15,0 +15,0 @@ "type": "git", |
@@ -889,2 +889,22 @@ chrome-remote-interface [![Build Status](https://travis-ci.org/cyrus-and/chrome-remote-interface.svg?branch=master)](https://travis-ci.org/cyrus-and/chrome-remote-interface) | ||
### Using `Runtime.evaluate` with `awaitPromise: true` I sometimes obtain `Error: Promise was collected` | ||
This is thrown by `Runtime.evaluate` when the browser-side promise gets | ||
*collected* by the Chrome's garbage collector, this happens when the whole | ||
JavaScript execution environment is invalidated, e.g., a when page is navigated | ||
or reloaded while a promise is still waiting to be resolved. | ||
Here is an example: | ||
``` | ||
$ chrome-remote-interface inspect | ||
>>> Runtime.evaluate({expression: `new Promise(() => {})`, awaitPromise: true}) | ||
>>> Page.reload() // then wait several seconds | ||
{ result: {} } | ||
{ error: { code: -32000, message: 'Promise was collected' } } | ||
``` | ||
To fix this, just make sure there are no pending promises before closing, | ||
reloading, etc. a page. | ||
Contributors | ||
@@ -891,0 +911,0 @@ ------------ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1005030
925