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

I can see this errors in the console:

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

request failed with status 403 - URL:

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


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.