Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unsafe JavaScript attempt to access frame warning in Safari

I'm using Facebook Connect in my app. I have it working pretty well, but in the Safari Error console, I'm seeing errors like this:

Unsafe JavaScript attempt to access frame with URL http://...#... from frame with URL http://www.connect.facebook.com/extern/login_status.phpapi_key=..&extern=2&channel=http...xd_receiver.htm. Domains, protocols and ports must match. 

The app seems to function ok, though we are seeing periodic hangs and other bad behavior from Safari. When I run other Facebook Connect apps, I sometimes see this error too, so I don't think this is a problem with our implementation. Is it safe to ignore this warning?

like image 591
wolffiex Avatar asked May 13 '09 16:05

wolffiex


2 Answers

Safari's cross frame security is tighter than other browsers, I have done specific try/catch wrappers to handle these cases, if it otherwise works, great.

Either way, would post the bug upstream as olliej suggests.

like image 166
Tracker1 Avatar answered Sep 23 '22 14:09

Tracker1


It means you're attempting some form of cross origin access, which is unsafe -- while it may seem benign it's probably worth trying to find out why you're hitting it, if you use the nightlies or the Safari4 beta you can use the debugger in the web inspector, and make it break on all exceptions, which will let you see when it's actually attempting the cross-origin access.

As for the hangs, if you can find some kind of reduced testcase it would be great if you could file them at http://bugs.webkit.org

like image 22
olliej Avatar answered Sep 19 '22 14:09

olliej