Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Random crashes when closing the browser with bun runtime #1800

Copy link
Copy link
Closed
@garysassano

Description

@garysassano
Issue body actions

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";

const browser = new Browser();
const page = browser.newPage();

try {
  const url = "https://www.example.com/";
  console.log(`Navigating to ${url}...`);
  await page.goto(url);

  const cookies = await page.context.cookieContainer.getCookies(new URL(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...");
  await browser.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)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.