6
Views
2
Comments
Invalid call of the TriggerOnLoadComplete client action
Application Type
Mobile, Reactive

Hello,

I am getting a lot of error in Service Center:

Invalid call of the 'TriggerOnLoadComplete' client action of the 'MainFlow.TimeEntryDetail' since the latter is not currently active. This is likely due to a platform's client action being used as an event handler or in a setTimeout function. Consider removing this call by using the 'On Destroy' event of the screen/block or moving your logic to a global client action.

The scenario that I have established is that, if I click on the menu multiple times then it throws this error. 

In my destination screen, I have a Layout web block, which has another web block named ApplicationUpgrade. Inside ApplicationUpgrade web block we have an event OnLoadComplete which will sync the database inside the setTimeout JS function. 

To resolve the issue, I added OnDestry where I set IsDestroyed (in the web blocks and screen), and if it is IsDestroyed is set to true inside the OnLoadComplete execution moves to end (Javascript, where setTimeout is used, is not executed). But the issue still persists.

Thank you

Regards, Wasif

mvp_badge
MVP
Rank: #17

Hi Wasif,

This message " ....since the latter is not currently active. This is likely due to a platform's client action being used as an event handler or in a setTimeout function. Consider removing this call by using the 'On Destroy' event of the screen/block or moving your logic to a global client action. "

Is logged most-likely because you navigate away from a screen, and the context for the function to run is lost.

I believe you can ignore this if you see your application is working according expectations

Regards,

Daniel 

Rank: #1825

Hello Daniel,

Yes, the application is working fine.

But, we are getting a lot of such exceptions so we want to handle them and minimize the noise in our logs.

Thank you

Regards, Wasif