AR 14 JSViewer - Sticky PREPARING PRINT... overlay on Chrome

Posted by: ricardo.pereira on 21 September 2020, 3:55 am EST

  • Posted 21 September 2020, 3:55 am EST

    Hi,

    We are using AR14 JSViewer and we found out that there was a bug when printing a report using it's native functionality.

    Printing on Firefox works well even though we get a random log on the console with the following message: "PDF e8b68c6f31620043965edaadef26b51f [1.4 ActiveReports 14 / ActiveReports 14] (PDF.js: 2.6.123)".

    The problem is when we try to print on Chrome. The same blue overlay with the text "Preparing Print" appears then the print dialog, but after we perform an action on that dialog (either cancel or print), the blue overlay doesn't fade and we end up with the following error on the console:


    Uncaught DOMException: Blocked a frame with origin "https://<domain>" from accessing a cross-origin frame.
    at HTMLIFrameElement.a.onload


    Do you have any suggestion? Thanks in advance.

    Best Regards,
    Ricardo Pereira
  • Replied 21 September 2020, 3:53 pm EST

    Hello,

    I am not able to replicate the issue at my end using the sample at the following link:
    https://github.com/activereports/WebSamples14/tree/master/JsViewerSamples/JSViewer_MVC
    Chrome Version: 85.0.4183.121

    Could you please check with the above sample and check if the issue is reproducible at your end or not. If not, could you please share the stripped down sample so that I can able to replicate the issue at my end.

    Thanks,
    Mohit
  • Replied 23 September 2020, 1:59 am EST

    Hi Mohit,

    Using that sample I had no issues.

    After some further investigation I noticed that the problem lies on the "jsViewer.min.js" file. I don't know which version you used but here are the steps to replicate:

    Base configuration:
    - Have a web site running on http://localhost:5001 for example.
    - Have the reports api runnin on http://localhost:5003 (this must be different from the web site url).
    - Use chrome with "85.0.4183.121" version.

    Test 1 (working well):
    - Use "@grapecity/ar-viewer@14.0.1483" to run the report then click on the print button. This will work opening the report on an iframe in a new tab and also the print dialog.

    Test 2 (not working and throwing the initially reported error):
    - Use "@grapecity/ar-viewer@14.2.2530" to run the report then click on the print button. This will throw the error "Uncaught DOMException: Blocked a frame with origin "https://<domain>" from accessing a cross-origin frame.
    at HTMLIFrameElement.a.onload" even though the print dialog will also appear. But the "Preparing Print" won't fade preventing every further action.

    Attached is a sample website with the broken jsViewer.min.js version already included. I can't provide an api but I guess you'll have one for this testing cases.

    The only thing you'll have to do is modify the file "app\Views\Home\Index.cshtml" by replacing the "reportService" url and the "REPORT_NAME.rdlx" with your report.

    Hope this helps you sort this issue.

    Best Regards,
    Ricardo Pereiraapp.zip
  • Replied 24 September 2020, 4:44 am EST

    Hello,

    I am able to reproduce the issue. I have escalated the issue to the development team (AR-25176) and will inform you once I get any updates from them.

    Thanks,
    Mohit
  • Replied 24 September 2020, 7:31 pm EST

    Hi Mohit,

    Thank you, I'll keep checking this thread.

    Best Regards,
    Ricardo Pereira
  • Replied 25 September 2020, 1:41 am EST

    Hello,

    This is a bug in new JsViewer. Can you use the Old JSViewer (@grapecity/ar-viewer@14.0.1483) as workaround for time being.

    Thanks,
    Mohit
  • Replied 24 October 2020, 3:06 am EST

    I am getting exactly the same problem with AR14 Pro vs 14.2.20530 in a DotNET Core (3.1.8) web application. On exiting the Print dialog (either after having printed a document or by clicking the [Cancel] button) the "Preparing print..." modal dialog remains on-screen with no way of clearing it other than a total page refresh.

    Do you have a temporary fix that I can use?

    Kind regards,

    Paul


  • Replied 25 October 2020, 2:12 pm EST

    Hello,

    Currently it is with developer team and will inform you once it is fixed.
    >>Do you have a temporary fix that I can use?
    You can use the old version of JS (@grapecity/ar-viewer@14.0.1483) as workaround for time being.

    Thanks,
    Mohit
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels