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
For some reason, after visiting certain pages, happy-dom crashes when attempting to close the browser. Strangely, this issue only occurs with Bun, as I couldn't replicate it when using Node.js with the same pages.
index.ts
import{Browser}from"happy-dom";constbrowser=newBrowser();constpage=browser.newPage();try{consturl="https://www.example.com/";console.log(`Navigating to ${url}...`);awaitpage.goto(url);constcookies=awaitpage.context.cookieContainer.getCookies(newURL(url));console.log("\n--- Cookies ---");console.log(JSON.stringify(cookies,null,2));console.log("---------------");}catch(error){console.error("Error occurred:",error);}finally{console.log("\nClosing browser...");awaitbrowser.close();console.log("Browser closed.");}
Crash run
Navigating to https://www.amazon.it/dp/B00LH3DMUO...
--- Cookies ---
[
{
"key": "i18n-prefs",
"originURL": "https://www.amazon.it/dp/B00LH3DMUO",
"value": "EUR",
"domain": ".amazon.it",
"path": "/",
"expires": "2026-04-11T00:56:09.000Z",
"httpOnly": false,
"secure": false,
"sameSite": "Lax"
}
]
---------------
Closing browser...
Browser closed.
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
TypeError: null is not an object (evaluating 'browserFrame.page')
at /home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33
283 |* @param url URL.
284 |*/
285 | async #preloadResource(url) {
286 | const window = this[PropertySymbol.window];
287 | const browserFrame = new WindowBrowserContext(window).getBrowserFrame();
288 | const browserSettings = browserFrame.page?.context?.browser?.settings;
^
TypeError: null is not an object (evaluating 'browserFrame.page')
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33)
at #preloadResource (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:285:28)
at [onSetAttribute] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:241:30)
at [setNamedItem] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/element/NamedNodeMap.js:179:62)
at parseEndOfStartTag (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:346:51)
at parse (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:206:34)
at write (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/document/Document.js:1227:16)
at content (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/BrowserFrame.js:62:30)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/utilities/BrowserFrameNavigator.js:188:17)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/window/BrowserWindow.js:1236:30)
283 |* @param url URL.
284 |*/
285 | async #preloadResource(url) {
286 | const window = this[PropertySymbol.window];
287 | const browserFrame = new WindowBrowserContext(window).getBrowserFrame();
288 | const browserSettings = browserFrame.page?.context?.browser?.settings;
^
TypeError: null is not an object (evaluating 'browserFrame.page')
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33)
at #preloadResource (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:285:28)
at [onSetAttribute] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:241:30)
at [setNamedItem] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/element/NamedNodeMap.js:179:62)
at parseEndOfStartTag (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:346:51)
at parse (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:206:34)
at write (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/document/Document.js:1227:16)
at content (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/BrowserFrame.js:62:30)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/utilities/BrowserFrameNavigator.js:188:17)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/window/BrowserWindow.js:1236:30)
283 |* @param url URL.
284 |*/
285 | async #preloadResource(url) {
286 | const window = this[PropertySymbol.window];
287 | const browserFrame = new WindowBrowserContext(window).getBrowserFrame();
288 | const browserSettings = browserFrame.page?.context?.browser?.settings;
^
TypeError: null is not an object (evaluating 'browserFrame.page')
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33)
at #preloadResource (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:285:28)
at [onSetAttribute] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:241:30)
at [setNamedItem] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/element/NamedNodeMap.js:179:62)
at parseEndOfStartTag (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:346:51)
at parse (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:206:34)
at write (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/document/Document.js:1227:16)
at content (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/BrowserFrame.js:62:30)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/utilities/BrowserFrameNavigator.js:188:17)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/window/BrowserWindow.js:1236:30)
283 |* @param url URL.
284 |*/
285 | async #preloadResource(url) {
286 | const window = this[PropertySymbol.window];
287 | const browserFrame = new WindowBrowserContext(window).getBrowserFrame();
288 | const browserSettings = browserFrame.page?.context?.browser?.settings;
^
TypeError: null is not an object (evaluating 'browserFrame.page')
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33)
at #preloadResource (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:285:28)
at [onSetAttribute] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:241:30)
at [setNamedItem] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/element/NamedNodeMap.js:179:62)
at parseEndOfStartTag (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:346:51)
at parse (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:206:34)
at write (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/document/Document.js:1227:16)
at content (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/BrowserFrame.js:62:30)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/utilities/BrowserFrameNavigator.js:188:17)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/window/BrowserWindow.js:1236:30)
283 |* @param url URL.
284 |*/
285 | async #preloadResource(url) {
286 | const window = this[PropertySymbol.window];
287 | const browserFrame = new WindowBrowserContext(window).getBrowserFrame();
288 | const browserSettings = browserFrame.page?.context?.browser?.settings;
^
TypeError: null is not an object (evaluating 'browserFrame.page')
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33)
at #preloadResource (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:285:28)
at [onSetAttribute] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:241:30)
at [setNamedItem] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/element/NamedNodeMap.js:179:62)
at parseEndOfStartTag (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:346:51)
at parse (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:206:34)
at write (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/document/Document.js:1227:16)
at content (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/BrowserFrame.js:62:30)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/utilities/BrowserFrameNavigator.js:188:17)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/window/BrowserWindow.js:1236:30)
283 |* @param url URL.
284 |*/
285 | async #preloadResource(url) {
286 | const window = this[PropertySymbol.window];
287 | const browserFrame = new WindowBrowserContext(window).getBrowserFrame();
288 | const browserSettings = browserFrame.page?.context?.browser?.settings;
^
TypeError: null is not an object (evaluating 'browserFrame.page')
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33)
at #preloadResource (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:285:28)
at [onSetAttribute] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:241:30)
at [setNamedItem] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/element/NamedNodeMap.js:179:62)
at parseEndOfStartTag (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:346:51)
at parse (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:206:34)
at write (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/document/Document.js:1227:16)
at content (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/BrowserFrame.js:62:30)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/utilities/BrowserFrameNavigator.js:188:17)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/window/BrowserWindow.js:1236:30)
283 |* @param url URL.
284 |*/
285 | async #preloadResource(url) {
286 | const window = this[PropertySymbol.window];
287 | const browserFrame = new WindowBrowserContext(window).getBrowserFrame();
288 | const browserSettings = browserFrame.page?.context?.browser?.settings;
^
TypeError: null is not an object (evaluating 'browserFrame.page')
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33)
at #preloadResource (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:285:28)
at [onSetAttribute] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:241:30)
at [setNamedItem] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/element/NamedNodeMap.js:179:62)
at parseEndOfStartTag (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:346:51)
at parse (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:206:34)
at write (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/document/Document.js:1227:16)
at content (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/BrowserFrame.js:62:30)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/utilities/BrowserFrameNavigator.js:188:17)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/window/BrowserWindow.js:1236:30)
283 |* @param url URL.
284 |*/
285 | async #preloadResource(url) {
286 | const window = this[PropertySymbol.window];
287 | const browserFrame = new WindowBrowserContext(window).getBrowserFrame();
288 | const browserSettings = browserFrame.page?.context?.browser?.settings;
^
TypeError: null is not an object (evaluating 'browserFrame.page')
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33)
at #preloadResource (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:285:28)
at [onSetAttribute] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:241:30)
at [setNamedItem] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/element/NamedNodeMap.js:179:62)
at parseEndOfStartTag (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:346:51)
at parse (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:206:34)
at write (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/document/Document.js:1227:16)
at content (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/BrowserFrame.js:62:30)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/utilities/BrowserFrameNavigator.js:188:17)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/window/BrowserWindow.js:1236:30)
283 |* @param url URL.
284 |*/
285 | async #preloadResource(url) {
286 | const window = this[PropertySymbol.window];
287 | const browserFrame = new WindowBrowserContext(window).getBrowserFrame();
288 | const browserSettings = browserFrame.page?.context?.browser?.settings;
^
TypeError: null is not an object (evaluating 'browserFrame.page')
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33)
at #preloadResource (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:285:28)
at [onSetAttribute] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:241:30)
at [setNamedItem] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/element/NamedNodeMap.js:179:62)
at parseEndOfStartTag (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:346:51)
at parse (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:206:34)
at write (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/document/Document.js:1227:16)
at content (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/BrowserFrame.js:62:30)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/utilities/BrowserFrameNavigator.js:188:17)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/window/BrowserWindow.js:1236:30)
283 |* @param url URL.
284 |*/
285 | async #preloadResource(url) {
286 | const window = this[PropertySymbol.window];
287 | const browserFrame = new WindowBrowserContext(window).getBrowserFrame();
288 | const browserSettings = browserFrame.page?.context?.browser?.settings;
^
TypeError: null is not an object (evaluating 'browserFrame.page')
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33)
at #preloadResource (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:285:28)
at [onSetAttribute] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:241:30)
at [setNamedItem] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/element/NamedNodeMap.js:179:62)
at parseEndOfStartTag (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:346:51)
at parse (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:206:34)
at write (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/document/Document.js:1227:16)
at content (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/BrowserFrame.js:62:30)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/utilities/BrowserFrameNavigator.js:188:17)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/window/BrowserWindow.js:1236:30)
283 |* @param url URL.
284 |*/
285 | async #preloadResource(url) {
286 | const window = this[PropertySymbol.window];
287 | const browserFrame = new WindowBrowserContext(window).getBrowserFrame();
288 | const browserSettings = browserFrame.page?.context?.browser?.settings;
^
TypeError: null is not an object (evaluating 'browserFrame.page')
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33)
at #preloadResource (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:285:28)
at [onSetAttribute] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:241:30)
at [setNamedItem] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/element/NamedNodeMap.js:179:62)
at parseEndOfStartTag (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:346:51)
at parse (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:206:34)
at write (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/document/Document.js:1227:16)
at content (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/BrowserFrame.js:62:30)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/utilities/BrowserFrameNavigator.js:188:17)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/window/BrowserWindow.js:1236:30)
283 |* @param url URL.
284 |*/
285 | async #preloadResource(url) {
286 | const window = this[PropertySymbol.window];
287 | const browserFrame = new WindowBrowserContext(window).getBrowserFrame();
288 | const browserSettings = browserFrame.page?.context?.browser?.settings;
^
TypeError: null is not an object (evaluating 'browserFrame.page')
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33)
at #preloadResource (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:285:28)
at [onSetAttribute] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:241:30)
at [setNamedItem] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/element/NamedNodeMap.js:179:62)
at parseEndOfStartTag (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:346:51)
at parse (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:206:34)
at write (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/document/Document.js:1227:16)
at content (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/BrowserFrame.js:62:30)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/utilities/BrowserFrameNavigator.js:188:17)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/window/BrowserWindow.js:1236:30)
283 |* @param url URL.
284 |*/
285 | async #preloadResource(url) {
286 | const window = this[PropertySymbol.window];
287 | const browserFrame = new WindowBrowserContext(window).getBrowserFrame();
288 | const browserSettings = browserFrame.page?.context?.browser?.settings;
^
TypeError: null is not an object (evaluating 'browserFrame.page')
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33)
at #preloadResource (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:285:28)
at [onSetAttribute] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:241:30)
at [setNamedItem] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/element/NamedNodeMap.js:179:62)
at parseEndOfStartTag (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:346:51)
at parse (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:206:34)
at write (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/document/Document.js:1227:16)
at content (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/BrowserFrame.js:62:30)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/utilities/BrowserFrameNavigator.js:188:17)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/window/BrowserWindow.js:1236:30)
283 |* @param url URL.
284 |*/
285 | async #preloadResource(url) {
286 | const window = this[PropertySymbol.window];
287 | const browserFrame = new WindowBrowserContext(window).getBrowserFrame();
288 | const browserSettings = browserFrame.page?.context?.browser?.settings;
^
TypeError: null is not an object (evaluating 'browserFrame.page')
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33)
at #preloadResource (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:285:28)
at [onSetAttribute] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:241:30)
at [setNamedItem] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/element/NamedNodeMap.js:179:62)
at parseEndOfStartTag (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:346:51)
at parse (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:206:34)
at write (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/document/Document.js:1227:16)
at content (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/BrowserFrame.js:62:30)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/utilities/BrowserFrameNavigator.js:188:17)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/window/BrowserWindow.js:1236:30)
283 |* @param url URL.
284 |*/
285 | async #preloadResource(url) {
286 | const window = this[PropertySymbol.window];
287 | const browserFrame = new WindowBrowserContext(window).getBrowserFrame();
288 | const browserSettings = browserFrame.page?.context?.browser?.settings;
^
TypeError: null is not an object (evaluating 'browserFrame.page')
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:288:33)
at #preloadResource (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:285:28)
at [onSetAttribute] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/html-link-element/HTMLLinkElement.js:241:30)
at [setNamedItem] (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/element/NamedNodeMap.js:179:62)
at parseEndOfStartTag (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:346:51)
at parse (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/html-parser/HTMLParser.js:206:34)
at write (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/nodes/document/Document.js:1227:16)
at content (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/BrowserFrame.js:62:30)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/browser/utilities/BrowserFrameNavigator.js:188:17)
at <anonymous> (/home/user/github/bun-happy-dom/node_modules/happy-dom/lib/window/BrowserWindow.js:1236:30)
Bun v1.2.9 (Linux x64 baseline)
The text was updated successfully, but these errors were encountered:
For some reason, after visiting certain pages,
happy-dom
crashes when attempting to close the browser. Strangely, this issue only occurs with Bun, as I couldn't replicate it when using Node.js with the same pages.index.ts
Crash run
The text was updated successfully, but these errors were encountered: