Socket
Socket
Sign inDemoInstall

chrome-remote-interface

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrome-remote-interface - npm Package Compare versions

Comparing version 0.24.3 to 0.24.4

2

package.json

@@ -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 @@ ------------

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc