-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facebook playable black screen #18
Comments
Also, we tried to investigate the problem and find that the code stuck in System.import. Maybe it helps with solving the problem. |
@roleplaydiary when you mentioned |
I also have a black screen in ads manager |
Does anyone have a solution to this problem? I have the same problem in ads manager. |
@roleplaydiary Did you manage to solve this? I have the exact same problem |
Good news everyone! I've found a solution for this issue, it stills looks like a workaround and is not heavily tested but works for me. In your FB build you have a number of 'indexN.js' files in a js folder. You need to find one with __adapter_init_js() function definition (it is usually index5.js). By default this function looks like (beautified version)
You need to replace it with function of just script creation and launch a load event on that element
A bit of reflection on the issue: it looks like Fb just blocks scripts that are dynamically added to the document with src property, but they works fine when added with text on innerHTML property. The problem is that you can't get 'load' event emitted when you add script with innerHTML. So that's what I do in this solution - just add scripts with text property and emit 'load' after |
@Kodedyukh Your solution works great! Thanks! |
@Kodedyukh thanks |
@Kodedyukh The solution won't work on 3.8.x if Spine is used. |
Did u find solution for Spine? |
No. I downgraded my project to 3.7.4. |
We've uploaded the playable to Facebook Ads Manager and it has no errors, but black screen.
Cocos Creator ver.3.8.2(Also tried in 3.6.0)
All the other versions work perfect(Unity, Iron Source, and etc.), facebook also works perfectly fine locally and in facebook playable preview tool.
And even empty project with just the background doesn't work.
Thank you in advance.
The text was updated successfully, but these errors were encountered: