Calling SDK events ignored by hubspot

Hi all,

I recently stumbled upon this weird behavior with the Calling SDK beta. When testing my calling app as a widget in Hubspot, everything works fine.

However, when I open a second browser tab to Hubspot and open the widget in the tab, SDK events sent to Hubspot are suddenly ignored and do not execute.

This is what’s logged in the browser console after trying to navigate to a record:

JeroenCloudCTI_0-1745308562931.png

Closing and opening the widget fixes the issue until I open a new tab and a new widget, though that trick only works for the first browser tab.

What could cause this?

Hi @JeroenCloudCTI ,

When opening multiple tabs, each tab runs its own instance. However, HubSpot purposefully restricts communication between tabs to avoid duplicated behaviour accross sessions of which SDK events are ignored as HubSpot considers them as 3rd party or reduntant.

The scenario where you close the second tab and return to the first one, you are now back to the primary instance and Hubspot recognizes and permits to handle event.

I would recommend you to avoid multi tab interaction in these cases and reload your widget iframe to ensure reintialization

If this helps, feel free to mark it as the solution :check_mark: and give it an upvote :+1: !

Hey @Jigar_Thakker, thank you for your explanation.

That is..inconvenient :sweat_smile: Though I’m not sure I fully understand.

You mentioned communication between tabs and multi-tab interaction is ignored, but it also happens for user-triggered api calls, like a button that fires the ‘navigate to record’ event. Surely it’s not intended behavior to ignore those too?

Furthermore, would you know of any way to identify which tab is the primary instance?

Hi @JeroenCloudCTI ,

Let me clarify both your points.

1) Yes, even user triggered API calls are purposefully ignored if they come from a non primary tab as HubSpot’s calling SDK is built to ensure session consistency and prevent any duplicate navigation events or other that could happen if multiple sessions happen simultaneously though it’s a user triggered API call, as you mentioned above

2) Currently there’s no particularly a official method to find which tab is primary instance, its handled manually by the dev using browser storage techniques to track the first and treat it as primary.

If this helps, feel free to mark it as the solution

:check_mark:

and give it an upvote

:+1:

!