dart-lang / browser_launcher Goto Github PK
View Code? Open in Web Editor NEWProvides a standardized way to launch web browsers.
Home Page: https://pub.dev/packages/browser_launcher
License: BSD 3-Clause "New" or "Revised" License
Provides a standardized way to launch web browsers.
Home Page: https://pub.dev/packages/browser_launcher
License: BSD 3-Clause "New" or "Revised" License
I'm seeing two test failures on the CI:
❌ test/chrome_test.dart: (headless: false) chrome with user data dir and signIn = false has correct profile path (failed)
Expected: not null
Actual: <null>
package:matcher expect
test/chrome_test.dart 43:5 main.connectToTab
===== asynchronous gap ===========================
test/chrome_test.dart 177:39 main.<fn>.<fn>.<fn>.<fn>
❌ test/chrome_test.dart: (headless: false) chrome with user data dir and signIn = true has correct profile path (failed)
Expected: not null
Actual: <null>
package:matcher expect
test/chrome_test.dart 43:5 main.connectToTab
===== asynchronous gap ===========================
test/chrome_test.dart 177:[39](https://github.com/dart-lang/browser_launcher/actions/runs/4581180906/jobs/8090517085?pr=41#step:8:41) main.<fn>.<fn>.<fn>.<fn>
I was using Dart SDK inside the Chrome OS Linux container. Instead of figuring out how to interact with chrome running outside the container, i just installed chromium in the container. Chromium appears to be able to handle Dart SDK's and webdev's needs. But this package only tries "google-chrome" in Linux. I added a local symlink /usr/local/bin/google-chrome -> /usr/bin/chromium and weddev is able to use chromium. But it would be nice if this package could directly use chromium on all platforms if it's available.
Note: I launch my web app inside Intellij with Dart plugin. So I didn't try setting CHROME_EXECUTABLE environment variable.
Some CI environments are only able to run tests in headless mode.
We don't run tests in headless mode. Some of them are flaky or failing if forced to run in headless mode.
There's no particular hurry, but we should publish a new version of this library at some point to capture #9.
Manjaro (and I'm assuming Arch Linux) gets the one and only google-chrome
package installed at /usr/bin/google-chrome-stable
so browser_launcher
fails to launch it there.
Linking /usr/bin/google-chrome
to the startup executable fixed the problem.
Not sure if you care enough to change anything, but you can read about my journey to this issue while using VS Code with Dart-Code at Dart-Code/Dart-Code#1830. Here's the error that I got:
Failed to launch browser: ProcessException: No such file or directory
Command: google-chrome http://127.0.0.1:9100/?hide=debugger&ide=VSCode&theme=dark&uri=http%3A%2F%2F127.0.0.1%3A38507%2F16GEBer2mu0%3D%2F
#0 Chrome._startProcess (package:browser_launcher/src/chrome.dart:130:12)
<asynchronous suspension>
#1 Chrome.start (package:browser_launcher/src/chrome.dart:122:18)
#2 registerLaunchDevToolsService.<anonymous closure> (package:devtools_server/src/server.dart:425:24)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.