{"record":{"id":"aac0f3a77341e561","repo":"CloakHQ/CloakBrowser","slug":"cloakbrowser-contextoptions-timezoneid-ignored","errorCode":null,"errorMessage":"[cloakbrowser] contextOptions.timezoneId ignored — use top-level `timezone` instead (routes through binary flag, avoids detectable CDP emulation).","messagePattern":"\\[cloakbrowser\\] contextOptions\\.timezoneId ignored — use top-level `timezone` instead \\(routes through binary flag, avoids detectable CDP emulation\\)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"js/src/playwright.ts","lineNumber":52,"sourceCode":"  return options;\n}\n\n/**\n * Strip `locale` and `timezoneId` from user-provided contextOptions — both route\n * through detectable CDP emulation. The wrapper's top-level `locale`/`timezone`\n * fields use binary flags instead (undetectable). Warn so users notice.\n */\nfunction filterStealthCtxOptions(ctx?: BrowserContextOptions): Partial<BrowserContextOptions> {\n  if (!ctx) return {};\n  const { locale, timezoneId, ...rest } = ctx;\n  if (locale !== undefined) {\n    console.warn(\n      \"[cloakbrowser] contextOptions.locale ignored — use top-level `locale` \" +\n      \"instead (routes through binary flag, avoids detectable CDP emulation).\"\n    );\n  }\n  if (timezoneId !== undefined) {\n    console.warn(\n      \"[cloakbrowser] contextOptions.timezoneId ignored — use top-level `timezone` \" +\n      \"instead (routes through binary flag, avoids detectable CDP emulation).\"\n    );\n  }\n  return rest;\n}\n\n/**\n * Build Playwright BrowserContext options for CloakBrowser without launching a browser\n * or creating a context.\n *\n * Useful when integrating CloakBrowser with an existing Playwright Browser while\n * keeping the wrapper's stealth-safe defaults for `newContext()`.\n */\n/**\n * Effective headless mode for viewport decisions. buildLaunchOptions() spreads\n * `...options.launchOptions` LAST, so a raw `launchOptions.headless` overrides the\n * top-level field at the actual chromium.launch() call. Viewport logic must read","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/CloakHQ/CloakBrowser/blob/d6bad5de261bedf025280ace1d14e800aee13923/js/src/playwright.ts#L34-L70","documentation":"A console.warn telling you that contextOptions.timezoneId is ignored. Timezone is applied via a Chromium binary flag at launch, since Playwright's per-context CDP timezone emulation leaks detectable signals. Pass timezone as a top-level launch option instead.","triggerScenarios":"Calling launch/launchPersistentContext with { contextOptions: { timezoneId: 'Europe/Paris' } }. The key is stripped from the merged context options and the warning is emitted.","commonSituations":"Migrating Playwright scripts that used browser.newContext({ timezoneId }); observing pages render in the system timezone despite the setting.","solutions":["Move the setting to top-level: { timezone: 'Europe/Paris' } (note the renamed key, not timezoneId).","Drop timezoneId from contextOptions to silence the warning."],"exampleFix":"// before\nawait cloakbrowser.launchPersistentContext(dir, {\n  contextOptions: { timezoneId: 'Europe/Paris' }\n});\n\n// after\nawait cloakbrowser.launchPersistentContext(dir, {\n  timezone: 'Europe/Paris'\n});","handlingStrategy":"validation","validationCode":"if (opts?.contextOptions?.timezoneId !== undefined) {\n  throw new Error('use top-level `timezone` option; contextOptions.timezoneId is ignored');\n}","typeGuard":"const hasIgnoredTimezone = (o: unknown): boolean =>\n  !!o && typeof o === 'object' && 'timezoneId' in (o as any).contextOptions;","tryCatchPattern":null,"preventionTips":["Remember the renamed key: top-level is `timezone`, not `timezoneId`.","Set locale/timezone once in a shared launch config so per-context copies don't reappear."],"tags":["timezone","playwright","stealth","configuration"],"backgroundTag":"deprecated-option-ignored","analyzedSha":"d6bad5de261bedf025280ace1d14e800aee13923","analyzedAt":"2026-08-28T14:13:12.918Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}