Skip to content

TypeError: HTMLElement.style.setProperty is not a function #625

@iSuslov

Description

@iSuslov

Tried to test javascript execution like that:

import puppeteer from 'puppeteer-core'
import * as fs from "node:fs";

const browser = await puppeteer.connect({
    browserWSEndpoint: "ws://127.0.0.1:9222",
})

const context = await browser.createBrowserContext()
const page = await context.newPage()

await page.goto('https://timeanddate.com/timer/')

await page.click(".c-timer__btn--start")
// ...

but it seems like scripts can't load due to the error:

info(telemetry): telemetry enabled
info(server): accepting new conn...
info(server): client connected
info(http_client): redirecting to: GET https://www.timeanddate.com/timer/
info(browser): GET https://www.timeanddate.com/timer/ 200
info(browser): fetch https://c.tadst.com/com/common/wcommon_33.js: 200
info(browser): eval script //c.tadst.com/com/common/wcommon_33.js: TypeError: q.style.setProperty is not a function
info(browser): fetch https://www.timeanddate.com/common/ext/knockout-3.2.0.js: 200
info(browser): fetch https://c.tadst.com/com/common/tadsortable_8.js: 200
info(browser): fetch https://c.tadst.com/com/common/timer_22.js: 200
info(browser): fetch https://securepubads.g.doubleclick.net/tag/js/gpt.js: 200
info(browser): fetch https://c.amazon-adsystem.com/aax2/apstag.js: 200
info(browser): fetch https://btloader.com/tag?o=5174239513018368&upapi=true: 200

Maybe to introduce the possibility to mock some APIs with Proxy objects?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions