fingerprint-suite
fingerprint-suite copied to clipboard
fixIframeContentWindow method writes to log "TypeError: Cannot redefine property: createElement"
fixIframeContentWindow method writes to log "TypeError: Cannot redefine property: createElement".
To Reproduce
Run non-headless and load https://www.example.com
.
Expected behavior No warnings in console log.
System information:
- OS: MacOS
- Node.js v16.14.0
- Puppeteer v15.1.0
- fingerprint-injector v2.0.6

fixPluginArray works bad too.. like (length is "undefined")
For me the issue happens in non-headless mode, so I'm not sure how it works in the headless mode.
I haven't seen an issue with fixPluginArray
, but since both fixIframeContentWindow
& fixPluginArray
methods are called from the runHeadlessFixes
method, I wonder if the issue in the first place is that the runHeadlessFixes
method is being called in non-headless mode too.
In the fixIframeContentWindow
method, the issue is basically this line _iframe.srcdoc = newValue
where srcdoc
, which is set with writable: false
(read only), fails to receive a new value.
Maybe we can pass a headless
boolean flag to the attachFingerprintToPuppeteer
method, so that the runHeadlessFixes
method will only run when headless
is true
.
Sorry for taking so long, this issue must have slipped my attention! Unfortunately, I didn't manage to replicate this issue, but I just got rid of the warning message at the very least. The headless fixes were made to be "idempotent" - in a way that they don't do anything if run in headful mode.
I'll close this issue, but will keep an eye on this - and as always - feel free to reopen it if unsure abt sth :)