aurix-ai 2.7.9 → 2.8.1

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.
@@ -171,7 +171,10 @@ async function ensureBrowser() {
171
171
  headless: browserHeadless,
172
172
  humanize: true,
173
173
  humanPreset: 'careful',
174
- stealthArgs: true,
174
+ // cloakbrowser's default stealthArgs inject --no-sandbox, which is
175
+ // invalid on Windows Chromium and causes silent navigation failures
176
+ // (page stays at about:blank). We pass our own args explicitly below.
177
+ stealthArgs: process.platform !== 'win32',
175
178
  colorScheme: 'light',
176
179
  viewport: vp,
177
180
  userAgent: ua,
@@ -180,30 +183,38 @@ async function ensureBrowser() {
180
183
  geolocation: { latitude: geo.latitude, longitude: geo.longitude },
181
184
  permissions: ['geolocation'],
182
185
  },
183
- args: [
184
- '--disable-webrtc',
185
- '--disable-rtc-sdp-logs',
186
- '--disable-background-networking',
187
- '--disable-client-side-phishing-detection',
188
- '--disable-default-apps',
189
- '--disable-component-update',
190
- '--disable-domain-reliability',
191
- '--disable-features=WebRtcHideLocalIpsWithMdns,TranslateUI',
192
- '--disable-blink-features=AutomationControlled',
193
- '--no-first-run',
194
- '--no-default-browser-check',
195
- `--window-size=${vp.width},${vp.height}`,
196
- `--fingerprint=${Math.floor(Math.random() * 999999)}`,
197
- '--fingerprint-platform=windows',
198
- `--fingerprint-hardware-concurrency=${hwConcurrency}`,
199
- `--fingerprint-device-memory=${devMemory}`,
200
- `--fingerprint-screen-width=${screenW}`,
201
- `--fingerprint-screen-height=${screenH}`,
202
- `--fingerprint-timezone=${geo.timezone}`,
203
- '--fingerprint-locale=en-US',
204
- '--fingerprint-brand=Chrome',
205
- '--fingerprint-webrtc-ip=auto',
206
- ],
186
+ args: (() => {
187
+ const base = [
188
+ '--disable-webrtc',
189
+ '--disable-rtc-sdp-logs',
190
+ '--disable-background-networking',
191
+ '--disable-client-side-phishing-detection',
192
+ '--disable-default-apps',
193
+ '--disable-component-update',
194
+ '--disable-domain-reliability',
195
+ '--disable-features=WebRtcHideLocalIpsWithMdns,TranslateUI',
196
+ '--disable-blink-features=AutomationControlled',
197
+ '--no-first-run',
198
+ '--no-default-browser-check',
199
+ `--window-size=${vp.width},${vp.height}`,
200
+ `--fingerprint=${Math.floor(Math.random() * 999999)}`,
201
+ '--fingerprint-platform=windows',
202
+ `--fingerprint-hardware-concurrency=${hwConcurrency}`,
203
+ `--fingerprint-device-memory=${devMemory}`,
204
+ `--fingerprint-screen-width=${screenW}`,
205
+ `--fingerprint-screen-height=${screenH}`,
206
+ `--fingerprint-timezone=${geo.timezone}`,
207
+ '--fingerprint-locale=en-US',
208
+ '--fingerprint-brand=Chrome',
209
+ '--fingerprint-webrtc-ip=auto',
210
+ ];
211
+ if (process.platform === 'win32') {
212
+ // Strip --no-sandbox on Windows — it's invalid on Windows Chromium
213
+ // and causes silent navigation failures (page stuck at about:blank).
214
+ return base.filter(a => !a.startsWith('--no-sandbox'));
215
+ }
216
+ return base;
217
+ })(),
207
218
  };
208
219
  const parts = activeProxy.split(':');
209
220
  if (parts.length >= 2) {
@@ -550,6 +561,22 @@ Sessions: session="a"/"b"/"c" for parallel browsers. proxy="host:port:user:pass"
550
561
  return 'Error: navigate requires a URL (use value or target parameter)';
551
562
  const fullUrl = url.startsWith('http') ? url : `https://${url}`;
552
563
  await p.goto(fullUrl, { waitUntil: 'domcontentloaded', timeout });
564
+ // Detect silent navigation failure — page stuck at about:blank.
565
+ // Common on Windows when --no-sandbox or custom --fingerprint
566
+ // flags cause Chromium to refuse to navigate. Retry with 'load'
567
+ // before giving up.
568
+ if (p.url() === 'about:blank') {
569
+ try {
570
+ await p.goto(fullUrl, { waitUntil: 'load', timeout: timeout * 2 });
571
+ }
572
+ catch (e) {
573
+ const proxyUsed = browserProxy || pickRandomProxy();
574
+ return err(`Navigation failed — page stayed at about:blank after retry`, `Possible causes:\n 1. cloakbrowser binary not installed (run: npm rebuild cloakbrowser)\n 2. Proxy unreachable (${proxyUsed || 'none'})\n 3. URL unreachable (${fullUrl})\n 4. Windows: check if cloakbrowser Chromium is actually running (not Playwright stock Chromium)`);
575
+ }
576
+ if (p.url() === 'about:blank') {
577
+ return err(`Navigation failed — page stayed at about:blank`, `cloakbrowser likely fell back to stock Chromium on Windows. Try: npm rebuild cloakbrowser`);
578
+ }
579
+ }
553
580
  const title = await p.title();
554
581
  return `Navigated to: ${p.url()}\nTitle: ${title}`;
555
582
  }