Page 1 of 1

Blocked a frame with origin

Posted: Sat Jul 24, 2021 4:13 am
by sadeghpournima
Hi.
I want to open process maker page as iframe in angular project. process maker url for iframe is http://........../sysworkflow/en/neoclassic/cases/main_init?sid=...........
When I open the page containing the frame. I see this error
Uncaught DOMException: Blocked a frame with origin "http://............" from accessing a cross-origin frame.
at new Sessions
(http://............/jscore/src/Sessions.js:13:61)
at http://............/jscore/src/Sessions.js:132:12
at http://............/jscore/src/Sessions.js:133:3
1.png
1.png (59.89 KiB) Viewed 7495 times
when, I open the mentioned address outside the project. There is no problem.
2.png
2.png (50.23 KiB) Viewed 7495 times
i see this topic https://forum.processmaker.com/viewtopic.php?t=710087
and this https://forum.processmaker.com/viewtopic.php?t=737128
but I still have a problem.

Re: Blocked a frame with origin

Posted: Tue Sep 21, 2021 2:44 am
by johanepic
Normally, scripts on different pages are allowed to access each other if and only if the pages they originate from share the same protocol, port number, and host. Above error message shows that you can't access an < iframe > with different origin using JavaScript/jQuery, it would be a huge security flaw if you could do it.

window.postMessage() provides a controlled mechanism to securely circumvent this restriction.

http://net-informations.com/jq/iq/default.htm

Re: Blocked a frame with origin

Posted: Thu Apr 04, 2024 3:43 am
by danielkyler
@ I had the same error, thank you for your help.