-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Description
I am trying to use Stagehand with Brigh Data by using the URL with embedded credentials from Bright Data Browser API service and it is not working. I am sure that the URL is correct because if I do
const browser = await chromium.connectOverCDP(CDP);
const page = await browser.newPage();
await page.goto('https://google.com', {timeout: 120_000});
console.log(await page.title());
await browser.close();
It works and logs Google
My Stagehand initialization looks like this
const stagehand = new Stagehand({
env: 'LOCAL',
modelName: 'some-model',
modelClientOptions: {
apiKey: aiApiKey,
},
verbose: 1,
localBrowserLaunchOptions: {
headless: true,
cdpUrl: SBR_CDP,
},
});
And after I do
await stagehand.init();
I get something like
TypeError: Cannot read properties of undefined (reading 'page')
at Stagehand3.createLivePageProxy (...\node_modules\@browserbasehq\stagehand\dist\index.js:22382:60)
at get page [as page] (...\node_modules\@browserbasehq\stagehand\dist\index.js:22411:34)
at Stagehand3.<anonymous> (...\node_modules\@browserbasehq\stagehand\dist\index.js:22570:20)
at Generator.next (<anonymous>)
at fulfilled (...\node_modules\@browserbasehq\stagehand\dist\index.js:66:24))
Is this feature of remote browser only expected to work with local browsers or should it be working also with remote ones?
Metadata
Metadata
Assignees
Labels
No labels