Cant send postMessage to parent, using iframe outer

Im trying send postMessagr to parent page. But in not working, how to fix it?
in 8thwall project:

window.parent.postMessage(‘iframe-click’, ‘*’)

in my page reactjs:

useEffect(() => {
    function receiveMessage(event) {
        if (event.origin === ‘my_8thwall_project_url’) {
            console.log(‘ok’)
        }
    }
    window.addEventListener('message', receiveMessage);
    return () => {
          window.removeEventListener('message', receiveMessage);
    };
},  []);

I would console.log the event.origin, as well as going into your browser’s console and calling window.parent.postMessage yourself and see if it works.

And what is your result?