Exception in mobile application

Hello ,

We are developing a mobile application for a client and we are facing a lot of exception in the error log of service centre randomly in any page 


The exception is below :

Invalid call of the 'GetLocalAction' client action of the 'ADashboard' 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 exception is not  impacting the running app right now , but this comes in large number and could impact for some users. Please let me know what is the reason for the error and how we can rectify it.




We are developing application in 10.0.823 version of OS.



Thanks!

Arpita Pancholi

Hi Arpita,

Were you able to fix this? The message seems to be quite clear, but without the code it's difficult to advice. Do you have a setTimeout or setInterval js function to call your own GetLocalAction?


Cheers,

Tiago.

Hi Arpita,

Please validate this link, as here you will find the answer to your problem:

Cheers,

Nuno Verdasca

Tiago Gafeira wrote:

Hi Arpita,

Were you able to fix this? The message seems to be quite clear, but without the code it's difficult to advice. Do you have a setTimeout or setInterval js function to call your own GetLocalAction?


Cheers,

Tiago.

No , it is calling at OnAfterFetch  of a local aggregate. Before the aggregate onAfterFetch, this client action is also called from OnReady function.  Is this the problem ? if so, we cannot remove this function from OnReady, if you can provide any solution for that. it will be helpful.


Thanks!

Arpita


Hi Arpita,

The problem may be related to calling the action inside the OnReady if you access the data, since it may not be available yet.

"When the On Initialize event handler ends, the Aggregates and Data Actions of the default screen concurrently start to fetch data (exemplified by the GetContacts and GetProfileImages of the image above), the DOM of the screen loads and the Ready and Render event handlers run. The difference between these two events is that the Ready event only happens when opening the screen while the Render event also happens every time the data of the screen (such as input parameters, variables, aggregates and data actions, or validation messages) is modified. You can use both event handlers to act on the loaded DOM. Avoid accessing the data of the screen since this data may not be fetched yet." in Screen and Block Lifecycle Events.

If that's the case, you may use the .IsDataFetchedproperty of the Aggregate to execute a check.


Cheers,

Tiago.