Comments (10)
Can you upgrade you firebase plugins versions and try again and see if the issue still remains?
from flutterfire.
Can you upgrade you firebase plugins versions and try again and see if the issue still remains?
@TarekkMA Thanks for your answer.
I need to update the flutter version in order to update the firebase versions, and this requires application-wide editing. For this reason, it doesn't seem possible for me to try this.
However, I shared screenshots showing the anrs received by users and the situations in which these anrs were received. Don't you think these screenshots document that anr occurs when a notification is received?
from flutterfire.
When a notification is sent while the application is in the foreground, it crashes with the android.os.MessageQueue.nativePollOnce (Native method) error.
There is no issue with the first notification; it arrives promptly. However, subsequent notifications experience delays. After a while, all pending notifications arrive simultaneously, leading to a crash of the application.
Also, apart from the problem I mentioned here, there may be another problem on the firebase_messaging side. As I mentioned before, there is a notification activation in all received anr and anr occurs after this notification activity.
from flutterfire.
Can you make a reproduction repo where this issue is happening? just the code that causes this issue to happen.
from flutterfire.
Can you make a reproduction repo where this issue is happening? just the code that causes this issue to happen.
@TarekkMA I cannot catch this problem, I am writing it here as a result of the notifications received by users using the application via Crashlytics.
from flutterfire.
My report is not related firebasse_messaging. Sorry for the confusion. See below.
ryanheise/audio_service#875 (comment)
Same here.
Case1. Only android 14
main (native):tid=1 systid=29182
#00 pc 0x57840 libc.so (syscall + 32) (BuildId: 37f537c2ba9dcbb262a0a68f41a21da4)
#01 pc 0x232858 libart.so (art::ConditionVariable::WaitHoldingLocks + 140) (BuildId: 02bec5940be704b863f6514fc7d81c41)
#02 pc 0x55c044 libart.so (art::JNI<false>::CallObjectMethodV + 1140) (BuildId: 02bec5940be704b863f6514fc7d81c41)
#03 pc 0xe3994 libandroid_runtime.so (_JNIEnv::CallObjectMethod + 124) (BuildId: d29fc9115b65377a1a4cf15b069b9c2a)
#04 pc 0x153f70 libandroid_runtime.so (android::NativeDisplayEventReceiver::dispatchVsync + 68) (BuildId: d29fc9115b65377a1a4cf15b069b9c2a)
#05 pc 0xcba88 libgui.so (android::DisplayEventDispatcher::handleEvent + 280) (BuildId: 37fabcd36f9bbf3a645c2964fe397e4e)
#06 pc 0x18b70 libutils.so (android::Looper::pollInner + 1252) (BuildId: d0c24e3b7b6c7152eb82e77a5d2271e6)
#07 pc 0x18628 libutils.so (android::Looper::pollOnce + 124) (BuildId: d0c24e3b7b6c7152eb82e77a5d2271e6)
#08 pc 0x18f208 libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce + 48) (BuildId: d29fc9115b65377a1a4cf15b069b9c2a)
at android.os.MessageQueue.nativePollOnce(Native method)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loopOnce(Looper.java:187)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8919)
at java.lang.reflect.Method.invoke(Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
Every Crashlytics report comes from Android 14
![image](https://private-user-images.githubusercontent.com/474775/338831790-62f7ef02-d3cb-4cbf-84b6-671e5a659735.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExMjE4NTgsIm5iZiI6MTcyMTEyMTU1OCwicGF0aCI6Ii80NzQ3NzUvMzM4ODMxNzkwLTYyZjdlZjAyLWQzY2ItNGNiZi04NGI2LTY3MWU1YTY1OTczNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxNlQwOTE5MThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hMDIyYWE0MzVhZjFhNGExNzM5ZmNlZjQyMGYyM2RiNjRjODlmMjY1YTIzMDFlMzZhYzU0YjU2YTZkYWVhN2MyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.aqFqxa9ATOKOEAmsHG3xoesZfDb7BGvDyNobxzA0o1Q)
Case2. Android 11 ~ 14
main (native):tid=1 systid=20182
#00 pc 0x4deb0 libc.so (syscall + 32) (BuildId: 81e690796099642123738ebc3a07936c)
#01 pc 0x232858 libart.so (art::ConditionVariable::WaitHoldingLocks + 140) (BuildId: 02bec5940be704b863f6514fc7d81c41)
#02 pc 0x555134 libart.so (art::JNI<false>::FindClass + 1836) (BuildId: 02bec5940be704b863f6514fc7d81c41)
#03 pc 0x1269a8 libandroid_runtime.so (android::NativeDisplayEventReceiver::dispatchVsync + 80) (BuildId: 495478b5d27456788ccd1d734fe53ee9)
#04 pc 0xb8a34 libgui.so (android::DisplayEventDispatcher::handleEvent + 204) (BuildId: 9d052c980f9c2cd86f54f2793428e7db)
#05 pc 0x1716c libutils.so (android::Looper::pollInner + 916) (BuildId: eee35419973f1d9330ba7fca3b3f5bf7)
#06 pc 0x16d6c libutils.so (android::Looper::pollOnce + 116) (BuildId: eee35419973f1d9330ba7fca3b3f5bf7)
#07 pc 0x166288 libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce + 48) (BuildId: 495478b5d27456788ccd1d734fe53ee9)
at android.os.MessageQueue.nativePollOnce(Native method)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loopOnce(Looper.java:186)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8855)
at java.lang.reflect.Method.invoke(Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
case2.txt
case1-only android 14.txt
from flutterfire.
My report is not related firebasse_messaging. Sorry for the confusion. See below.
ryanheise/audio_service#875 (comment)
https://issuetracker.google.com/issues/230950647#comment175
from flutterfire.
@dfdgsdfg - thank you for locating the issue, it appears to be an underlying issue, possibly from firebase-android-sdk or even the android OS itself. Not much we can do about that on FlutterFire.
from flutterfire.
My report is not related firebasse_messaging. Sorry for the confusion. See below.
ryanheise/audio_service#875 (comment)
firebase/firebase-android-sdk#4345 (comment)
ANR (MessageQueue.nativePollOnce). The following are very helpful for solving firebase ANR.
(1) GLSurfaceView will display ANR on Android 11. (I don't understand why this is related to firebase. )
https://issuetracker.google.com/issues/269158607
(2) You need to minimize the cold start time of the application as much as possible.
https://medium.com/bumble-tech/how-we-achieved-a-6x-reduction-of-anrs-part-2-fixing-anrs-24fedf9a973f
(3) My suggestion is not to use Firebase Crashlytics.
The crash analysis of Google Play Console is sufficient for us to use.
In poor network conditions, Crashlytics will block the main thread when the application first starts, increasing the cold start time by 3 seconds(This is to request a token.), and can also cause ANR(MessageQueue.nativePollOnce).
from flutterfire.
@dfdgsdfg - thank you for locating the issue, it appears to be an underlying issue, possibly from firebase-android-sdk or even the android OS itself. Not much we can do about that on FlutterFire.
My report is not related firebasse_messaging. Sorry for the confusion. See below.
ryanheise/audio_service#875 (comment)
from flutterfire.
Related Issues (20)
- [firebase_auth]: Cannot auth twitter from web HOT 8
- [firebase_messaging]: getToken() does not work on Safari, works on Chrome and Firefox. 'Request contains an invalid argument' HOT 13
- Deprecated imperative apply of Flutter's Gradle plugins HOT 4
- [flutterfire]: CDN: trunk URL couldn't be downloaded: HOT 1
- [AUTH]: Inconsistent behavior when switching from emulators to server HOT 2
- [firebase_crashlytics]: flutter macOS does not terminate the app after stop debuging HOT 6
- Found some security issues HOT 3
- [firebase_auth] linkWithCredential() throws email-already-in-use exception in flutter app
- Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ) intialize issue HOT 1
- [firebase_auth] authStateChanges() stream fires when read/write into firestore HOT 3
- 🐛 [firebase_massaging] Example flutter ios build is too old
- firebase_code: Duplicate Classes HOT 6
- Firebase Phone MFA not working with some numbers HOT 1
- [📚] Old Doc doesn't have sum() and average() example for flutter. HOT 1
- [Firebase storage]: iOS only - Unable to establish connection to channel, happens in Workmanager or isolate only HOT 1
- [Firebase_auth]: <When I use signInWithEmailAndPassword without first using the createUserWithEmailAndPassword method, I get the error message [firebase_auth/channel-error] "dev.flutter.pigeon.firebase_auth_platform_interface.FirebaseAuthHostApi.signInWithEmailAndPassword".> HOT 11
- 🐛 [crashlytics][release] Information from recordFlutterFatalError shows up as 'Instance of 'DiagnosticsProperty<void>'
- [firebase_app_check] App check token does not print on Android real devices HOT 6
- [firebase_auth]: [web] referencing FirebaseAuthException after running release version of app throws exception. HOT 2
- [firebase_messaging]: After turning off the device and turn back on, onBackgroundMessage is not fired on iOS. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutterfire.