Android-runtime: UI freezes with tns-android 6.1.0 (Android only)

Created on 13 Sep 2019  路  16Comments  路  Source: NativeScript/android-runtime

tns-core-modules: 6.1.1
tns-android: 6.1.0
tns cli: 6.0.3

Android UI is freezing (It feels like a continuous lag)

I had to downgrade to tns-android: 6.0.2 for a temporary workaround.

ready for release

Most helpful comment

@bhcuong2008 can you try using "markingMode": "none".

All 16 comments

Could you share a sample application having this problem?

I don't have a sample application I can share, but my project is in the same place. We are up to date on all other dependencies, but switching tns-android from 6.0.2 to 6.1.0 makes the whole application slower (to the point of unusable). Tap events seem extremely delayed to get responded to, so all navigation is very slow. I'd be willing to share an APK of my app on 6.1.0 via private message if that would be helpful, but I understand if it wouldn't be.

I was trying this on emulator, but a coworker experienced it testing on a real device as well. I also attempted switching my compile SDK to 29, it made no difference. My application is an angular application.

@james-criscuolo are you in the public NativeScript Slack channel? You can send me your apk there to check it out. If you're not a member of the Slack channel, you can send the apk to vladimir.[email protected] or vlado.[email protected] (which is my private mail).

Thanks @vmutafov, I've emailed your progress.com email address with the APK.

@james-criscuolo thanks ;) I'll look into it

I just upgraded all from 6.0.2 to 6.1.1 yesterday and faced the same issue. At 6.0.2, it's very responsive. At 6.1, it's often unresponsive, maybe around 3-5 seconds. I've tested both on emulator and real devices (Android 5.0).

Here is error message after some time unresponsive:

Input dispatching timed out (Waiting to send non-key event because the touched
window has not finished processing certain input events that were delivered to it over 500.0ms ago. Wait queue length: 6. Wait queue head age: 11360.8ms.)

@bhcuong2008 can you try using "markingMode": "none".

@vtrifonov wow, it works smooth now. Thank you very much.

@vtrifonov I had this option and I still have lags (tested on Android 7 & Android 9). Especially while animating some special animation through the setInterval(, 0) function.

@vtrifonov, Awesome it works, thanks.

@sashok1337, If you added the flag recently try with tns debug android --clean

@Stanteq I've added it long time ago. So --clean is useless in my case.

downgrading to android 6.0.2 seems to work for me, using 6.1.1 was the problem, the UI now is fast, with 6.1.1 the UI was laggy even when the view is only a textfield, when you try to input something, each 5 - 6 letters the app maintains unresponsive by 3 - 5 seconds, this must not have being closed

@darkyelox, I believe the problem was introduces with android 6.1.0 (maybe earlier I don't know). 6.1.2 was added about a week ago and marked as resolving the issue. It worked for me. I just did:

tns platform remove android
tns platform add android

im still the same issue here with android runtime 6.2.0.

@alqabali does the issue resolve if you downgrade to 6.0.2? I'm just curious if this is really the same problem or are if you might be experiencing a different issue.

@felixelgato92 yes if o downgrade to 6.0.2 the app works like a charm ! fast and very responsive .

Was this page helpful?
0 / 5 - 0 ratings