FB Instant 99% Loaded (SOLVED)


I’m trying to get the Defold side scroller tutorial running on my phone via FB Instant and am running into an issue where the game gets stuck loading at 99% (I’ve also run the game in the browser via FB’s embedded player and have encountered the same issue).

I’ve added the FB Instant Games extension as a dependency in game.project, and in my index.html I have the following:

<script src="https://connect.facebook.net/en_US/fbinstant.6.2.js"></script>
<div id="fb-root" class="fb-root"></div>

<div id="app-container" class="canvas-app-container">
	<canvas id="canvas" class="canvas-app-canvas" tabindex="1" width="1280" height="720"></canvas>

<button id="fullscreen" class="button">Fullscreen</button>

<!-- -->

<script type='text/javascript' src="dmloader.js"></script>
<!-- -->

<script type='text/javascript'>
    // Set up a progress listener and feed progress to FBInstant
    Progress.updateProgress = function (percentage, text) {

    // Do early initialization of FBInstant
    // This is required to be able to properly update the loading
    // progress above.
    FBInstant.initializeAsync().then(function() {
        // This will be checked by the FBInstant Defold extension
        Module._fbinstant_inited = true;

Any idea what could be causing this issue?


Are you also calling fbinstant.start_game() to indicate that the game is ready? See example here: https://github.com/defold/extension-fbinstant/blob/master/tictactoe/tictactoe.script#L41-L63


That was the issue, thank you so much! :slightly_smiling_face: