Print options - Error

Stimulsoft Reports.JS discussion
Post Reply
jpgb
Posts: 67
Joined: Tue Mar 15, 2016 11:42 am

Print options - Error

Post by jpgb »

Javascript Error when I select "print to pdf":

VM58:18 Uncaught DOMException: Blocked a frame with origin "https://xxxxx.xxxxx.xx" from accessing a cross-origin frame.
at HTMLIFrameElement.t.onload (<anonymous>:18:15950)

I´m opening the report in a new window in the browser

Thanks
JB
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Print options - Error

Post by HighAley »

Hello,

What version of our tool and what browser do you use?

Thank you.
dmbook
Posts: 1
Joined: Tue Feb 28, 2023 5:00 am

Re: Print options - Error

Post by dmbook »

Good afternoon. I have a similar problem.

Chrome 110.0.5481.104
Stimulsoft 2020.5.2
Vue.js 3.2
.net core 6

Steps to reproduce
1. In the Chrome settings, enable downloading PDF files instead of opening for viewing
2. Open the report preview and click the Print -> PDF button

Error is triggered

Code: Select all

Uncaught DOMException: Blocked a frame with origin "...." from accessing a cross-origin frame.
Please tell me how to solve this problem
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Print options - Error

Post by Lech Kulikowski »

Hello,

Please try to check the last release build.

Thank you.
jefryarch
Posts: 1
Joined: Mon Aug 21, 2023 7:05 am

Re: Print options - Error

Post by jefryarch »

The "Blocked a frame with origin from accessing a cross-origin frame" error is triggered by the Same-Origin Policy in web browsers, which prevents scripts in one frame from directly accessing content in a frame from a different origin due to security concerns. To address this issue, you should employ cross-origin communication techniques such as postMessage() for controlled messaging between frames, configure Cross-Origin Resource Sharing (CORS) headers when controlling both source and destination servers, or use JSONP for data retrieval. Verify proper URL configuration, consider server-side solutions, and adhere to browser extension policies. These measures ensure secure and legitimate interactions between frames without violating the security constraints imposed by the Same-Origin Policy.
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Print options - Error

Post by Lech Kulikowski »

Hello,

Thank you for the information.
Post Reply