Skip to main content

Notifications

Business Central forum
Suggested answer

BC20 on prem Edge Print Handle by Browser

Posted on by 834

Working with BC20 on prem, when I print to printer “Handled by Browser”, after I click print, the Edge browser printer dialog does not open and I’m unable to print.  Print preview does preview the report as I’d expect, and print “send to” “pdf document” also works.  I’m on the most current Edge, I’ve removed all Edge extensions, I’ve cleared Edge history, I’ve tried Edge from InPrivate mode, I’ve uninstalled/reinstalled Edge, I’ve rebooted, I’ve tried different BC URLS and a test SAAS site we have, all with same behavior. 

 In Chrome it works fine. 

 In Edge if I look at Developer tools I see,

 Uncaught SecurityError: Blocked a frame . . . with origin . . . from accessing a frame with origin "null".  The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "data". Protocols must match.

 Uncaught DOMException: Blocked a frame with origin . . . from accessing a cross-origin frame.

    at HTMLIFrameElement . . .

 Help?

Categories:
  • Suggested answer
    BC20 on prem Edge Print Handle by Browser
    Open the Settings in Edge.
     
     
    Search for 'PDF' and expand the PDF documents
     
     
     
    Make sure that the option to download PDF files to your device is off.
  • nickmanny Profile Picture
    nickmanny 136 on at
    BC20 on prem Edge Print Handle by Browser
    This error "Blocked a frame with origin from accessing a cross-origin frame" is not a bug. The same-origin policy is a security mechanism that ensures that window objects only have access to the informations they are authorized to get. To fix this issue, ensure that both the parent page and the iframe content are served from the same domain or implement Cross-Origin Communication techniques such as postMessage to safely communicate and exchange data between the two frames. 
     
    The window.postMessage() method provides a controlled mechanism to securely circumvent this Same-Origin Policy restriction. The window.postMessage() safely enables cross-origin communication between Window objects; e.g: between a page and an iframe embedded within it.
     
    postMessage(message, targetOrigin)
    postMessage(message, targetOrigin, [transfer])
     
    targetOrigin - specifies what the origin of targetWindow must be for the event to be dispatched, either as the literal string "*" (indicating no preference) or as a URI.
    If you don't have control over the content in the iframe, you won't be able to directly access its elements due to security restrictions.
     
  • John Bellinger Profile Picture
    John Bellinger 834 on at
    RE: BC20 on prem Edge Print Handle by Browser

    We discovered that this was only happening while I was working from Edge in a specific Edge Profile.

  • Suggested answer
    Andy Sather Profile Picture
    Andy Sather on at
    RE: BC20 on prem Edge Print Handle by Browser

    Hello,

    If you don't get further responses to this issue, you may want to raise a support request to Microsoft support via your CSP / Partner.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,451 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,353 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans