# "TypeError: Failed to fetch" error when trying to upload  a Pre or Post Script in Cloud

*Applies to: Patch My PC Cloud*

### SYMPTOMS

I am trying to upload a Pre (or Post) script, but I get the following error:

**Error - TypeError: Failed to fetch**

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2F6ZZiOGeYFuXrMi8W6dXa%2Fimage.png?alt=media&#x26;token=72389470-617d-45fd-bea4-1501c9b398b7" alt="Error - TypeError: Failed to fetch" width="350"><figcaption></figcaption></figure>

### CAUSE

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.

### RESOLUTION

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:

<table><thead><tr><th valign="top">Replace all instances of…</th><th valign="top">With...</th></tr></thead><tbody><tr><td valign="top"><code>"${env:ProgramFiles(x86)}"</code></td><td valign="top"><code>"$($env:SystemDrive)\Program Files (x86)"</code></td></tr><tr><td valign="top"><code>"${env:ProgramFiles}"</code></td><td valign="top"><code>"$($env:SystemDrive)\Program Files"</code></td></tr></tbody></table>
