You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try and request a browser base agent with a nextjs app
const session = await bb.sessions.create({
projectId: process.env.BROWSERBASE_PROJECT_ID!,
browserSettings,
keepAlive: true,
region: getClosestRegion(timezone),
timeout: 600,
});
I get this error
Error creating session: TypeError: (0 , __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f2e$pnpm$2f40$browserbasehq$2b$sdk$40$2$2e$4$2e$0$2f$node_modules$2f40$browserbasehq$2f$sdk$2f$_shims$2f$registry$2e$mjs__$5b$app$2d$route$5d$__$28$ecmascript$29$__.getDefaultAgent) is not a function
at Browserbase.buildRequest (src/core.ts:297:77)
at Browserbase.makeRequest (src/core.ts:430:39)
at async createSession (app/(browserbase)/api/session/route.ts:95:18)
at async POST (app/(browserbase)/api/session/route.ts:129:24)
93 | blockAds: true,
94 | };
> 95 | const session = await bb.sessions.create({
| ^
96 | projectId: process.env.BROWSERBASE_PROJECT_ID!,
97 | browserSettings,
98 | keepAlive: true,
POST /api/session 500 in 764ms
It's complaining the getDefaultAgent is not a function for some reason
Any ideas how I can fix this?
The text was updated successfully, but these errors were encountered:
It is still a problem on NextJS 15.2.3.
Turning off turbopack (as suggested in that other issue), while a great workaround, isn't a real solution as turbopack is critical for bigger apps.
When I try and request a browser base agent with a nextjs app
const session = await bb.sessions.create({
projectId: process.env.BROWSERBASE_PROJECT_ID!,
browserSettings,
keepAlive: true,
region: getClosestRegion(timezone),
timeout: 600,
});
I get this error
It's complaining the getDefaultAgent is not a function for some reason
Any ideas how I can fix this?
The text was updated successfully, but these errors were encountered: