[SOLVED] Bitmoji Plaza not loading model in Snapchat after build

Hi Playcanvas !

I’m currently about to release a game for Snapchat (mini) and used the ‘Bitmoji Plaza’ as template for the bitmoji integration.
Everything works well in the editor as well as in Snapchat when using real-time testing but once I build and push the game the following happens:

In the network tab it appears to get a status 0 but still retrieves the gltf base64.
Then I’m able to log the response url .
The virtual console then logs a network error.
This is using an unmodified fork of Bitmoji Plaza

image

To reproduice:

  1. Build ‘Bitmoji Plaza’ from Playcanvas.
  2. Upload to a Snap Dev project.
  3. Create a release with the build.
  4. Test on Snapchat.

Any idea on what is the problem or what I could be doing wrong?
Thanks in advance and don’t hesitate to ask more precisions. :pray:

Have a great day,

Issaya.

Have you added the CSP rules using the tool mentioned here? https://docs.snap.com/minis/playcanvas/quick-start#create-a-production-release

Oops. Deadlink to the troubleshooting page. Here you go: https://docs.snap.com/minis/troubleshooting/#add-csp-rules-to-my-playcanvas-project

Hello @yaustar, thanks a lot for the answer it was indeed the CSP rules in cause.
I think I set it up wrong while using your tool and didn’t add the correct addresses

"connect-src": [
            "'self'",
            "blob:",
            "data:",
            "https://www.google-analytics.com",
            "https://snapchat.com",
            "https://*.snapchat.com",
            "wss://*.games.snapchat.com",
            "https://*.games.snapchat.com"
        ]

Thank you very much and keep up the awesome work!

Issaya.

1 Like