cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with CIM hosted popup not closing (permission denied to get property Window.postMessage):

I have implemented CIM using a developer account on a non-secured site (obviously, the hosted popup is still secure, and the site itself will be secure when I'm done doing the implementation) with a fresh download of the example code as of a couple weeks ago. Everything works fine in Firefox on my newer Mac, but my older Mac, while it creates the popup just fine, hangs on submit or close, and when I look in the Javascript console, I see the message:

 

Error: uncaught exception: Permission denied to get property Window.postMessage.

 

My client says he had the same problem on his PC browser. As far as I can tell, it's not a problem with my code, since it does work on one of my computers (and yes, I'm using the same domain for the hostedProfileIFrameCommunicatorUrl and the correct path) Is there some obscure thing I haven't implemented properly (for instance, securing the site), or is the popup code bugged in some way, or what?

 

I can supply whatever code is necessary if you need to see samples. Just let me know what.

 

Just one side note - it might be helpful if the CIM code library came with a method for generating the token. I had to search here some time back and borrow code for doing that:

http://community.developer.authorize.net/t5/Integration-and-Testing/CIM-php-SDK-for-getHostedProfile...

 

EDIT: Ignore the lengthy footer below, it applies to my previous posts and not to this one. Hosted CIM was one of the few things I hadn't implemented all the way through yet, and I'm still grinding my way through a few issues here.

TJPride
Expert
1 ACCEPTED SOLUTION

Accepted Solutions

I tested your page with several browsers that I have access to and was only able to recreate this error with Firefox 2.0, which is obviously quite outdated.  Have you been able to confirm exactly what browser version your client is using with which he is seeing the error?  I am not aware of any security settings that would block this from working in the current version of IE.

View solution in original post

5 REPLIES 5

The error that you referenced is one that pops up for an attempt to perform cross-domain communication via javascript.  This type of error is exactly what the iFrameCommunicator is designed to resolve. In order for us to successfully send you a signal to your page from the hosted form, we load the iFrameCommunicator into a window with the necessary details.  Because the iFrameCommunicator is hosted on your domain, it is able to relay the signal to it's "grandfather" window without violating any cross-domain communication rules.

 

My best guess here without any further information is that there is a minor difference in the domain of your iFrameCommunicator and the domain of the main page you are testing. The cross-domain protection implemented by most browsers requires that even the subdomain match. So if you have set the iFrameCommunicatorURL to something like https://www.example.com/iFrameCommunicator.html and then load https://example.com/hostedCIMTest/, this would cause the type of error you are seeing.

Trevor
Administrator Administrator
Administrator

As I said before, I verified that the URL's match. You can go here and verify:

https://shop.fitnessdecuisine2.com/order.php

 

Fill out the form with dummy info and hit "Complete Order", the communicator URL will be displayed at the top of the next page. As you can see, it exactly matches the connection type and domain, and if you load up the communicator URL in a new window and view source, you can see that the communicator page -is- there. Plus, the popups work on some browsers and not others. It works fine on my PC in both IE and Firefox, also on my newer Mac in Firefox, but my old Mac coughs up an error, as well as my client's PC running Windows 7 and IE. I can discount my Mac - maybe the browser version is just too old to handle this - but IE having problems is a big issue. Could it be security settings in his browser being too strict?

I tested your page with several browsers that I have access to and was only able to recreate this error with Firefox 2.0, which is obviously quite outdated.  Have you been able to confirm exactly what browser version your client is using with which he is seeing the error?  I am not aware of any security settings that would block this from working in the current version of IE.

Asking him now.

Ok, he says it's working for him now, so I don't know. I didn't change anything in the programming. In any case, I'm not going to worry about a problem I can't reproduce on my more recent computers.

 

For anyone going to the URL I listed above, it no longer works. The site has been made live, and the test subdomain at my site will be retired in a week or two.