cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Walkthrough Wednesdays
256
Views
10
Helpful
5
Replies
A_
Beginner
Beginner

handleNewDialog handler sometimes too slow?

Hello,

 

sometimes the handleNewDialog handler is not triggered. I tested it with the clientLogs.log() function. So the handler doesn't do much except output something in the console. But there are calls, where it's not triggered.

I noticed when this issue happens that in Cisco Finesse the field where the call variables would be visible are not visible. So, Finesse seems not to trigger the event? But the network latency is good (50ms). What could be the reason for this issue.

 

I thought about to use the handleUserChange handle because this will be triggered. I would ask for something like the user state... but why I must use this work around? Why handleNewDialog is not reliable? Any ideas? The code is basically like in the sample gadget for ExternalRestApi.

 

Thanks!

 

Best regards

1 ACCEPTED SOLUTION

Accepted Solutions
A_
Beginner
Beginner

I wanted to give a status. It seems that the new JavaScript throttling in Google Chrome is the issue:

 

https://www.chromestatus.com/feature/4718288976216064

 

Blog post:

 

https://developer.chrome.com/blog/timer-throttling-in-chrome-88/

 

If I deactivate it via chrome flags then it works without issues.

View solution in original post

5 REPLIES 5
dekwan
Cisco Employee

Hi,

 

I haven't seen the situation where the handleNewDialog is too slow or not triggered. The handleUserChange callback would only be triggered for any updates to the dialog after the initial event (which would go to handleNewDialog). Are you sure that you do not have code that is causing an error and causing the JS file to exit? The Finesse out of the box desktop uses the same handleNewDialog so if you see the call pop up on the agent desktop, then it is being triggered for the call control gadget.

 

I would suggest using the browser developer tools and put breakpoints to see what the issue is.

 

Thanx,

Denise

I tested this already and cannot see any error message in the console. But thanks for the info with handleNewDialog. So it's odd why the Gadget sometimes doesnt' go there. I will do more tests. Maybe it's something about the tab management of Google Chrome (inactive tabs for longer time reacting slowly, because it doesn't need ressources, so don't give him much of cpu time)? I'm clueless right now and will test it with different browsers and scenarios (like out of ram or Finesse tab is not loaded for a longer period of time).

The thing is, it's hard to reproduce. It doesn't happen every time and I managed to reproduce it only once and in the Cisco Finesse Desktop Logs there was no hint about the issue (just no output for handleNewDialog).

 

I will post it here if there are any new findings.

 

Thank you!

dekwan
Cisco Employee

Hmmm. Not being able to easily reproduce is going to make it hard to debug. The only other suggestion I can think of is to make very vanilla gadget that just has the minimum code to use the handleNewDialog (and maybe just spit out some text on the gadget if it triggers) and put it in the same layout as the one you are trying to debug. Then you can see if it is specific to your gadget code or an overall container/desktop issue.

 

When the handleNewDialog isn't triggered, I'm assuming that you see the actual dialog event being logged in the console. It seems like you have already done a lot of debugging into this.

 

Thanx,

Denise

Denise

A_
Beginner
Beginner

I wanted to give a status. It seems that the new JavaScript throttling in Google Chrome is the issue:

 

https://www.chromestatus.com/feature/4718288976216064

 

Blog post:

 

https://developer.chrome.com/blog/timer-throttling-in-chrome-88/

 

If I deactivate it via chrome flags then it works without issues.

View solution in original post

dekwan
Cisco Employee

Thank you for the update on your issue. It will probably help others who run into the same issue. I wasn't aware that there was a new JavaScript throttling in Chrome so thats good to know.

 

Thanx,

Denise

Content for Community-Ad