# Square form fails to initialise - various Network issues

**URL:** <https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478>\
**Category:** Questions\
**Tags:** web-payments-sdk\
**Created:** [September 3, 2026, 1:28pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478 "2026-09-03T13:28:30Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![ellismp](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@ellismp](https://developer.squareup.com/forums/u/ellismp)\
**Post date:** [September 3, 2026, 1:28pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/1 "2026-09-03T13:28:30Z")

</div>

I have implemented the Web Payments SDK. I have everything set up correctly including CSP etc. but customers are regularly seeing the card form fail to initialise

In developer tools under Network I am seeing various blocked resources but it varies by browser.

In Firefox there are multiple NS\_ERROR\_DOM\_NETWORK\_ERR for [pci-connect.squareup.com](http://pci-connect.squareup.com) but these errors don’t appear in Chrome nor Edge.

In both Chrome and Edge various fonts fail to load for [https://web.squarecdn.com/1.84.3/card-element.css](https://web.squarecdn.com/1.84.3/card-element.css)

And info-icon.svg fails to load for [https://web.squarecdn.com/1.84.3/card-wrapper.css](https://web.squarecdn.com/1.84.3/card-wrapper.css)

At this point I’m seriously considering reverting to Stripe because I’m losing sales due to this ☹

I have disabled all extensions/blockers etc and tried in private/incognito

---

<div class="post-metadata">

**Author:** ![zacstlouis](https://avatars.discourse-cdn.com/v4/letter/z/b5a626/32.png) [@zacstlouis](https://developer.squareup.com/forums/u/zacstlouis)\
**Post date:** [September 3, 2026, 6:27pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/3 "2026-09-03T18:27:05Z")

</div>

> [@ellismp](#):
>
> NS\_ERROR\_DOM\_NETWORK\_ERR

Can you verify/paste the contents of your CSP here? Could you also post the exact error message(s)?

You can validate your CSP here to make sure its being loaded appropriately [https://csp-evaluator.withgoogle.com/](https://csp-evaluator.withgoogle.com/) as well. I tested the documented CSP in my local app in chrome and firefox without issues.

Troubleshooting steps:

1. Read through this [whole doc](https://developer.squareup.com/docs/web-payments/content-security-policy)
  1. There are multiple CSPs depending on the payment platforms you are using (Square, Cash App, Afterpay, etc.
  2. There are different CSPs for the sandbox and production, so make sure you use the right ones

2. Check browser extensions especially ad blockers/privacy extensions
3. If nothing works, you could try reproducing the error in our quick start app [GitHub - square/web-payments-quickstart: Quickstart for using Square's Web Payments SDK · GitHub](https://github.com/square/web-payments-quickstart)

---

<div class="post-metadata">

**Author:** ![ellismp](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@ellismp](https://developer.squareup.com/forums/u/ellismp)\
**Post date:** [September 3, 2026, 8:59pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/4 "2026-09-03T20:59:07Z")

</div>

| content-security-policy-report-only | default-src ‘self’; script-src ‘strict-dynamic’ ‘nonce-nonce6a99de9ac8a1d0-43934545’ ‘self’ https: ‘report-sample’ ‘unsafe-inline’; object-src ‘none’; frame-src ‘self’ https://\*.squarecdn.com [https://www.paypal.com](https://www.paypal.com) [https://www.google.com](https://www.google.com) [https://www.facebook.com](https://www.facebook.com) [https://player.vimeo.com](https://player.vimeo.com) [https://www.youtube-nocookie.com](https://www.youtube-nocookie.com); frame-ancestors ‘self’; style-src ‘self’ ‘unsafe-inline’ [https://web.squarecdn.com](https://web.squarecdn.com) [https://sibforms.com](https://sibforms.com); img-src ‘self’ data: [https://www.googletagmanager.com](https://www.googletagmanager.com) [https://www.google.com](https://www.google.com) [https://…](https://www.google.com.mx "https://www.google.com.mx")[.googletagmanager.com](https://www.googletagmanager.com "https://www.googletagmanager.com") [https://www.google.com](https://www.google.com) [https://www.google.co.uk](https://www.google.co.uk) https://\*.google-analytics.com https://\*.analytics.google.com https://\*.googlesyndication.com https://\*.g.doubleclick.net [https://ad.doubleclick.net](https://ad.doubleclick.net) [https://www.googleadservices.com](https://www.googleadservices.com) [https://www.facebook.com](https://www.facebook.com) https://\*.postcoder.com [https://www.paypal.com](https://www.paypal.com) https://\*.sibforms.com; base-uri ‘self’; require-trusted-types-for ‘script’; upgrade-insecure-requests; report-to csp-endpoint; report-uri |
| --- | --- |
| | |

Sorry realised the above is truncated with a large section missing at the “…”

---

<div class="post-metadata">

**Author:** ![ellismp](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@ellismp](https://developer.squareup.com/forums/u/ellismp)\
**Post date:** [September 3, 2026, 9:15pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/5 "2026-09-03T21:15:12Z")

</div>

Firefox reports -

Content-Security-Policy: The page’s settings blocked the loading of a resource (font-src) at [https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Regular.woff2](https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Regular.woff2) because it violates the following directive: “font-src [https://square-fonts-production-f.squarecdn.com](https://square-fonts-production-f.squarecdn.com) [https://d1g145x70srn7h.cloudfront.net/fonts/sqmarket/](https://d1g145x70srn7h.cloudfront.net/fonts/sqmarket/) ‘report-sample’” [single-card-element-iframe.html](https://web.squarecdn.com/1.84.3/single-card-element-iframe.html "View source in Debugger → https://web.squarecdn.com/1.84.3/single-card-element-iframe.html")

Content-Security-Policy: The page’s settings blocked the loading of a resource (font-src) at [https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Semibold.woff2](https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Semibold.woff2) because it violates the following directive: “font-src [https://square-fonts-production-f.squarecdn.com](https://square-fonts-production-f.squarecdn.com) [https://d1g145x70srn7h.cloudfront.net/fonts/sqmarket/](https://d1g145x70srn7h.cloudfront.net/fonts/sqmarket/) ‘report-sample’” [single-card-element-iframe.html](https://web.squarecdn.com/1.84.3/single-card-element-iframe.html "View source in Debugger → https://web.squarecdn.com/1.84.3/single-card-element-iframe.html")

Content-Security-Policy: The page’s settings blocked the loading of a resource (font-src) at [https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Regular.woff2](https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Regular.woff2) because it violates the following directive: “font-src [https://square-fonts-production-f.squarecdn.com](https://square-fonts-production-f.squarecdn.com) [https://d1g145x70srn7h.cloudfront.net/fonts/sqmarket/](https://d1g145x70srn7h.cloudfront.net/fonts/sqmarket/) ‘report-sample’” [single-card-element-iframe.html](https://web.squarecdn.com/1.84.3/single-card-element-iframe.html "View source in Debugger → https://web.squarecdn.com/1.84.3/single-card-element-iframe.html")

Content-Security-Policy: The page’s settings blocked the loading of a resource (font-src) at [https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Semibold.woff2](https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Semibold.woff2) because it violates the following directive: “font-src [https://square-fonts-production-f.squarecdn.com](https://square-fonts-production-f.squarecdn.com) [https://d1g145x70srn7h.cloudfront.net/fonts/sqmarket/](https://d1g145x70srn7h.cloudfront.net/fonts/sqmarket/) ‘report-sample’”

Chrome reports -

1. Some resources are blocked because their origin isn’t listed in your site’s Content Security Policy (CSP). Your site’s CSP is allowlist-based, so resources must be listed in the allowlist to be accessed.

2. 
  1. 2 directives  
1.

| Resource | Status | Directive | Source location |
| --- | --- | --- | --- |
| [https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Regular.woff2](https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Regular.woff2) | blocked | font-src | single-card-element-iframe.html:0 |
| [https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Semibold.woff2](https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Semibold.woff2) | | | |

---

<div class="post-metadata">

**Author:** ![ellismp](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@ellismp](https://developer.squareup.com/forums/u/ellismp)\
**Post date:** [September 3, 2026, 9:16pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/6 "2026-09-03T21:16:36Z")

</div>

^I’m not implementing Cash App Pay, just card

---

<div class="post-metadata">

**Author:** ![ellismp](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@ellismp](https://developer.squareup.com/forums/u/ellismp)\
**Post date:** [September 3, 2026, 9:19pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/7 "2026-09-03T21:19:52Z")

</div>

![image](https://global.discourse-cdn.com/square/original/2X/4/49930764db1ad47fc5a2d4b6701e434f56bf0dc1.png)

---

<div class="post-metadata">

**Author:** ![ellismp](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@ellismp](https://developer.squareup.com/forums/u/ellismp)\
**Post date:** [September 3, 2026, 9:38pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/8 "2026-09-03T21:38:06Z")

</div>

I think the font-src errors are due to a CSP policy on the Square side of things, not us.

The Square CSP Docs (yes I did read them fully) say use “font-src [https://square-fonts-production-f.squarecdn.com](https://square-fonts-production-f.squarecdn.com) [https://d1g145x70srn7h.cloudfront.net](https://d1g145x70srn7h.cloudfront.net)” - I have that covered with “font-src ‘self’ https://\*.squarecdn.com [https://d1g145x70srn7h.cloudfront.net](https://d1g145x70srn7h.cloudfront.net)” so I think the single-card-element-iframe.html:0 is causing this by specifying “font-src [https://square-fonts-production-f.squarecdn.com](https://square-fonts-production-f.squarecdn.com/) [https://d1g145x70srn7h.cloudfront.net/fonts/sqmarket/](https://d1g145x70srn7h.cloudfront.net/fonts/sqmarket/) ‘report-sample’” but trying to access [https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Semibold.woff2](https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Semibold.woff2)???

 ![image](https://global.discourse-cdn.com/square/original/2X/8/87b99fb7879a2b9f88b1402a51cd1ce02ef9a3e0.png)

---

<div class="post-metadata">

**Author:** ![ellismp](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@ellismp](https://developer.squareup.com/forums/u/ellismp)\
**Post date:** [September 3, 2026, 9:46pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/9 "2026-09-03T21:46:29Z")

</div>

Having gone into all the above, in general the form does still load and work despite the CSP errors, BUT

- there are frequent fails to load the SDK js (my code tries several times if it fails, but this takes time and I can’t see why the fail rate?)
- there are fails to initialise - or it takes a very long time. The Dom is ready and the card fields available when the initialise is called so it’s not that… (again, my code repeats the request if needed)

---

<div class="post-metadata">

**Author:** ![zacstlouis](https://avatars.discourse-cdn.com/v4/letter/z/b5a626/32.png) [@zacstlouis](https://developer.squareup.com/forums/u/zacstlouis)\
**Post date:** [September 4, 2026, 2:45pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/10 "2026-09-04T14:45:55Z")

</div>

Thanks for that! It looks like there are some issues with your CSP

### **Summary of what to add:**

```auto
connect-src 'self' https://web.squarecdn.com https://pci-connect.squareup.com https://o160250.ingest.sentry.io;
font-src 'self' https://square-fonts-production-f.squarecdn.com https://d1g145x70srn7h.cloudfront.net;

```

And add `https://web.squarecdn.com` to `img-src`.

### Further Explanation

**Missing directives:**

1. `connect-src` is missing entirely. Without it, `default-src 'self'` applies, blocking all connections to `pci-connect.squareup.com` and `web.squarecdn.com`.  
Add the below and any other support payment CSPs from the doc above:

```auto
connect-src 'self' https://web.squarecdn.com https://pci-connect.squareup.com;

```

1. `font-src` is missing entirely so it falls back to `default-src 'self'`, blocking the SDK’s fonts. This is why fonts fail in Chrome/Edge.  
Add:

```auto
font-src 'self' https://square-fonts-production-f.squarecdn.com https://d1g145x70srn7h.cloudfront.net;

```

1. `img-src` doesn’t include `web.squarecdn.com` which likely causes the `info-icon.svg` load failure.  
Add:

`https://web.squarecdn.com` to the existing `img-src`.

**Potential issues:**

1. `script-src` uses `'strict-dynamic'`. With `strict-dynamic`, allowlist entries like `https:` are ignored in supporting browsers. The SDK script at `https://web.squarecdn.com/v1/square.js` will only load if it’s given the correct nonce attribute, _or_ if it’s dynamically injected by an already-trusted script. Make sure the `script` tag loading `square.js` has the matching `nonce` attribute:

2. `require-trusted-types-for 'script'` can interfere with the SDK’s internal DOM manipulation if it uses `innerHTML` or similar APIs. If you see Trusted Types violations in the console after fixing the above, you may need to add a policy or remove this directive on the payment page.

**These look fine:**  
• `frame-src` — `https://*.squarecdn.com` correctly covers the SDK iframe  
• `style-src` — `https://web.squarecdn.com` and `'unsafe-inline'` are both present

---

<div class="post-metadata">

**Author:** ![ellismp](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@ellismp](https://developer.squareup.com/forums/u/ellismp)\
**Post date:** [September 4, 2026, 3:07pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/11 "2026-09-04T15:07:44Z")

</div>

Argh SORRY, the CSP I pasted above was copied from the browser dev tools rather than my code, and seems to have been truncated. I appreciate your reply above but the full CSP is as follows, and has always contained the connect-src, font-src, and img-src you’ve suggested I add.

I also removed the `require-trusted-types-for 'script'` which was suggested by the Google CSP evaluator (that you suggested above) before most of my replies above.

And yes, all calls include the nonce attribute, I’m well aware of that.

Please would you reply again having looked at all my replies, and bearing in mind they are all based on the following CSP rather than the truncated one above (sorry again)

 ![image](https://global.discourse-cdn.com/square/original/2X/1/17b65c375e4da945f711fbe90e2c8179ebbcbf15.png)

---

<div class="post-metadata">

**Author:** ![ellismp](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@ellismp](https://developer.squareup.com/forums/u/ellismp)\
**Post date:** [September 4, 2026, 3:30pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/12 "2026-09-04T15:30:40Z")

</div>

Please take a look at your suggested font-src because the errors I’m getting are due to the CSP _within the injected single-card-element-iframe.html:0_ which overrides the site CSP (and therefore my CSP can’t solve) and is missing [https://cash-f.squarecdn.com](https://cash-f.squarecdn.com) for font-src

If you don’t believe me, please load [https://web.squarecdn.com/1.84.3/single-card-element-iframe.html](https://web.squarecdn.com/1.84.3/single-card-element-iframe.html) in a browser with dev tools running and look at the CSP errors

 ![image](https://global.discourse-cdn.com/square/original/2X/4/407222170921db2d411f3a0c7bc600cb6445571c.jpeg)

---

<div class="post-metadata">

**Author:** ![zacstlouis](https://avatars.discourse-cdn.com/v4/letter/z/b5a626/32.png) [@zacstlouis](https://developer.squareup.com/forums/u/zacstlouis)\
**Post date:** [September 4, 2026, 4:20pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/14 "2026-09-04T16:20:53Z")

</div>

I can reproduce the the font errors from the square iframe itself, it shouldn’t affect anything payment wise and I don’t see any issues on the rendering either.

1. Have you checked the exact CSP loaded on your page? Located in the DevTools \> Network \> Initial page request.
  1. There might be a default CSP applied to the HTML. The browser chooses the stricter of the CSPs loaded on the page.

2. How is your site being loaded? Do you have access to the parent site or are you trying to embed your payment html in an iframe (i.e., main website window \> custom square payment iframe \> square card iframe)
  1. You can DM me a link to the page if possible, I can do a quick gander but no promises unfortunately

3. If all else fails, I highly recommend trying to reproduce with the quick start app. It’s very basic which will help isolate any issues.
  1. [GitHub - square/web-payments-quickstart: Quickstart for using Square's Web Payments SDK · GitHub](https://github.com/square/web-payments-quickstart)

---

<div class="post-metadata">

**Author:** ![ellismp](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@ellismp](https://developer.squareup.com/forums/u/ellismp)\
**Post date:** [September 4, 2026, 5:35pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/15 "2026-09-04T17:35:33Z")

</div>

1. My CSP definitely includes font-src https://\*.squarecdn.com (and this is what is loaded) which would allow [https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Regular.woff2](https://cash-f.squarecdn.com/static/fonts/cashsans/woff2/CashSans-Regular.woff2) etc BUT the stricter CSP is loaded within the Square iframe injected by the SDK, so those font loads are blocked by your CSP.  
And in any case your recommended font-src ‘self’ [https://square-fonts-production-f.squarecdn.com](https://square-fonts-production-f.squarecdn.com) [https://d1g145x70srn7h.cloudfront.net](https://d1g145x70srn7h.cloudfront.net); would still block these requests…

This might not affect the rendering, but given that Square insists on the correct CSP, it’s more than a little ironic that it’s not totally correct on your side…

1. I code and control the website. I’m using the JS Web Payments SDK with PHP. No iframes. I can DM you the link but you’d have to create an order to see the page.

2. Is there a sample page at a particular URL that I can look at, or do you mean going through all the github stuff?

---

<div class="post-metadata">

**Author:** ![zacstlouis](https://avatars.discourse-cdn.com/v4/letter/z/b5a626/32.png) [@zacstlouis](https://developer.squareup.com/forums/u/zacstlouis)\
**Post date:** [September 4, 2026, 8:56pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/16 "2026-09-04T20:56:46Z")

</div>

Sorry for this wild goose chase! I took a look at your site and went through the booking process to check out the payments page. I thought you were getting CSP errors form [https://pci-connect.squareup.com/payments/mtx/v2](https://pci-connect.squareup.com/payments/mtx/v2) but they are network errors. Is that what you are seeing?

I re-tested my site on firefox and I get the same network errors. If you inspect the stack trace of the network calls you can see they are metric logging calls and not critical to the load/usage of the card endpoint.

Is anything about the card payment not working? Or does what I said above track?

And the font stuff can be ignored, I’ll ask the devs about it and see if we can’t resolve that on our end.

---

<div class="post-metadata">

**Author:** ![ellismp](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@ellismp](https://developer.squareup.com/forums/u/ellismp)\
**Post date:** [September 4, 2026, 10:24pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/17 "2026-09-04T22:24:34Z")

</div>

Hey

Thank you so much for taking the time to do that!

Yes I guessed that was the case re those - I have a lot of programming experience, but am a little bit in the dark with network traffic sorry. I still think it would be good for Square to sort out the CSP font errors, but I understand they aren’t breaking it.

The card payment seems to work in most cases, but I am seeing page reloads where the card form takes some seconds to initialise and populate.

I’ll keep an eye on it as I’ve re-written the logic just now to load the js earlier. Won’t help with slow/failed initialise but we’ll see.

Many thanks

Martin

---

<div class="post-metadata">

**Author:** ![zacstlouis](https://avatars.discourse-cdn.com/v4/letter/z/b5a626/32.png) [@zacstlouis](https://developer.squareup.com/forums/u/zacstlouis)\
**Post date:** [September 4, 2026, 10:38pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/18 "2026-09-04T22:38:58Z")

</div>

No problem! I tend to only monitor the console in dev tools and never look at network unless my specific API isn’t working haha.

For the card form load timing all I can say is make sure the script itself is loading from a browser cacheable script source. I couldn’t find its script tag but I also didn’t look too hard. On my local app I eagerly load all of the payment frames at checkout so the delay isn’t noticeable.

---

<div class="post-metadata">

**Author:** ![zacstlouis](https://avatars.discourse-cdn.com/v4/letter/z/b5a626/32.png) [@zacstlouis](https://developer.squareup.com/forums/u/zacstlouis)\
**Post date:** [September 8, 2026, 7:47pm UTC](https://developer.squareup.com/forums/t/square-form-fails-to-initialise-various-network-issues/27478/19 "2026-09-08T19:47:24Z")

</div>

@ellismp Our development team should be rolling out updates to resolve the CSP font errors you were seeing.

Thanks for reporting it!
