Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8000541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:49:47+00:00 2026-06-04T15:49:47+00:00

My main javascript (and so all the static content) is included from https://static.anuary.com .

  • 0

My main javascript (and so all the static content) is included from https://static.anuary.com. The URL that user is browsing is https://dev.anuary.com/somepath/.

Where does the channel file need to be, dev.anuary.com or static.anuary.com? At the moment it is http://static.anuary.com/channel.html.


I am asking because I am still getting the error that says:

Unsafe JavaScript attempt to access frame with URL
https://www.facebook.com/dialog/oauth?access_token=%5B..]&api_key=[..]&app_id=[..]&client_id=[..]&display=popup&domain=dev.anuary.com&locale=en_US&origin=1&redirect_uri=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D6%23cb%3Df3ac7a0544%26origin%3Dhttp%253A%252F%252Fdev.anuary.com%252Ff373e908a8%26domain%3Ddev.anuary.com%26relation%3Dopener%26frame%3Df312def42c&response_type=token%2Csigned_request&scope=email%2Cuser_birthday%2Cuser_likes%2Cuser_interests%2Cpublish_stream&sdk=joey
from frame with URL
http://dev.anuary.com/658fe23c24564ac978c31d167549c4ce8b36686d65a78ad99bfb38765d46e232/.
Domains, protocols and ports must match.


In response to @dtbarne:

Well, that’s the thing – I still don’t know, because I’ve tried bowth ways and any in case it produces the same error:

Unsafe JavaScript attempt to access frame with URL
https://www.facebook.com/dialog/oauth?access_token=%5B..]&api_key=[..]&app_id=[..]&client_id=[..]&display=popup&domain=dev.anuary.com&locale=en_US&origin=1&redirect_uri=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D6%23cb%3Df1ee31b93%26origin%3Dhttp%253A%252F%252Fdev.anuary.com%252Ff9359b2f%26domain%3Ddev.anuary.com%26relation%3Dopener%26frame%3Df18e94f9c4&response_type=token%2Csigned_request&scope=email%2Cuser_birthday%2Cuser_likes%2Cuser_interests%2Cpublish_stream&sdk=joey
from frame with URL
http://dev.anuary.com/658fe23c24564ac978c31d167549c4ce8b36686d65a78ad99bfb38765d46e232/.
Domains, protocols and ports must match.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T15:49:49+00:00Added an answer on June 4, 2026 at 3:49 pm

    As you said yourself, this error is not fatal, and is meant is a warning to the user that something fishy might be happening.

    Facebook also marked this issue as By Design in their bugs system: Bugs > Unsafe JavaScript attempt to access frame with URL….
    Also, there are plenty of threads here on stack overflow about this, for example: Facebook Authentication – Unsafe JavaScript attempt to access frame with URL.

    Now that we know that this “error message” is unavoidable, use the channel as you wish, as long as everything works for you.
    You don’t even need to use the channel, as it states in the documentation:

    The channelUrl parameter is optional, but recommended. Providing a
    channel file can help address three specific known issues. First,
    pages that include code to communicate across frames may cause Social
    Plugins to show up as blank without a channelUrl. Second, if no
    channelUrl is provided and a page includes auto-playing audio or
    video, the user may hear two streams of audio because the page has
    been loaded a second time in the background for cross domain
    communication. Third, a channel file will prevent inclusion of extra
    hits in your server-side logs. If you do not specify a channelUrl, you
    can remove page views containing fb_xd_bust or fb_xd_fragment
    parameters from your logs to ensure proper counts.

    But it also states that:

    The channel file addresses some issues with cross domain communication
    in certain browsers.

    So it’s up to you to decide.
    I personally recommend to use the channel and to serve the file from your regular server and not from the static servers.
    You should however set the output to have a long caching expiration date so that your server won’t get a lot of requests for this file, as they mention in the JS SDK documentation page:

    <?php
       $cache_expire = 60*60*24*365;
       header("Pragma: public");
       header("Cache-Control: max-age=".$cache_expire);
       header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$cache_expire) . ' GMT');
    ?>
    <script src="//connect.facebook.net/en_US/all.js"></script>
    

    (php example, but can be done with any language).

    Hope this answers clarifies things for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to include Facebook's Javascript SDK (the all.js file from http://connect.facebook.com/en_US/all.js )
I have a main function in javascript that is function a() { some code
I have a main JavaScript file, we'll call core.js that other file are dependent
I come from a Java/AS3/Javascript background where all of my classes are organized into
I'm attempting to create a main js controller that includes all needed js files
I'm working on a C#/ASP.NET project that has all the javascript files in a
I have The following in my main javascript file: window.onbeforeunload = function () {
I would like to use src/main/javascript as the source directory for my javascript files
I have to clear and redraw a raphael javascript main container. I've tried with
I have a javascript file main.js and five html files 1.html,2.html,3.html,4.html,5.html I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.