# zoomCampaignSdk is not get called. could you check?

**URL:** <https://devforum.zoom.us/t/zoomcampaignsdk-is-not-get-called-could-you-check/115210>\
**Category:** Zoom Virtual Agent\
**Tags:** sdk\
**Created:** [August 7, 2024, 12:54pm UTC](https://devforum.zoom.us/t/zoomcampaignsdk-is-not-get-called-could-you-check/115210 "2024-08-07T12:54:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ichi](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ichi/32/58715_2.png) [@Ichi](https://devforum.zoom.us/u/Ichi)\
**Post date:** [August 7, 2024, 12:54pm UTC](https://devforum.zoom.us/t/zoomcampaignsdk-is-not-get-called-could-you-check/115210/1 "2024-08-07T12:54:02Z")

</div>

We had a block of code to make the bot to be open status, and it has been working so far, however last a few days our error handler indicate zoomCampainSdk is not existing. Could you investigate?

```auto
Error: zoomCampaignSdk not found within the specified timeout.
    at checkzoomCampaignSdk

```

Snippet of the code is here

```auto
self.addEventListener('message', (event) => {
          if (executed)
              return
          const startTime = Date.now();
          const timeout = 10000; // 10 seconds
          function checkzoomCampaignSdk() {
              if (!executed && typeof zoomCampaignSdk !== 'undefined') {
                  try{
                      zoomCampaignSdk.open(); // Execute the action when zoomCampaignSdk exists
                      console.log('zoomCampaignSdk found and action executed.');
                      executed = true; // Mark as executed
                  } catch (exception) {
                      console.error('zoomCampaignSdk not found within the specified timeout.', exception);
                  }
              } else {
                  const currentTime = Date.now();
                  if (currentTime - startTime < timeout) {
                      // Continue checking until timeout
                      setTimeout(checkzoomCampaignSdk, 1000); // Check every second
                  } else {
                      throw new Error('zoomCampaignSdk not found within the specified timeout.');
                  }
              }
          }
          checkzoomCampaignSdk(); // Start checking
      });

```
