question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No inspectable targets when connecting to multiple instances of chrome

See original GitHub issue
Component Version
Operating system win10
Node.js 12.16.1
Chrome/Chromium/… 87 ,using chrome-launcher 0.13.4
chrome-remote-interface 0.29.0

Is Chrome running in a container? NO

I’ve got some very basic code that launches multiple instances of chrome and connects each with CDP to an individual chrome’s debugging port (all the debugging ports are different). Usually when trying to do this with 15 instances of chrome, I recieve this error

(node:20388) UnhandledPromiseRejectionWarning: Error: No inspectable targets at defaultTarget (C:\Users\joe\src\m3rl1n\node_modules\chrome-remote-interface\lib\chrome.js:48:23) at Chrome._fetchDebuggerURL (C:\Users\joe\src\m3rl1n\node_modules\chrome-remote-interface\lib\chrome.js:192:28) at async Chrome._start (C:\Users\joe\src\m3rl1n\node_modules\chrome-remote-interface\lib\chrome.js:139:25) (node:20388) 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 rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:20388) [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.

I have not been able to determine yet where in my program this error is being thrown. This error does not always come up, for example running 10 instances of chrome will usually be fine and on occassion throw this error. When attempting to run 11 this is where I start getting errors more often.

EDIT: It seems that the error is being thrown when setting up CDP at

let client = await CDP({ port: WHATEVER_PORT_CHROME_USED });

EDIT 2: The chrome instances aren’t failing on the same port, maybe it’s due to me doing this asynchronously ???

EDIT 3: Tried firing up 20 chrome instances consecutivley with absoloutly no problem, definatly seems like an issue to asynchronously several of these instancesas the same time. (To be clear, I am first launching chrome and then launching CDP inside inside of an async function, and then proceeding to run this async function x’ number of times asynchronously for as many instances as I want using Promise#All)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:24 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
cyrus-andcommented, Jan 23, 2021

There shouldn’t be any difference, the only thing is that if you experience weird crashes in Chrome try to increase the container’s shared memory.

0reactions
cyrus-andcommented, Jan 23, 2021

No worries! Feel free to keep me posted.

Good luck!

Read more comments on GitHub >

github_iconTop Results From Across the Web

No inspectable targets Error · Issue #213 - GitHub
The problem is that you cannot attach more than one chrome-remote-interface instance to a tab, this is a current limitation of Chrome, but ......
Read more >
Why is Web Inspector showing me "no inspectable ...
I am able to Breakpoint in Javascript, but items are not inspectable in the inspection pane. The console does report correct information.
Read more >
chrome-remote-interface - npm
Chrome Debugging Protocol interface that helps to instrument Chrome (or any other suitable implementation) by providing a simple abstraction of ...
Read more >
Inspecting Chrome Native UI with Chrome UI DevTools
Aura/Views UI can now be 'inspected' just like a webpage inspect-able using Chrome DevTools. This is accomplished by re-using the existing frontend DevTools ......
Read more >
Chrome DevTools Protocol - GitHub Pages
The Chrome DevTools Protocol allows for tools to instrument, inspect, debug and profile Chromium, Chrome and other Blink-based browsers. Many existing ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found