Viewer SharePoint Online crash

To be clear this is not a Babylonjs issue.

@ryantrem as it affects the Viewer implementation in SharePoint.

BJS - [14:20:36]: Babylon.js v8.0.1 - WebGPU1 engine

Repro: Uploading and viewing a meshopt compressed GLB model in SharePoint Online viewer.

Results in an unhandled error and screen of doom:

Refused to load the script 'https://cdn.babylonjs.com/meshopt_decoder.js' because it violates the following Content Security Policy directive: "script-src https://res-1.cdn.office.net 'self' ...[clipped]... 'unsafe-eval' Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

I’ve tried adding the cdn domain to “HTML Field Security” in SharePoint but to no avail.

It would be nice to support Mesh optimisation or at least handle the error.

You can use https://batch.babylonpress.org to compress a GLB for testing.

Thanks for the heads up! I will get in touch with the SharePoint team.

1 Like