Client Action Error in Mobie

Hi Experts,

I was making use of a mobile application. I was getting this error often

Invalid call of the 'Scanner' client action of the 'Discount' 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.

Please help me sorting this error out.