Flutter Android ANR reported in Google Play Console – main thread shows android.os.MessageQueue.nativePollOnce

Đang mở
#7,930 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
android, flutter
Lĩnh vực
mobile, performance

Hướng nghiên cứu

Bắt đầu với báo cáo ANR Google Play Console được cung cấp và các stack trace Android main-thread cùng native; không có tệp repository, test hoặc thành phần Firebase nào được nêu tên. Xác định xem báo cáo có thể được tái hiện hoặc quy cho SDK này hay không, sau đó ghi lại nguyên nhân đã được xác nhận và thay đổi repository hoặc phần giải thích cần thiết để xử lý vấn đề.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

api: core

We are observing ANR reports in production for our Flutter Android application distributed via the Google Play Store.

The ANR stacktrace captured in Play Console shows the main thread waiting in:

   at android.os.MessageQueue.nativePollOnce(Native method)
   at android.os.MessageQueue.next(MessageQueue.java:339)
   at android.os.Looper.loopOnce(Looper.java:176)
   at android.os.Looper.loop(Looper.java:324)
   at android.app.ActivityThread.main(ActivityThread.java:8547)
   at java.lang.reflect.Method.invoke(Native method)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1061)

The native portion includes:

Thread-3 (native):tid=12 systid=24801
#00 pc 0x4f85c libc.so (syscall + 28) (BuildId: 6df9129278d4aa93fd96a5fdd121f30b)
#01 pc 0x54430 libc.so (__futex_wait_ex + 144) (BuildId: 6df9129278d4aa93fd96a5fdd121f30b)
#02 pc 0xc0e08 libc.so (pthread_cond_wait + 72) (BuildId: 6df9129278d4aa93fd96a5fdd121f30b)
#03 pc 0x1bd28 split_config.arm64_v8a.apk + 80625664
#04 pc 0x52fcc split_config.arm64_v8a.apk + 80625664

This indicates that the main thread appears to be idle and waiting for messages.

However, the ANR is categorized as User-perceived ANR in Google Play Console.

Production Impact
From Play Console (last 7 days):
24,091 ANR events
12,816 affected users

Ngôn ngữ chính
Java
Star
2.6k
Fork
733
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
72

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của firebase/firebase-android-sdk

Tất cả issue của firebase/firebase-android-sdk

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.