Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compiling with new STABLE channel (mailer dependency failing) #33

Closed
MichalMisiaszek opened this issue Jul 13, 2019 · 2 comments
Closed

Comments

@MichalMisiaszek
Copy link

Catcher requires mailer 2.x.x which does not work with flutter 1.8.1 (latest stable).

file:///Users/michal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/mailer-2.5.1/lib/src/smtp/connection.dart:137:33: Error: The argument type 'Utf8Decoder' can't be assigned to the parameter type 'StreamTransformer<Uint8List, dynamic>'.
 - 'Utf8Decoder' is from 'dart:convert'.
 - 'StreamTransformer' is from 'dart:async'.
 - 'Uint8List' is from 'dart:typed_data'.
Try changing the type of the parameter, or casting the argument to 'StreamTransformer<Uint8List, dynamic>'.
        .transform(convert.utf8.decoder)```

If forced to use 3.0.1 fails with many other errors:
```Compiler message:
file:///Users/michal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/catcher-0.1.9/lib/handlers/email_auto_handler.dart:56:37: Error: The type 'SendReport' used in the 'for' loop must implement 'Iterable<dynamic>'.
 - 'SendReport' is from 'package:mailer/src/entities/send_report.dart' ('file:///Users/michal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/mailer-3.0.1/lib/src/entities/send_report.dart').
 - 'Iterable' is from 'dart:core'.
      for (SendReport sendReport in results) {
                                    ^
file:///Users/michal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/catcher-0.1.9/lib/handlers/email_auto_handler.dart:57:51: Error: The getter 'sent' isn't defined for the class 'SendReport'.
 - 'SendReport' is from 'package:mailer/src/entities/send_report.dart' ('file:///Users/michal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/mailer-3.0.1/lib/src/entities/send_report.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'sent'.
        _printLog("Sending status: " + sendReport.sent.toString());
                                                  ^^^^
file:///Users/michal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/catcher-0.1.9/lib/handlers/email_auto_handler.dart:58:24: Error: The getter 'validationProblems' isn't defined for the class 'SendReport'.
 - 'SendReport' is from 'package:mailer/src/entities/send_report.dart' ('file:///Users/michal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/mailer-3.0.1/lib/src/entities/send_report.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'validationProblems'.
        if (sendReport.validationProblems != null &&
                       ^^^^^^^^^^^^^^^^^^
file:///Users/michal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/catcher-0.1.9/lib/handlers/email_auto_handler.dart:59:24: Error: The getter 'validationProblems' isn't defined for the class 'SendReport'.
 - 'SendReport' is from 'package:mailer/src/entities/send_report.dart' ('file:///Users/michal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/mailer-3.0.1/lib/src/entities/send_report.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'validationProblems'.
            sendReport.validationProblems.length > 0) {
                       ^^^^^^^^^^^^^^^^^^
file:///Users/michal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/catcher-0.1.9/lib/handlers/email_auto_handler.dart:60:42: Error: The getter 'validationProblems' isn't defined for the class 'SendReport'.
 - 'SendReport' is from 'package:mailer/src/entities/send_report.dart' ('file:///Users/michal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/mailer-3.0.1/lib/src/entities/send_report.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'validationProblems'.
          for (var problem in sendReport.validationProblems) {
                                         ^^^^^^^^^^^^^^^^^^
file:///Users/michal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/catcher-0.1.9/lib/handlers/email_auto_handler.dart:64:27: Error: The getter 'sent' isn't defined for the class 'SendReport'.
 - 'SendReport' is from 'package:mailer/src/entities/send_report.dart' ('file:///Users/michal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/mailer-3.0.1/lib/src/entities/send_report.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'sent'.
        return sendReport.sent;
                          ^^^^
file:///Users/michal/Development/flutter/.pub-cache/hosted/pub.dartlang.org/mailer-3.0.1/lib/src/smtp/connection.dart:151:32: Error: The argument type 'Utf8Decoder' can't be assigned to the parameter type 'StreamTransformer<Uint8List, dynamic>'.
 - 'Utf8Decoder' is from 'dart:convert'.
 - 'StreamTransformer' is from 'dart:async'.
 - 'Uint8List' is from 'dart:typed_data'.
Try changing the type of the parameter, or casting the argument to 'StreamTransformer<Uint8List, dynamic>'.
        _socket.transform(utf8.decoder).transform(const LineSplitter()));```
@jhomlala
Copy link
Owner

Currently (as today) stable version is 1.7.8: https://flutter.dev/docs/development/tools/sdk/releases
1.8.1 is current version of dev channel, which may break Catcher.

I think that mailer package will be updated soon to fix issue with UInt8List. Please use 1.7.8 to fix your issue.

@jhomlala
Copy link
Owner

I've just tested Catcher with 1.7.8 and it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants