"TypeError: Failed to fetch" error when trying to upload a Pre or Post Script
Last updated
Was this helpful?
Last updated
Was this helpful?
Applies to: Patch My PC Cloud
I am trying to upload a Pre (or Post) script, but I get the following error:
Error - TypeError: Failed to fetch
This error can happen if your pre/post script contains either of the following variables:
"${env:ProgramFiles(x86)}"
"${env:ProgramFiles}"
This issue is not caused by the Patch My PC (PMPC) Cloud portal but by Cloudflare, who are incorrectly identifying them as a false-positive and blocking the upload as they think the script is a Log4j exploit.
As Cloudflare is causing this issue, we cannot implement a fix. We are actively working with them to try to resolve this false positive.
In the meantime, to work around this issue, use the following replacements in your affected scripts:
"${env:ProgramFiles(x86)}"
"$($env:SystemDrive)\Program Files (x86)"
"${env:ProgramFiles}"
"$($env:SystemDrive)\Program Files"