# Body does not pass verification

**URL:** <https://forum.dfinity.org/t/body-does-not-pass-verification/18442>\
**Category:** Developers\
**Tags:** Functional-Programming, Discussing\
**Created:** [February 10, 2023, 9:04am UTC](https://forum.dfinity.org/t/body-does-not-pass-verification/18442 "2023-02-10T09:04:45Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![gladguy](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gladguy/32/11145_2.png) [@gladguy](https://forum.dfinity.org/u/gladguy)\
**Post date:** [February 10, 2023, 9:04am UTC](https://forum.dfinity.org/t/body-does-not-pass-verification/18442/1 "2023-02-10T09:04:45Z")

</div>

Hey guys

Getting “Body does not pass verification” for a simple HTML canister but with lots of larger files.

What could be the problem ?

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [February 10, 2023, 9:22am UTC](https://forum.dfinity.org/t/body-does-not-pass-verification/18442/2 "2023-02-10T09:22:25Z")

</div>

Can you tell a bit more about your canister?

- Are you using the default asset canister? This has a massive impact on my answer.
- Does this happen repeatedly or just occasionally? You could be hitting a bad replica or your system time could not match up with the IC time
- Any browser console logs? Probably not I guess but there is a chance

---

<div class="post-metadata">

**Author:** ![gladguy](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gladguy/32/11145_2.png) [@gladguy](https://forum.dfinity.org/u/gladguy)\
**Post date:** [February 10, 2023, 9:49am UTC](https://forum.dfinity.org/t/body-does-not-pass-verification/18442/3 "2023-02-10T09:49:55Z")

</div>

PROJECT ROOT ← App main folder  
├── src  
│ ├── index.html  
├── assets  
│ ├── Images  
│ └── 10  
│ └── 11  
│ └── 12  
└── 13

Plain html content showing lots of images

---

<div class="post-metadata">

**Author:** ![gladguy](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gladguy/32/11145_2.png) [@gladguy](https://forum.dfinity.org/u/gladguy)\
**Post date:** [February 10, 2023, 9:51am UTC](https://forum.dfinity.org/t/body-does-not-pass-verification/18442/4 "2023-02-10T09:51:08Z")

</div>

Have this external reference

```auto
 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.css"
   integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
   crossorigin="anonymous" referrerpolicy="no-referrer" />
 <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.js"
   integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
   crossorigin="anonymous" referrerpolicy="no-referrer"></script>
 <script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.8.0/proj4.js"
   integrity="sha512-ha3Is9IgbEyIInSb+4S6IlEwpimz00N5J/dVLQFKhePkZ/HywIbxLeEu5w+hRjVBpbujTogNyT311tluwemy9w=="
   crossorigin="anonymous" referrerpolicy="no-referrer"></script>
 <style>

```

---

<div class="post-metadata">

**Author:** ![gladguy](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gladguy/32/11145_2.png) [@gladguy](https://forum.dfinity.org/u/gladguy)\
**Post date:** [February 10, 2023, 9:52am UTC](https://forum.dfinity.org/t/body-does-not-pass-verification/18442/5 "2023-02-10T09:52:49Z")

</div>

![Screenshot from 2023-02-10 13-52-28](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/9/90e168c7ba430c6f1658003a8a069458b113d11d.png)

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [February 10, 2023, 11:38am UTC](https://forum.dfinity.org/t/body-does-not-pass-verification/18442/6 "2023-02-10T11:38:29Z")

</div>

You are probably not serving the right certificate with your asset. But if you access your canister through `<canister id>.raw.ic0.app` instead of `<canister id>.ic0.app` things should work out. You’ll also have to turn of the redirect.

---

<div class="post-metadata">

**Author:** ![gladguy](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gladguy/32/11145_2.png) [@gladguy](https://forum.dfinity.org/u/gladguy)\
**Post date:** [February 10, 2023, 3:16pm UTC](https://forum.dfinity.org/t/body-does-not-pass-verification/18442/7 "2023-02-10T15:16:13Z")

</div>

Thank severin. How to turn off the redirect ?

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [February 21, 2023, 12:15pm UTC](https://forum.dfinity.org/t/body-does-not-pass-verification/18442/8 "2023-02-21T12:15:12Z")

</div>

Have a look at this changelog entry: [sdk/CHANGELOG.md at master · dfinity/sdk · GitHub](https://github.com/dfinity/sdk/blob/master/CHANGELOG.md#featfrontend-canister-add-allow_raw_access-config-option)  
You also have to change the `match` to hit every file instead of just one. Most likely you want `"match": "**/*"`

---

<div class="post-metadata">

**Author:** ![Vitaliy.Klepka](https://avatars.discourse-cdn.com/v4/letter/v/dbc845/32.png) [@Vitaliy.Klepka](https://forum.dfinity.org/u/Vitaliy.Klepka)\
**Post date:** [June 14, 2024, 6:18pm UTC](https://forum.dfinity.org/t/body-does-not-pass-verification/18442/9 "2024-06-14T18:18:56Z")

</div>

Hi @Vivienne  
I have same issue, but in my case the behaviour is very weird. I’ve deployed our custom FE canister which contains VerifiedCredentials issuer logic, and, some period it was working well so our guys and OpenChat guys (and @andronikos\_nedos as well) were able to create a profile on our platform and issue PoH VC. But few days later, the canister started to respond with “Body does not pass verification” error, so we decided to redeploy the canister without any changes in code, just redeploy, and it helped, BUT, not for a long time…  
You can visit our [FE](https://modclub.dev)[h433y-uqaaa-aaaah-qdbja-cai], at the moment its “broken”. I’m hardly trying to figure out what can be the cause for such behaviour, and I will be very appriciated if you can give me any advice.

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [June 18, 2024, 8:56am UTC](https://forum.dfinity.org/t/body-does-not-pass-verification/18442/10 "2024-06-18T08:56:33Z")

</div>

That is weird… I don’t have much to offer, but maybe you can copy how we do our unit tests for the asset canister? [Here](https://github.com/dfinity/sdk/blob/master/src/canisters/frontend/ic-certified-assets/src/tests.rs#L85-L99) is how I check that the asset canister produces valid certificates

@NathanosDev any idea why it would work sometimes and not other times?

---

<div class="post-metadata">

**Author:** ![NathanosDev](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nathanosdev/32/7204_2.png) [@NathanosDev](https://forum.dfinity.org/u/NathanosDev)\
**Post date:** [June 18, 2024, 11:15am UTC](https://forum.dfinity.org/t/body-does-not-pass-verification/18442/11 "2024-06-18T11:15:37Z")

</div>

It seems that the root hash of the tree does not match the canister’s certified variable, so my guess is that the certified variable is not being updated when the tree is updated, or the witness is not being correctly constructed.

There may be some interference from the VerifiedCredentials issuance logic, since canister signatures are also leveraging certified variables. This may explain why deploying the canister fixes it temporarily.

Creating some unit tests to verify the behaviour of the canister as Severin suggested would be the best path forward here in my opinion.

---

<div class="post-metadata">

**Author:** ![Vitaliy.Klepka](https://avatars.discourse-cdn.com/v4/letter/v/dbc845/32.png) [@Vitaliy.Klepka](https://forum.dfinity.org/u/Vitaliy.Klepka)\
**Post date:** [June 18, 2024, 12:02pm UTC](https://forum.dfinity.org/t/body-does-not-pass-verification/18442/12 "2024-06-18T12:02:53Z")

</div>

Thanks for your advices @Vivienne@NathanosDev .  
I’ll check carefully tests logic and add such to my code.  
Btw, I believe that it worth to mention that the issue appears not after VC issuance, but right after VC requested by third party( OC in our case ), and VCs were always delivered properly, I mean VC response was always correctly constructed.

---

<div class="post-metadata">

**Author:** ![Vitaliy.Klepka](https://avatars.discourse-cdn.com/v4/letter/v/dbc845/32.png) [@Vitaliy.Klepka](https://forum.dfinity.org/u/Vitaliy.Klepka)\
**Post date:** [June 18, 2024, 12:59pm UTC](https://forum.dfinity.org/t/body-does-not-pass-verification/18442/13 "2024-06-18T12:59:32Z")

</div>

Yep, I can confirm that `update_root_hash` was the cause. I had it for assets init only, but, after I’ve added it to `prepare_credentials()` - everything goes smoothly.  
Thanks for your support @Vivienne@NathanosDev !
