- ANR: Input dispatching timed out from production app #70028
- Comments
- nicknma commented Nov 7, 2020 •
- iapicca commented Nov 8, 2020 •
- nicknma commented Nov 8, 2020 •
- iapicca commented Nov 9, 2020 •
- darshankawar commented Nov 9, 2020
- nicknma commented Nov 9, 2020
- nicknma commented Nov 11, 2020 •
- darshankawar commented Nov 12, 2020
- nicknma commented Nov 13, 2020
- pizzaldi commented Dec 7, 2020
- pizzaldi commented Dec 8, 2020
- ominiverdi commented Dec 26, 2020
- shaz-tech commented Jan 28, 2021 •
- The-Redhat commented Mar 5, 2021
- yuchuan08 commented Mar 25, 2021 •
- nicknma commented Mar 25, 2021
- yuchuan08 commented Mar 26, 2021
- pizzaldi commented Mar 26, 2021
- ubitechdevelopers commented Jun 24, 2021 •
- Doppelklick commented Oct 17, 2021
ANR: Input dispatching timed out from production app #70028
Comments
nicknma commented Nov 7, 2020 •
I keep getting this ANR on my Android app.
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: 60. Wait queue head age: 20510.8ms.)
The text was updated successfully, but these errors were encountered:
iapicca commented Nov 8, 2020 •
@nicknma
can you provide your flutter doctor -v ,
your pubspec.yaml
and your flutter run -v (or flutter run —release -v )
if you are experiencing this issue in production the list of affected devices would be useful
nicknma commented Nov 8, 2020 •
Flutter doctor
iapicca commented Nov 9, 2020 •
@nicknma
[ +127 ms] No supported devices connected.
your app won’t run without a device attached
it’s hard to tell if the issue depends from flutter since there are 3rd party plugins and packages
I’d bet on wakelock since it uses native components
(as you can see from the java errors in your logs) and you are using an obsolete version.
regardless the validity of this issue I’d definitely update all the dependencies
especially the aforementioned
darshankawar commented Nov 9, 2020
@nicknma
As @iapicca mentioned, please try by removing the relevant 3rd party plugin code and see if you still encounter same error. If so, provide a minimal complete reproducible code sample that we can copy paste and run in IDE that will possibly show the error.
Thanks.
nicknma commented Nov 9, 2020
That’s the problem, I am not able to reproduce this problem locally, I only see the crashes on the Console in prod. I will try what you suggested. Thank you.
nicknma commented Nov 11, 2020 •
I removed the wakelock package and implemented my own MethodChannel to native code to keep the device awake. I am still getting this ANR which I can not reproduce locally.
This is the Kotlin method that ultimately gets called from Flutter
darshankawar commented Nov 12, 2020
@nicknma
Can you provide project repo link that we can clone and run to see if we can replicate it ?
Thanks.
nicknma commented Nov 13, 2020
Unfortunately I can’t. First it is on a private git server and second a lot of the text content is copy righted so I can’t intentionally make it public by sharing it. I might be able to strip out all the copy righted info and share with you but I can’t just share it publicly. Also, I found this, not sure it it helps, but it is related to the same issue. Looks like the problem is caused by NDK event queuing which I am assuming is used in the Flutter engine. http://ps3computing.blogspot.com/2012/12/anr-application-not-responding.html
pizzaldi commented Dec 7, 2020
May I know on what device did you get this issue? I’m having similar error, but it seems like it’s only happening on phones that are recently released (from August 2020).
pizzaldi commented Dec 8, 2020
In my app it happens mostly on Oppo A93, Oppo A53, and Realme 7i, which were released not earlier than August 2020.
Based on the crash log in Google Play Console, the issue started appearing early November, but at that time the last APK I uploaded to Play Store was early October. That led me to believe that there’s an issue between Flutter and the newer phone models and there’s no fix yet. I tried downgrading Flutter version to 1.17.5, but it doesn’t fix it.
ominiverdi commented Dec 26, 2020
Same problems,
only 10 days from the publication.
Devices: Nokia 5, Huawei 华为畅享7S, Sony Xperia XA2, Huawei HUAWEI P20 Lite, Samsung Galaxy S20 Ultra 5G
I use the signed bundle also.
The frequency seems very low. Around 0.1% of daily sessions.
shaz-tech commented Jan 28, 2021 •
ANR percentage increased drastically after publishing the Flutter-based Android application. My application published in native from long back and there was no issue like ANR. Please resolve this ASAP. It’s Critical in production.
The-Redhat commented Mar 5, 2021
are there any news regarding this issue?
yuchuan08 commented Mar 25, 2021 •
@nicknma @darshankawar I have the same problem,can you help me?
This is log:
03-24 11:45:56.097 2479 2510 E ActivityManager: ANR in com.zxs.app (com.zxs.app/com.zxs.flutter_app.MainActivity)
03-24 11:45:56.097 2479 2510 E ActivityManager: PID: 4960
03-24 11:45:56.097 2479 2510 E ActivityManager: Reason: 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: 12. Wait queue head age: 5662.1ms.)
03-24 11:45:56.097 2479 2510 E ActivityManager: Load: 10.83 / 7.19 / 3.16
03-24 11:45:56.097 2479 2510 E ActivityManager: CPU usage from 0ms to 13022ms later (2021-03-24 11:45:43.077 to 2021-03-24 11:45:56.086):
03-24 11:45:56.097 2479 2510 E ActivityManager: 82% 2000/tvos: 78% user + 3.9% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 19% 1//init: 11% user + 8.6% kernel / faults: 90 minor
03-24 11:45:56.097 2479 2510 E ActivityManager: 6.4% 2479/system_server: 3.9% user + 2.4% kernel / faults: 2747 minor 55 major
03-24 11:45:56.097 2479 2510 E ActivityManager: 3.6% 3904/com.ecloud.eairplay: 2.9% user + 0.7% kernel / faults: 4030 minor 2 major
03-24 11:45:56.097 2479 2510 E ActivityManager: 1.6% 2158/mediaserver: 0.3% user + 1.3% kernel / faults: 44 minor
03-24 11:45:56.097 2479 2510 E ActivityManager: 1.6% 3300/com.sohu.inputmethod.sogouoem: 0.9% user + 0.6% kernel / faults: 1258 minor 1 major
03-24 11:45:56.097 2479 2510 E ActivityManager: 1.5% 2783/com.mstar.tv.service: 1% user + 0.4% kernel / faults: 1225 minor 1 major
03-24 11:45:56.097 2479 2510 E ActivityManager: 1.4% 4960/com.zxs.app: 1% user + 0.4% kernel / faults: 1360 minor 6 major
03-24 11:45:56.097 2479 2510 E ActivityManager: 1.3% 1177/sugov:3: 0% user + 1.3% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 1.2% 1176/sugov:2: 0% user + 1.2% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 1% 430/kworker/u8:4: 0% user + 1% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 1% 1997/irq/42-scaler: 0% user + 1% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.9% 29/kworker/u8:1: 0% user + 0.9% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.9% 33/kworker/u8:2: 0% user + 0.9% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.9% 2765/com.android.systemui: 0.7% user + 0.1% kernel / faults: 884 minor 5 major
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.9% 3341/com.ecloud.eshare.server: 0.7% user + 0.1% kernel / faults: 1030 minor 5 major
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.9% 3348/com.dazzle.ui: 0.6% user + 0.2% kernel / faults: 1387 minor 2 major
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.7% 3179/com.mstar.android.providers.tv: 0.5% user + 0.2% kernel / faults: 141 minor
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.6% 2042/kworker/2:3: 0% user + 0.6% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.6% 2140/surfaceflinger: 0.6% user + 0% kernel / faults: 45 minor
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.6% 4901/com.boe.boecms: 0.4% user + 0.2% kernel / faults: 172 minor
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.5% 1172/T_sensor_Check: 0% user + 0.5% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.3% 1982/logd: 0.1% user + 0.2% kernel / faults: 6 minor
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.3% 2161/media.codec: 0.2% user + 0.1% kernel / faults: 1075 minor 4 major
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.3% 1092/mmcqd/0: 0% user + 0.3% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.3% 1174/sugov:0: 0% user + 0.3% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.2% 2156/media.extractor: 0% user + 0.1% kernel / faults: 1068 minor 2 major
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.1% 749/kswapd0: 0% user + 0.1% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.1% 1175/sugov:1: 0% user + 0.1% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0% 2168/tombstoned: 0% user + 0% kernel / faults: 116 minor
03-24 11:45:56.097 2479 2510 E ActivityManager: 0.1% 2507/RTW_CMD_THREAD: 0% user + 0.1% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0% 7/rcu_preempt: 0% user + 0% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0% 14/migration/1: 0% user + 0% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0% 1173/Boost_Duration_: 0% user + 0% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0% 2120/netd: 0% user + 0% kernel / faults: 18 minor
03-24 11:45:56.097 2479 2510 E ActivityManager: 0% 2139/lmkd: 0% user + 0% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0% 2147/virtualkeypad: 0% user + 0% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0% 2155/mediadrmserver: 0% user + 0% kernel / faults: 111 minor
03-24 11:45:56.097 2479 2510 E ActivityManager: 0% 2668/main_thread: 0% user + 0% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0% 3712/com.android.mcast: 0% user + 0% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 0% 5053/com.boe.boecms:remote: 0% user + 0% kernel / faults: 2 minor
03-24 11:45:56.097 2479 2510 E ActivityManager: 36% TOTAL: 28% user + 7.9% kernel + 0.2% iowait + 0.1% softirq
03-24 11:45:56.097 2479 2510 E ActivityManager: CPU usage from 12492ms to 13005ms later (2021-03-24 11:45:55.557 to 2021-03-24 11:45:56.069):
03-24 11:45:56.097 2479 2510 E ActivityManager: 85% 2000/tvos: 81% user + 3.8% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 83% 2524/tvos: 79% user + 3.8% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 1.9% 2352/IRQThread_42: 0% user + 1.9% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 3.8% 2479/system_server: 1.9% user + 1.9% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 1.9% 2510/ActivityManager: 1.9% user + 0% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 1.4% 430/kworker/u8:4: 0% user + 1.4% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 1.5% 1176/sugov:2: 0% user + 1.5% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 1.5% 1177/sugov:3: 0% user + 1.5% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 1.5% 2140/surfaceflinger: 1.5% user + 0% kernel
03-24 11:45:56.097 2479 2510 E ActivityManager: 1.6% 2158/mediaserver: 0% user + 1.6% kernel / faults: 10 minor
03-24 11:45:56.097 2479 2510 E ActivityManager: 22% TOTAL: 19% user + 3% kernel
03-24 11:45:56.104 2479 2511 W ActivityManager: Force finishing activity com.zxs.app/com.zxs.flutter_app.MainActivity
03-24 11:45:56.114 2479 2511 I ActivityManager: Killing 4960:com.zxs.app/u0a52 (adj 0): user request after error
03-24 11:45:56.123 2479 2510 I ActivityManager: App already killed by AM skipping ANR: ProcessRecord
03-24 11:45:56.288 3341 3341 I chatty : uid=1000(system) com.ecloud.eshare.server expire 70 lines
03-24 11:45:56.461 2479 5561 I WindowManager: WIN DEATH: Window
03-24 11:45:56.461 2479 5561 I chatty : uid=1000(system) Binder:2479_E expire 1 line
03-24 11:45:56.463 2140 2492 E SurfaceFlinger: removeLayer called with a layer whose parent has been removed
03-24 11:45:56.464 2140 2492 E SurfaceFlinger: removeLayer called with a layer whose parent has been removed
[✓] Flutter (Channel stable, 1.22.6, on macOS 11.1 20C69 darwin-x64, locale zh-Hans-CN)
nicknma commented Mar 25, 2021
Have not heard anything from the flutter team about this. I am still getting this ANR in production as well.
yuchuan08 commented Mar 26, 2021
Have not heard anything from the flutter team about this. I am still getting this ANR in production as well.
I use PageView ,and TV app。I don’t know how to solve this problem
pizzaldi commented Mar 26, 2021
I’ve finally found the root cause of my issue. So my app has this feature to set multiple alarms, but the data for the alarm times are sent from an API (not set by the user). After receiving the data from the API, the app will loop through all of the data to set the alarm by calling a method channel function.
The problem is, apparently the business team from my company sent a lot of data that the app breaks when trying to set the alarms. It has to loop through about 8k+ of all-time data and has to turn on about 160-ish alarm at the same time. I tried turning off the alarm setting function and now it’s gone back to normal. The graph on my Play Console’s ANR page has also decreased significantly.
I don’t know if this is the same for all of you, but I hope it helps a little.
ubitechdevelopers commented Jun 24, 2021 •
Camera plugin is causing the ANR as I can see this on my play console
Input dispatching timed out (e241af4 org.ubitech.attendance/org.ubitech.attendance.MainActivityWithoutBGService (server) is not responding. Waited 10000ms for MotionEvent)
at java.lang.Object.wait (Native method)
at java.lang.Object.wait (Object.java:442)
at java.lang.Thread.join (Thread.java:1438)
at java.lang.Thread.join (Thread.java:1519)
at io.flutter.plugins.camera.Camera.stopBackgroundThread (Camera.java)
at io.flutter.plugins.camera.Camera.close (Camera.java)
at io.flutter.plugins.camera.Camera.dispose (Camera.java)
at io.flutter.plugins.camera.MethodCallHandlerImpl.onMethodCall (MethodCallHandlerImpl.java)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage (MethodChannel.java)
at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart (DartMessenger.java)
at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage (FlutterJNI.java)
at android.os.MessageQueue.nativePollOnce (Native method)
at android.os.MessageQueue.next (MessageQueue.java:335)
at android.os.Looper.loop (Looper.java:206)
at android.app.ActivityThread.main (ActivityThread.java:8512)
at java.lang.reflect.Method.invoke (Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1139)
Doppelklick commented Oct 17, 2021
Camera plugin is causing the ANR as I can see this on my play console
Input dispatching timed out (e241af4 org.ubitech.attendance/org.ubitech.attendance.MainActivityWithoutBGService (server) is not responding. Waited 10000ms for MotionEvent)
same problem here
@ubitechdevelopers did you solve it?
Источник