-
Notifications
You must be signed in to change notification settings - Fork 371
Open
Description
It waits for a minute then crashes. Error only happens when setting origins property in storageState.
Minimal reproduction
import { chromium } from "playwright-core";
async function main() {
const browser = await chromium.connectOverCDP("ws://127.0.0.1:9222");
const context = await browser.newContext({
storageState: {
cookies: [],
origins: [
{
origin: "https://example.com",
localStorage: [
{
"name": "example_timestamp",
"value": "1770479250644"
},
]
}
]
}
})
}
main().catch(console.error);Console output
[TargetClosedError: Error setting storage state:
Target page, context or browser has been closed
Call log:
- navigating to "https://example.com", waiting until "load"
]
Browser output
$time=1771105781504 $scope=app $level=info $msg="client connected" ip=127.0.0.1:9222
$time=1771105781538 $scope=not_implemented $level=warn $msg=Target.createBrowserContext disposeOnDetach=true has_proxyBypassList=false has_originsWithUniversalNetworkAccess=false
$time=1771105781542 $scope=cdp $level=debug $msg="inspector event" method="\"Runtime.executionContextCreated\""
$time=1771105781548 $scope=page $level=info $msg=navigate url=https://example.com method=GET reason=address_bar body=false req_id=2
$time=1771105781548 $scope=cdp $level=debug $msg="request intercept" state=paused id=2 url=https://example.com
$time=1771105781551 $scope=cdp $level=debug $msg="request intercept" state=fulfilled id=2 url=https://example.com status=200 body=true
$time=1771105781551 $scope=cdp $level=debug $msg="inspector event" method="\"Runtime.executionContextCreated\""
$time=1771105781551 $scope=cdp $level=debug $msg="inspector event" method="\"Runtime.executionContextCreated\""
$time=1771106098133 $scope=app $level=info $msg="CDP timeout"
$time=1771106098133 $scope=cdp $level=debug $msg="inspector event" method="\"Runtime.executionContextsCleared\""
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels