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

Cronet exception: m.ms: Exception in CronetUrlRequest: net::ERR_CONNECTION_CLOSED, ErrorCode=5 #1217

Open
JSBmanD opened this issue May 30, 2024 · 2 comments
Assignees
Labels
package:cronet_http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@JSBmanD
Copy link

JSBmanD commented May 30, 2024

Package

cronet_http

Version

1.2.1

Operating-System

Android

Output of flutter doctor -v

flutter doctor -v
[✓] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-arm64, locale en-RU)
    • Flutter version 3.19.6 on channel stable at /Users/dmitry/fvm/versions/3.19.6
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (6 weeks ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/dmitry/Documents/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/dmitry/Documents/sdk
    • Java binary at: /Users/dmitry/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    ! CocoaPods 1.12.1 out of date (1.13.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods for instructions.

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --ignore-certificate-errors
    --disable-web-security --user-data-dir=/Users/dmitry/temp)
    ! /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --ignore-certificate-errors --disable-web-security --user-data-dir=/Users/dmitry/temp is not
      executable.

[✓] Android Studio (version 2023.3)
    • Android Studio at /Users/dmitry/Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] IntelliJ IDEA Community Edition (version 2023.3.2)
    • IntelliJ at /Users/dmitry/Applications/IntelliJ IDEA Community Edition.app
    • Flutter plugin version 78.4.2
    • Dart plugin version 233.15123

[✓] VS Code (version 1.87.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.88.0

[✓] Connected device (2 available)
    • iPhone SE (3rd generation) (mobile) • *** • ios          • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
    • macOS (desktop)                     • macos                                • darwin-arm64 • macOS 14.4.1 23E224 darwin-arm64

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Dart Version

3.3.4

Steps to Reproduce

  1. Create long polling client (that will make requests one after another for a period of time)
  2. Start making requests

Expected Result

Requests succeed

Actual Result

After some time requests will fail with Cronet exception: m.ms: Exception in CronetUrlRequest: net::ERR_CONNECTION_CLOSED, ErrorCode=5, InternalErrorCode=-100, Retryable=true, uri=https://***/v1/polling.getUpdates?ts=***,statusCode: null,cause: DioException [unknown]: null

Devices distribution (out of 30k events):
image

Full log

Cronet exception: m.ms: Exception in CronetUrlRequest: net::ERR_CONNECTION_CLOSED, ErrorCode=5, InternalErrorCode=-100, Retryable=true, uri=https://alive.go-rhino.com/v1/polling.getUpdates?ts=1717011232038) | *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 27540, tid: 27615, name 1.ui
os: android arch: arm64 comp: yes sim: no
build_id: 'b866ace18fa006c0f7dae5b7963c0614'
isolate_dso_base: 797e36f000, vm_dso_base: 797e36f000
isolate_instructions: 797e5b5580, vm_instructions: 797e59f000
    #00 abs 000000797ead0d0b virt 0000000000761d0b _kDartIsolateSnapshotInstructions+0x51b78b
    #01 abs 000000797ead0073 virt 0000000000761073 _kDartIsolateSnapshotInstructions+0x51aaf3
    #02 abs 000000797e71adcb virt 00000000003abdcb _kDartIsolateSnapshotInstructions+0x16584b
    #03 abs 000000797eb2fcfb virt 00000000007c0cfb _kDartIsolateSnapshotInstructions+0x57a77b
    #04 abs 000000797eb2fafb virt 00000000007c0afb _kDartIsolateSnapshotInstructions+0x57a57b
<asynchronous suspension>
image
@brianquinlan
Copy link
Collaborator

How are you using package:cronet_http? I see DioException in your logs.

@AlexV525
Copy link
Contributor

How are you using package:cronet_http? I see DioException in your logs.

We have package:native_dio_adapter that can connects cronet_http and cupertino_http with the Dio instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:cronet_http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants