Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@ferhatb
Copy link
Contributor

@ferhatb ferhatb commented Apr 8, 2020

Related issue: flutter/flutter#53367

key: const Key('input'),
enabled: true,
controller: _controller,
//initialValue: 'Text1',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a leftover from my code. I also saw it yesterday. Can you remove this line :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarified why we need text field with comment.

void main() async {
E2EWidgetsFlutterBinding.ensureInitialized() as E2EWidgetsFlutterBinding;

testWidgets('platform message for Clipboard.set/getData reply with future',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Rename the test. I think we only tests the setData here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

}).catchError((dynamic _) {
callback(codec.encodeErrorEnvelope(
code: 'copy_fail', message: 'Clipboard.setData failed'));
// Don't encode a duplicate reply if we already failed and an error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

Comment on lines 28 to +30
callback(codec.encodeErrorEnvelope(
code: 'copy_fail', message: 'Clipboard.setData failed'));
errorEnvelopeEncoded = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no error thrown here. Why would the catchError callback be invoked after this?

Copy link
Contributor Author

@ferhatb ferhatb Apr 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you do the error reply, the code that handles it could/did crash, then that is caught and instead of stack trace of error handling code that failed, you get the multi-reply failure.

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!!

@ferhatb ferhatb merged commit db64467 into flutter:master Apr 9, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 9, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 9, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 9, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 9, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 9, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 9, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 10, 2020
goderbauer pushed a commit to goderbauer/engine that referenced this pull request Apr 16, 2020
* Fix multi-reply on message channel. Add test
* Add check for viewInstanceCount
* skip no-headless test
@ferhatb ferhatb deleted the platform_msg branch February 11, 2021 17:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants