App goes unresponsive after awhile



After some lengthy time running continuously, our app (Ionic v1 on an Android tablet) goes unresponsive to human touch. Backgrounds threads are still alive. The WebSocket connection is still there and sound can play. However, the screen buttons (or anything else on the screen) do not respond to human touch anymore; the screen is not frozen per se, in that underlying threads can cause the app to change in appearance.

It is unclear what the root cause is (perhaps a memory leak?), however I am investigating ways to detect when the app does transition into a state of unresponsiveness. Is there any way of programatically testing for unresponsiveness, e.g. whether a user tapping the screen will lead to a touch event being fired in Ionic?

More generally, how would I debug the root cause? I use Atatus as a JS error tracker however nothing suspicious appears. Are there other error trackers that could shed more light?

We have the ability to remotely restart these tablets when problems do occur and can do so in an automated way.