rpc-anywhere icon indicating copy to clipboard operation
rpc-anywhere copied to clipboard

Failed to read a named property 'href' from 'Location': Blocked a frame with origin "http://localhost:3000" from accessing a cross-origin frame.

Open phanmn opened this issue 1 year ago • 1 comments

In which versions of the package (and relevant enviroment tools such as Node.js) have you observed the bug?

1.7.0

What steps will reproduce the bug?

Try to use iframe with different origin

What behavior did you expect?

No more error

What actually happened?

Failed to read a named property 'href' from 'Location': Blocked a frame with origin "http://localhost:3000" from accessing a cross-origin frame.

Workaround

No response

Proposed fix

Fix waitForLoad function, which is reading contentWindow?.location.href

Other remarks

No response

Contribution

  • [ ] I would like to try to contribute a fix

phanmn avatar Jun 12 '24 04:06 phanmn

What would you propose instead? The iframe system needs a way to check that the iframe is ready. You can also use the lower level transport if that unblocks you, btw.

DaniGuardiola avatar Jun 13 '24 22:06 DaniGuardiola