Failed to execute 'postMessage' on 'DOMWindow': The target origin provided


(Plastbox) #1

Hi all,

I’ve adopted this configurator
forum. sketchfab. com/t/searching-for-a-good-example-of-viewer-api-use-hide-show-objects/5459

and it was working for long time but lately it stopped showing/hiding objects.
Here is page where it doesn’t work
https://plast-box.com.ua/en/11-0300-lb/

I can see this errors in the console:

Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https:// sketchfab.com’) does not match the recipient window’s origin (‘https:// plast-box.com.ua’).

request failed with status 403 - URL: https://static.sketchfab.com/static/builds/web/dist/viewer-60ec3345cb954321ed75.js

I’ve tried also on http domain and it didn’t work, but it does work when opening sample html page from a harddrive.

sorry for url’s but as a newbie here i can put only 2 in the post…

Any help is welcome
DR


#2

This was solved over email. The issue was disallowed URL parameters in the init options, specifically the internal: 1 parameter. By design, this causes the viewer to reload with only allowed options, and this double load broke the Viewer API.