AnsweredAssumed Answered

WebDirect with THREE.JS : SecurityError (DOM Exception 18): The operation is insecure.

Question asked by f.i.sciences on Nov 24, 2016
Latest reply on May 16, 2017 by f.i.sciences

I'm doing a THREE.JS development under a WebView. All is working fine under FMP, connected to FMS.

But if I open it under WebDirect, I get this error: 'SecurityError (DOM Exception 18): The operation is insecure.'

It has something to do with the texture who is not loading.


I had another error about CORS before that one (XMLHttpRequest cannot load is not allowed by Access-Control-Allow-Origin).

I resolved it by enabling CORS on IIS for the FMS server. Now the CORS error is gone. But stuck with the DOM exception 18.

I'm using default port for FMS and loading JPG texture, JavaScript from the same server/location (C:\Program Files\FileMaker\FileMaker Server\HTTPServer\conf).


Here the path used for:

Load WebDirect:éveloppement

Loading JS code: <script type='text/javascript' src=''></script>

Loading JPG texture:  THREE.TextureLoader().load(' 3D/1-3-2-5-Bois.jpg')


It should be working, because if I load this Three.js Web page sample in a Web Viewer in WebDirect, it works.


The image used there load from the same path/server (relative location, see below).

     var texture1 = textureLoader.load( "textures/crate.gif" );


Removing the first part '' to leave only 'Escaliers 3D/1-3-2-5-Bois.jpg' prevent texture from loading and gave error 'XMLHttpRequest cannot load Escaliers 3D/1-3-2-5-Bois.jpg. Cross origin requests are only supported for HTTP.' and 'DOM 19' (related to previous error) on WebDirect.


How can I find out it's related to what, and resolve it?

This problem is on Safari, Chrome and IE. From Mac to PC.


Thank you.