function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sudheer BabuSudheer Babu 

VM2623 iframeinterface.js:1Uncaught SecurityError: Blocked a frame with origin "https://na35.salesforce.com" from accessing a frame with origin "https://c.na35.visual.force.com". Protocols, domains, and ports must match.

Hi All,

I want to navigate to case detail page on the Service Console from a Visual Force page.But i am getting the below error when i try to click the link.

VM2623 iframeinterface.js:1Uncaught SecurityError: Blocked a frame with origin "https://na35.salesforce.com" from accessing a frame with origin "https://c.na35.visual.force.com". Protocols, domains, and ports must match.

I added following in the console whitelist domains

na35.salesforce.com,
c.na35.visual.force.com

Any help is appreciated on this.

VF Page : 

<apex:page standardController="Case" >

     <A HREF="#" onClick="testOpenPrimaryTab();return false">Click here to open a new primary tab</A> 

    <apex:includeScript value="/support/console/30.0/integration.js"/>
    <script type="text/javascript">
        function testOpenPrimaryTab() {
            //Open a new primary tab with the salesforce.com home page in it
            sforce.console.openPrimaryTab(null, '/'+'50041000000nYHR', false, 
                'salesforce', openSuccess, 'salesforceTab');
        }
        
        var openSuccess = function openSuccess(result) {
            //Report whether opening the new tab was successful
            if (result.success == true) {
                alert('Primary tab successfully opened');
            } else {
                alert('Primary tab cannot be opened');
            }
        };
        
  </script>

</apex:page>

Error Details : 

VM2623 iframeinterface.js:1Uncaught SecurityError: Blocked a frame with origin "https://na35.salesforce.com" from accessing a frame with origin "https://c.na35.visual.force.com". Protocols, domains, and ports must match.handleOnload @ VM2623 iframeinterface.js:1window.onload @ crossDomainProxy.html:4

crossDomainProxy.html:4​

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<script type="text/javascript" src="/support/console/xdomain/30.0/xdomain.js"></script>
<script type="text/javascript" src="/support/console/xdomain/30.0/iframeinterface.js"></script>
<script type="text/javascript">window.onload = function() {Sfdc.xdomain.IframeInterface.handleOnload();};</script>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head></html>
 iframeinterface.js
window.Sfdc=window.Sfdc||{};Sfdc.xdomain=Sfdc.xdomain||{};Sfdc.xdomain.IframeInterface=function(){return{handleOnload:function(){var a=window.location.href.split("#")[1]||"";if(a){var a=new Sfdc.xdomain.Query(a),b=a.targetFrame;("sfdc-console"===b?top:"undefined"!==typeof a.targetParentFrame?parent.frames[a.targetParentFrame].frames[b]:parent.frames[b]).Sfdc.xdomain.Listener.accept(a)}}}}();


Please suggest a solution to this .

Thanks,
Sudheer
Simon Molloy 8Simon Molloy 8
Hi Sudheer,
Did you ever get a resolution to this?  I am experiencing the exact same problem, and have so far not come across a solution.

Thanks.