tools icon indicating copy to clipboard operation
tools copied to clipboard

Starting chrome throws with "Bad state: No element"

Open schultek opened this issue 5 months ago • 1 comments

Calling Chrome.startWithDebugPort() almost consistently throws for me when I provide a userDataDir.

Image

The error comes from the stderr....firstWhere() call, which appears to be called on an empty stream. I have no clue why the stream is empty or why this is related to userDataDir.


Dart SDK version: 3.9.0-196.1.beta (beta) (Tue Jun 3 07:50:27 2025 -0700) on "macos_arm64"

schultek avatar Jul 24 '25 21:07 schultek

After some more digging, it seems like this happens when there is already an instance of chrome running, in which case the stdout prints for me "Wird in einer aktuellen Browsersitzung geöffnet." and the process exits immediately (which causes the empty stderr).

schultek avatar Jul 24 '25 22:07 schultek