@lightcone-ai/daemon 0.9.35 → 0.9.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/browser-login.js +1 -25
package/package.json
CHANGED
package/src/browser-login.js
CHANGED
|
@@ -94,19 +94,6 @@ export class BrowserLoginSession {
|
|
|
94
94
|
async start(connection, userId) {
|
|
95
95
|
this._profileDir = profileDir(this._platform, userId);
|
|
96
96
|
|
|
97
|
-
// Clean up stale Chrome lock files that prevent reuse of the profile dir
|
|
98
|
-
for (const lockFile of ['SingletonLock', 'SingletonCookie', 'SingletonSocket']) {
|
|
99
|
-
const p = path.join(this._profileDir, lockFile);
|
|
100
|
-
try { if (existsSync(p)) rmSync(p, { force: true }); } catch {}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Kill any process already holding CDP_PORT
|
|
104
|
-
try {
|
|
105
|
-
if (process.platform !== 'win32') {
|
|
106
|
-
execSync(`lsof -ti:${CDP_PORT} | xargs kill -9`, { stdio: 'ignore' });
|
|
107
|
-
}
|
|
108
|
-
} catch {}
|
|
109
|
-
|
|
110
97
|
this._proc = spawn(CHROME_BIN, [
|
|
111
98
|
`--remote-debugging-port=${CDP_PORT}`,
|
|
112
99
|
'--no-sandbox',
|
|
@@ -116,20 +103,9 @@ export class BrowserLoginSession {
|
|
|
116
103
|
'--window-size=800,900',
|
|
117
104
|
'--disable-blink-features=AutomationControlled',
|
|
118
105
|
'--disable-infobars',
|
|
119
|
-
'--no-first-run',
|
|
120
|
-
'--no-default-browser-check',
|
|
121
|
-
'--disable-hang-monitor',
|
|
122
|
-
'--use-mock-keychain',
|
|
123
|
-
'--password-store=basic',
|
|
124
|
-
'--disable-gpu',
|
|
125
106
|
'--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
|
126
107
|
'about:blank',
|
|
127
|
-
], { stdio:
|
|
128
|
-
|
|
129
|
-
this._proc.stderr.on('data', (data) => {
|
|
130
|
-
const text = data.toString().trim();
|
|
131
|
-
if (text) console.error(`[BrowserLogin][${this._platform}] Chrome stderr: ${text.slice(0, 300)}`);
|
|
132
|
-
});
|
|
108
|
+
], { stdio: 'ignore', detached: false });
|
|
133
109
|
|
|
134
110
|
this._proc.on('error', (err) => {
|
|
135
111
|
console.error(`[BrowserLogin][${this._platform}] Chrome spawn error: ${err.message}`);
|