You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Embedder API should support receiving responses from messages #18852
Per the embedding header's description of FlutterPlatformMessage's response_handle:
// The response handle on which to invoke
// |FlutterEngineSendPlatformMessageResponse| when the response is ready. This
// field is ignored for messages being sent from the embedder to the
// framework.
This means FlutterEngineSendPlatformMessage can't receive responses from messages sent into Flutter, which is inconsistent with the messaging APIs on mobile.
This is especially problematic given that MethodChannel eats all exceptions that happen during message processing and turns them into error responses; if it's impossible to set up a handler to receive those responses on the native side, debugging problems is very painful. (E.g., google/flutter-desktop-embedding#80 took me several unnecessary hours to debug because the type exception was being silently dropped.)
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
stuartmorgan-g commentedon Jun 26, 2018
@chinmaygarde
chinmaygarde commentedon Jun 26, 2018
Please feel free to file more issue related to debugging experience while working with the embedder API.
GeertJohan commentedon Mar 14, 2019
Is this on the roadmap? I'd love to implement replies to host->client messages for go-flutter.
Allow embedders to add callbacks for responses to platform messages f…
Allow embedders to add callbacks for responses to platform messages f…
Allow embedders to add callbacks for responses to platform messages f…
AndruByrne commentedon Jul 31, 2019
Chinmay, I hope you take this the right way, but I could kiss you; thanks for fixing the bug I just spent 8 hours finding!!!
- nullptr); + response);smanilov commentedon Aug 21, 2019
Just a heads up that https://github.com/flutter/engine/blob/master/shell/platform/common/cpp/client_wrapper/include/flutter/method_channel.h:55 still refers to this issue, in case you missed it :)
stuartmorgan-g commentedon Aug 21, 2019
@smanilov Thanks, good catch. Filed #38977 to add the last missing bits that had referenced this.
franciscojma86 commentedon Sep 4, 2019
Landed! Thanks for the heads up!
smanilov commentedon Sep 20, 2019
Thanks a lot for following up! I'll use this right away :)
github-actions commentedon Aug 28, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.Allow embedders to add callbacks for responses to platform messages f…