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 testing frappe using automated browser (chrome) testing, the below error was received from the console.
Errors for the following bundles:
libs
desk
list
form
controls
report
telemetry
erpnext
hrms
report
This is caused by puppeteer setcontent using document.write.
The errors can be cured by adding the defer attribute to the script tag in jinja_globals.pyinclude_script function.
A parser-blocking, cross site (i.e. different eTLD+1) script, /assets/frappe/dist/js/desk.bundle.KQ2KIVUJ.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
The text was updated successfully, but these errors were encountered:
casesolved-co-uk
changed the title
JS deprecated document.write for loading scripts
JS deprecated document.write for loading scripts caused by async missing
May 22, 2024
casesolved-co-uk
changed the title
JS deprecated document.write for loading scripts caused by async missing
JS deprecated document.write for loading scripts caused by defer missing
May 22, 2024
When testing frappe using automated browser (chrome) testing, the below error was received from the console.
Errors for the following bundles:
This is caused by puppeteer setcontent using document.write.
The errors can be cured by adding the
defer
attribute to the script tag injinja_globals.py
include_script
function.Logged here: puppeteer/puppeteer#12476
Context information (for bug reports)
Output of
bench version
Should probably change these to be set via innerHTML:
frappe/frappe/public/js/frappe/microtemplate.js
Lines 165 to 180 in 1b025c7
Steps to reproduce the issue
Related: https://developer.chrome.com/blog/removing-document-write
Stacktrace / full error message
The text was updated successfully, but these errors were encountered: