I'm not including any of my code, because this is a problem even on the demo site (connectdemo.com).
When I load a page embedding the CCP, it doesn't work on some of my computers. Sometimes it will cause the login popup, but even then not load the softphone, and sometimes it won't even load the popup. This comes along with the usual "Refused to display.../ccp#/ in a frame because it set 'X-Frame-Options' to 'sameorigin'. That error comes from the actual page (callAttributes.html in this case, on the demo site).
But I've noticed something new here: I'm also receiving an error from connectCCP.js (or amazon-connect....js, if you're using your own build). It comes first from line 20398, and then from 20472 after the login is popped.
GET https://DOMAIN.awsapps.com/connect/ccp net::ERR_BLOCKED_BY_RESPONSE
Note that there is no '#/' at the end of that. Whatever the '#/' is for, is it something that some of my computers are able to overlook, and others are not?
Here's the code from Streams that triggers the error before the login popup:
// Create the CCP iframe and append it to the container div.
var iframe = document.createElement('iframe');
iframe.src = params.ccpUrl;
iframe.style = "width: 100%; height: 100%";
iframe.allow = "microphone";
containerDiv.appendChild(iframe); // This is line 20398
And here is after the login:
if (connect.core.iframeRefreshInterval == null) {
connect.core.iframeRefreshInterval = window.setInterval(function() {
iframe.src = params.ccpUrl; // This is line 20472
}, CCP_IFRAME_REFRESH_INTERVAL);
conduit.onUpstream(connect.EventType.ACKNOWLEDGE, function() {
this.unsubscribe();
global.clearInterval(connect.core.iframeRefreshInterval);
connect.core.iframeRefreshInterval = null;
connect.core.getPopupManager().clear(connect.MasterTopics.LOGIN_POPUP);
});
}
And here is where that params.ccpUrl is set:
var params = {};
if (typeof(paramsIn) === 'string') {
params.ccpUrl = paramsIn;
} else {
params = paramsIn;
}
I'm not sure where paramsIn is being set, but that might be the issue.