# KnackInitAsync issue causes app to start twice

**URL:** <https://forums.knack.com/t/knackinitasync-issue-causes-app-to-start-twice/11525>\
**Category:** Get Answers\
**Created:** [November 10, 2021, 1:07pm UTC](https://forums.knack.com/t/knackinitasync-issue-causes-app-to-start-twice/11525 "2021-11-10T13:07:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NormandDefayette\_CortexRD](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/normanddefayette_cortexrd/32/855_2.png) [@NormandDefayette\_CortexRD](https://forums.knack.com/u/NormandDefayette_CortexRD)\
**Post date:** [November 10, 2021, 1:07pm UTC](https://forums.knack.com/t/knackinitasync-issue-causes-app-to-start-twice/11525/1 "2021-11-10T13:07:04Z")

</div>

Hi to all Javascript coders out there,

Does anybody have a new problem with the KnackInitAsync function? I noticed that since last week (Nov 1st), my app is now being executed twice. So I get doubled events for all “on render scene” and views, etc.

You can see it using this simple code:

```auto
console.log('000'); //Shown once

KnackInitAsync = function ($, callback) {
    window.$ = $;
    window.LazyLoad = LazyLoad;

    console.log('111'); //Shown twice

    LazyLoad.js([''/*whatever file you use, even empty does the same*/], () => {
        console.log('222'); //Shown twice
        callback();
    })
};

```

I found this workaround, but it’s not clean:

```auto
var running = false;

KnackInitAsync = function ($, callback) {
    if (running)
        return;
    else
        running = true;

    window.$ = $;
    window.LazyLoad = LazyLoad;

    LazyLoad.js([''/*whatever file you use, even empty does the same*/], () => {
        console.log('111'); //Now shown once
        callback();
    })
};

```

Normand D.
