Problem with calling app

Hi all,

I have to create a calling app, the app is derived from the minimal sample and doesn’t use the external calling window. When the app starts it creates a JavaScript timer accessing an external web server to fetch events. This works until the user selects another contact or something else on the left side in the menu. This selection reloads the whole page and the calling app won’t be automatically loaded…

Somebody an idea?

Kr

CHW

Hi @CWallukat,
Thank you for posting to the Hubspot Community!
I understand that your custom calling app, which uses a JavaScript timer to fetch external events, stops working when HubSpot reloads the page after a user navigates, causing the app not to reload automatically.
I’d like to tag in some of our Top Contributors to see if they have any ideas on this - Hi @ nickdeckerdevs1@ChrisoKlepke and @KlemenHrovat Do any of you all have any suggestions for @CWallukat?
Thank you!
Cassie, Community Manager

Unfortunately, I don’t have a good idea how to fix that

Hi @CWallukat , yep, what you’re seeing is “normal” for the anchored calling remote: when a user navigates to another record from the left sidebar, HubSpot can re-render or fully reload parts of the CRM UI, which tears down your iframe and kills any in-memory timers. So relying on a long-running JS setInterval inside the remote is always going to be fragile.

The pattern HubSpot recommends is: keep the actual calling logic in the detached calling window (iframeLocation = window) so the call session survives navigation, and use the anchored remote (iframeLocation = remote) only to reflect state and send user actions to the window (start/stop, mute, etc.). HubSpot calls this out explicitly: the window should “handle the main calling logic” so users can navigate freely without disconnecting or losing state.

(CRM API | Receive calls in HubSpot when using calling apps - HubSpot docs )

If you truly don’t want to use the external window, then the only safe approach is to treat every iframe load as a fresh boot: reinitialize in the Calling Extensions SDK “ready” flow, and persist any call/session state on your backend (or another persistent store), then re-hydrate on load. The SDK is meant for that handshake and state exchange with HubSpot. (Calling extensions SDK - HubSpot docs )

Quick clarifier: are you currently setting iframeLocation to remote only, or do you open a calling window at all during an active call?

Hello @CWallukat,

Thanks again for posting in the Community!
Big thanks to @RubenBurdin for sharing those insights! This is exactly what makes this community so great. If you have more questions or comments, feel free to keep the conversation going! Hope you found this helpful so far!
Sam, Community Manager