-
Notifications
You must be signed in to change notification settings - Fork 6k
Do not send messages if the platform view has been detached #3927
Conversation
|
As a crash mitigation this seems OK. Ideally we'd have tests. We might also want to consider throwing exceptions or queuing. @collinjackson this was showing up in Posse's app as random crashers when the Firebase Datastore plugin would attempt to deliver messages to Dart while the FlutterView was detached (generally on an idle wake where java was faster than the FlutterView, etc.) @mravn-google you should be aware of this hole in the plugin architecture. Messages can attempt to send messages to detached (backgrounded, screen off, etc.) FlutterView's and previously they would just crash with a null pointer SIGSEGV. This changes that behavior to log, but the message is still lost. FYI @lukef |
eseidelGoogle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a mitigation for our immediate crasher seen in live apps, lgtm. I expect we'll need more work here.
|
Please add a test if possible. Please file a bug to track replacing the log with an improvement to the protocol. |
|
Is this issue Android only, or do we have the same problem on iOS? |
|
This was a quick workaround for a crash in production apps. @jason-simmons's analysis of the underlying issue in at least one of the production apps:
Thanks again for the quick turnaround. |
|
@mravn-google I suspect we may be leaking firebase registrations everywhere, but we've only seen the crash reported on iOS. Unclear why. |
|
iOS? This change is on the Android side. |
|
Sorry, I meant "only reported on Android". |
No description provided.