Body does not pass verification

Hey guys

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

What could be the problem ?

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
1 Like

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

Plain html content showing lots of images

Have this external reference

 <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>

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.

1 Like

Thank severin. How to turn off the redirect ?

Have a look at this changelog entry: sdk/CHANGELOG.md at master · dfinity/sdk · GitHub
You also have to change the match to hit every file instead of just one. Most likely you want "match": "**/*"