ZAFClient.init() throws timeout exception | Community
Skip to main content

ZAFClient.init() throws timeout exception

  • September 12, 2022
  • 2 replies
  • 0 views

Tomas14

Hi, I have this app that after processing the OAuth callback it redirects to itself in the Zendesk zendesk iframe.

The problem that I am seeing is that the ZAFClient.init() throws a an exception due to timeout which I am assuming is due to app.registered event not being triggered.

My question is, is there a way to reload the app to better handle this cases? And when does the app.registered event gets published?

2 replies

  • September 12, 2022

I've experienced this before and was able to work around it by using
window.location.reload()
Hope that helps you too!


Tomas14
  • Author
  • September 14, 2022

Thanks Cheryl for your suggestion, I tried it but didn't work. I found the actual problem:

So my app was trying to redirect to itself with a wrong app_guid value and that is why ZAFClient never got the app.registered event.

Url in question: https://my-app-url?app_guid=Some(app_guid)&origin=https%3A%2F%2Fmy-instance.zendesk.com

Fixing the app_guid parameter fixed my issue