[SOLVED] Black screen with no errors in console in facebook playable ad

The title pretty much sums it up.
When i upload build ad it just doesn’t start and stuck with black screen.

Does the HTML file work on your PC? (Double click on it to open it in a browser)

Do you have Adblock installed on your browser?

HTML works. Background is missing, but works.
No, i don’t have adblock.

Are you testing from within the ads manager in FB as shown here:

Yes, and all your sample projects work perfectly.

When you built the HTML file, what was the output in terminal? Maybe there were some errors there?

What is the file size of the HTML file?

There were some errors in HTML that I was able to fix. But this didn’t change anything. I downloaded the zip using “npm run download” and uploaded it to FB, buy it still shows the black screen.
Html file was 12 mb.

FB Ads for HTML playable has a limit of 2MB. This could be why it wasn’t loading in the preview on FaceBook

I started to look on how to build html file when i started to recive black screens from zip.
Originally i was trying to upload zip file witch is 4.7 mb.
The screenshots i pined are from that moment.

I’m confused at what stage you are at now.

What type of build are you uploading and what errors are you getting?

Ok, let’s get back to begining.

I tried to upload a zip file and got black screen with NO errors. (4,7mb)

Then i tried building html, it was too big (12mb),after working with it - 2.3 mb, still more then needed.

Right now i’m trying to shrink down html more to see if this will show something else besides black screen.

How did you build the zip? Also worth noting that the contents of the zip have to less than 5MB uncompressed

You may want to cross check with the requirements here: https://www.facebook.com/business/help/412951382532338

I built the zip according to this:

npm run download

If you are building for FB Ads and want a ZIP, you need to follow these steps https://developer.playcanvas.com/en/user-manual/publishing/playable-ads/fb-playable-ads/#zip-file

And build for one-page, not download

Yes. Tried that too.

I know that that problem is really complicated. I’m not trying to make you do a miracle. But I am confused too. Can you at least help me with html shrink? It’s 2.2 mb… need to get rid of 0.2

Are you using the engine compression option? https://github.com/playcanvas/playcanvas-rest-api-tools#compress-engine-code


Then your only options is to reduce the size or quality of the assets. Eg making a texture smaller or lower quality.

Uhhhh… so the zip started working for no reazon.
Thank you for your time.

I think this was the fix.

1 Like