title: Promises not executing correctly
body: <p>Below is the typescript code that runs on application load. The idea is to execute getSheetList method and then run getBookmarkList and then populate the qlikAppList array.</p>
  
  <p>If the qlikAppList array is empty at the end of it, the application is to return an error message "No sheets exist in any of the apps in stream."</p>
  
  <p>On my local machine this works correctly most of the time, every once in a while it throws that error. This code was deployed to a server and the error message is thrown every time. </p>
  
  <p>What is wrong here?</p>
  
  <pre><code>app.runGetAppList().then((appList: IMasterItem[]) =&gt; {
              let promiseArray: Promise&lt;void&gt;[] = [];
              _.each(appList, (appItem) =&gt; {
                  let appInfo = { //few fields };
                  promiseArray.push(qlik.getSheetList(appItem.id).then((sheetsInfo) =&gt; {
                      if (sheetsInfo.length &gt; 0) {//populate appInfo}
                  }).then(() =&gt; {
                      bookmarkSvc.getBookmarkList(appItem.id).then((bookmarksInfo) =&gt; {
                          if (bookmarksInfo.length &gt; 0) {//populate appInfo}
                          this.qlikAppList.push(appInfo);
                      });
                  }));
              });
              Promise.all(promiseArray).then(() =&gt; {
                  this.initializeScreen(this.qlikAppList.length &gt; 0 ? undefined : 
  "No sheets exist in any of the apps in stream.");                    
              });
  
  public getSheetList(appId): Promise&lt;QlikSheetInfo[]&gt; {
      return new Promise((resolve, reject) =&gt; {
          currentApp.qlikApp.getList("sheet", (sheetList) =&gt; {
              resolve(sheetList.qAppObjectList.qItems.map((qItem) =&gt; {
                  return {
                      //some fields
                  };
              }));
          });
      });
  }
  
  public getBookmarkList(appId): Promise&lt;QlikBookmarkInfo[]&gt; {
      return new Promise((resolve, reject) =&gt; {
          currentApp.qlikApp.getList("BookmarkList", (bookmarkList) =&gt; {
              resolve(bookmarkList.qBookmarkList.qItems.map((qItem) =&gt; {
                  return {
                      //some fields
                  };
              }));
          });
      });
  }
  </code></pre>
  
  <p>Thanks!</p>