cuic icon indicating copy to clipboard operation
cuic copied to clipboard

Cannot launch Chrome process when custom Chrome path is specified as plain string

Open jackdbd opened this issue 2 years ago • 1 comments

According to the documentation, it should be possible to specify the path to the Chrome binary using a plain string. I tried doing that, but got an AssertionError (I think the error is thrown here).

Here is what I tried in the REPL, using cuic version 1.0.0-RC2:

(require '[clojure.java.io :as io]
             '[cuic.core :as c]
             '[cuic.chrome :as chrome])

(def launch-options {:disable-gpu false
                     :headless false
                     :no-first-run true
                     :remote-debugging-port 9222})

;; this throws an AssertionError
(def my-browser
  (chrome/launch launch-options "/usr/bin/google-chrome-stable"))

When the Chrome path is specified using clojure.java.io/file .toPath, Chrome is launched as expected.

(def my-browser
  (chrome/launch launch-options (.toPath (io/file "/usr/bin/google-chrome-stable"))))

jackdbd avatar Jun 29 '22 11:06 jackdbd