Skip to content

dartlang:http_impl make crash when flutter run / flutter 1.22 / dart 2.10 #43688

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

Closed
whatamelon opened this issue Oct 6, 2020 · 2 comments
Closed
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-as-intended Closed as the reported issue is expected behavior library-io type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@whatamelon
Copy link

I don't know if it's right to put it up here. But actually this issue related withdartlang. So, I just create issue in here.

After upgrade to 1.22 flutter sdk. And flutter run. It return this error.

Launching lib/main.dart on LGM V300L in debug mode...
../../../flutter/.pub-cache/hosted/pub.dartlang.org/io_http-0.1.0+2/lib/src/http_impl.dart:1102:7: Error: The non-abstract class '_HttpClientRequest' is missing implementations for these members:

  • HttpClientRequest.abort
    Try to either
  • provide an implementation,
  • inherit an implementation from a superclass or mixin,
  • mark the class as abstract, or
  • provide a 'noSuchMethod' implementation.

class _HttpClientRequest extends _HttpOutboundMessage implements HttpClientRequest {
^^^^^^^^^^^^^^^^^^
org-dartlang-sdk:///third_party/dart/sdk/lib/_http/http.dart:2045:8: Context: 'HttpClientRequest.abort' is defined here.
void abort([Object? exception, StackTrace? stackTrace]);
^^^^^

FAILURE: Build failed with an exception.

  • Where:
    Script '/Users/denny/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 904

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command '/Users/denny/flutter/bin/flutter'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 54s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 115.1s
Exception: Gradle task assembleDebug failed with exit code 1


flutter doctor.

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.0, on Mac OS X 10.15.6 19G2021, locale ko-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.49.0)
[✓] Connected device (1 available)

• No issues found!

dart version is 2.10

Always thanks for dart lang.

@whatamelon whatamelon changed the title dartlang:http_impl dartlang:http_impl make crash when flutter run / flutter 1.22 / dart 2.10 Oct 6, 2020
@lrhn lrhn added area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Oct 6, 2020
@sortie
Copy link
Contributor

sortie commented Oct 6, 2020

Hi, this is because of the breaking change 'Support abort() in HttpClientRequest in Dart:IO' #41904.

We decided to improve the HttpClientRequest class in dart:io by adding an abort() method. This is a breaking change for anyone that implemented the class rather than merely extending it. As such, it was subject to our breaking change policy and we announced it for public discussion and after that, we decided to go ahead with the change. You can read more in #41904.

The breaking change means that any implementations of the HttpClientRequest class must also add their own abort() method. In this case, this is package:io_http, a third party package, that needs to add the missing method. You can file an issue about this in their bug tracker at https://github.com/xinthink/dio_custom_http_adapter/. I'm closing this issue as this is an intentional behavior in the Dart SDK per #41904.

@sortie sortie closed this as completed Oct 6, 2020
@sortie sortie added the closed-as-intended Closed as the reported issue is expected behavior label Oct 6, 2020
@whatamelon
Copy link
Author

Thanks for your reply. XD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-as-intended Closed as the reported issue is expected behavior library-io type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants