carlo icon indicating copy to clipboard operation
carlo copied to clipboard

Error running the app

Open d4rckh opened this issue 6 years ago • 5 comments

I get this error:

(node:28817) UnhandledPromiseRejectionWarning: Error: Could not start the browser or the browser was already running with the given profile.

OS: Linux 4.14 Chrome: Version 69.0.3497.100 (Official Build) (64-bit)

d4rckh avatar Dec 02 '18 16:12 d4rckh

What do you do? Also, your Chrome browser is behind, stable is at 70 for many weeks already.

pavelfeldman avatar Dec 02 '18 17:12 pavelfeldman

ohh :joy:

ill be back

d4rckh avatar Dec 02 '18 17:12 d4rckh

I have run the carlo example successfully on a macbook air, but now I am trying to run it on our linux based corp system . (Our nodejs set up is "special" ;-). I also see this error.

The additional issue here is that the carlo window comes up and stays up. So a few attempts later and you have a bunch of zombie windows.

Is there a way to determine which chrome process was launched (so I don't kill all of my other chrome processes)?

johnjbarton avatar Jan 25 '19 18:01 johnjbarton

Ok at least in my case the problem was that the puppeteer.launch() property userDataDir resolved to a write-protected directory. My workaround was:

const app = await carlo.launch({userDataDir: "/tmp"});

Since the failure mode is very confusing, it may be best if carlo (or better puppeteer) verified that the directory was writable before launching chrome.

johnjbarton avatar Jan 25 '19 18:01 johnjbarton

Turns out there is another, undocumented, option, localDataDir which is used both as the default for userDataDir and for another purpose. https://github.com/GoogleChromeLabs/carlo/blob/4e8ed7bdfe656f4c2672ab777ab81df777b2b185/lib/carlo.js#L592

johnjbarton avatar Jan 25 '19 20:01 johnjbarton