{"record":{"id":"299fcc5af9bdd469","repo":"CloakHQ/CloakBrowser","slug":"the-backend-parameter-has-been-removed-patchri","errorCode":null,"errorMessage":"The 'backend' parameter has been removed — patchright is no longer supported and stock Playwright is the only backend. Remove the argument.","messagePattern":"The 'backend' parameter has been removed — patchright is no longer supported and stock Playwright is the only backend\\. Remove the argument\\.","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"cloakbrowser/browser.py","lineNumber":301,"sourceCode":"    if \"no_viewport\" in kwargs and \"viewport\" in context_kwargs:\n        logger.debug(\"Both viewport and no_viewport requested; no_viewport (kwargs) wins\")\n        context_kwargs.pop(\"viewport\", None)\n\n\ndef _resolve_timezone(timezone: str | None, kwargs: dict[str, Any]) -> str | None:\n    \"\"\"Accept both timezone and timezone_id — either works, no warning.\"\"\"\n    if \"timezone_id\" in kwargs:\n        if timezone is None:\n            timezone = kwargs.pop(\"timezone_id\")\n        else:\n            kwargs.pop(\"timezone_id\")\n    return timezone\n\n\ndef _check_removed_kwargs(kwargs: dict[str, Any]) -> None:\n    \"\"\"Raise a clear error for removed parameters that now fall into **kwargs.\"\"\"\n    if \"backend\" in kwargs:\n        raise TypeError(\n            \"The 'backend' parameter has been removed — patchright is no longer \"\n            \"supported and stock Playwright is the only backend. Remove the argument.\"\n        )\n\n\nclass _ProxySettingsRequired(TypedDict):\n    server: str\n\n\nclass ProxySettings(_ProxySettingsRequired, total=False):\n    \"\"\"Playwright-compatible proxy configuration.\"\"\"\n\n    bypass: str\n    username: str\n    password: str\n\n\ndef launch(","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/CloakHQ/CloakBrowser/blob/d6bad5de261bedf025280ace1d14e800aee13923/cloakbrowser/browser.py#L283-L319","documentation":"cloakbrowser no longer supports the patchright backend; stock Playwright is the only backend. Passing backend=... to any launch function (launch, launch_async, launch_persistent_context, launch_context, etc.) now raises TypeError via _check_removed_kwargs, since removed parameters fall into **kwargs and are detected explicitly.","triggerScenarios":"Calling cloakbrowser.launch(backend='patchright') or any launch*/launch_context* variant with a backend keyword argument.","commonSituations":"Upgrading from an older cloakbrowser version that allowed backend='patchright'/'playwright'; copy-pasted old example code or stale tutorials.","solutions":["Remove the backend argument from all launch calls","Delete any backend-selection helper/config that passes it","Upgrade code samples/READMEs to the current API"],"exampleFix":"# before\nbrowser = cloakbrowser.launch(backend=\"patchright\")\n# after\nbrowser = cloakbrowser.launch()","handlingStrategy":"type-guard","validationCode":"def is_supported_kwargs(kwargs: dict) -> bool:\n    return \"backend\" not in kwargs","typeGuard":"def clean_launch_kwargs(kwargs: dict[str, Any]) -> dict[str, Any]:\n    kwargs.pop(\"backend\", None)  # removed in current API\n    return kwargs","tryCatchPattern":null,"preventionTips":["Search the codebase for backend= before upgrading cloakbrowser","Pin library versions in requirements to catch breaking changes via changelogs"],"tags":["breaking-change","api-migration","playwright"],"backgroundTag":"removed-parameter-breaking-change","analyzedSha":"d6bad5de261bedf025280ace1d14e800aee13923","analyzedAt":"2026-08-28T14:13:12.918Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}