Cocos2d-JS 3.14.1 Facebook canvas issue?

Cocos2d-JS 3.14.1 Facebook canvas issue?
0.0 0



I wanted to check - some time ago we developed game on cocos2d-JS 3.8 which was working with no issues in Facebook canvas.

Today we experimented with Cocos2d-JS 3.14 version and seems something was changed in core as getting following error in console when trying access game in Facebook canvas. If using direct site link everything works.

Uncaught DOMException: Blocked a frame with origin "" from accessing a cross-origin frame.
    at f.visit (
    at f.visit (
    at f.visit (
    at f.drawScene (
    at f.mainLoop (
    at b ( 

Not sure if it is core issue or some part of our code. Is there confirmation that 3.14 version working with Facebook Canvas? It seems like included JS code trying to access something in Facebook Canvas and browser blocking it.

Could you please check with team this issue, I was testing right now hello world project and it doesn’t load in Facebook canvas stuck on console error. Also what strange even project generated with cocos2d-x 3.14.1 in console JS showing 3.14.


pfff found solution ;/

In your project open the following file:
then on line 250 change
visit: function () {
visit: function (parent) {

Actually this is like a typo, developers just missed to name the parameter in the function, and because by default window.parent is the parent frame, the error occurs because your game is trying to request the parent frame which is forbidden on facebook.

@slackmoehrle please ask devs to fix that issue and also correct JS engine version in 3.14.1


@energyy Thanks. I am passing this along.


Thanks, it was indeed a typo during refactorization of visit process, and it has been fixed in develop branch.
Sorry for the inconvenient