dart-lang / http

A composable API for making HTTP requests in Dart.
https://pub.dev/packages/http
BSD 3-Clause "New" or "Revised" License
1.02k stars 354 forks source link

Dart_PostCObject_DL failed after Hot Restart #1033

Open brianquinlan opened 1 year ago

brianquinlan commented 1 year ago

I was just hit by it. It never occurred since today and it occurs on Hot Restart, almost at every app launch.

Log

*** Assertion failure in -[CUPHTTPClientDelegate URLSession:dataTask:didReceiveResponse:completionHandler:], CUPHTTPClientDelegate.m:116
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Dart_PostCObject_DL failed.'
*** First throw call stack:
(0x1d5d7ce38 0x1cef138d8 0x1d062b8ec 0x105a780c4 0x1d6f774c8 0x1d018d060 0x1d01611b0 0x1d0161140 0x1d01224f4 0x1d0122228 0x1d0127940 0x1dd3a4114 0x1dd394f88 0x1dd398418 0x1dd397a80 0x1dd3a6a6c 0x1dd3a7284 0x223ff4dbc 0x223ff4b98)
libc++abi: terminating with uncaught exception of type NSException

Flutter doctor, testing on iphone 13 pro ios 16.3.1

Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel [user-branch], 3.13.0-0.2.pre, on macOS 12.6.5 21G531 darwin-arm64, locale en-IT)
    ! Flutter version 3.13.0-0.2.pre on channel [user-branch] at /Users/delf/Development/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] Connected device (3 available)
[✓] Network resources
brianquinlan commented 1 year ago

Copied from https://github.com/dart-lang/http/issues/785#issuecomment-1760139241

@delfme Could you confirm that this only happens with Hot Restart?

brianquinlan commented 1 year ago

I think that we will have to live with this until https://github.com/flutter/flutter/issues/75528 is fixed.

delfme commented 1 year ago

Copied from #785 (comment)

@delfme Could you confirm that this only happens with Hot Restart?

yes, only hot restart.

felipecastrosales commented 2 months ago

this appears to me without hot restart.

for me:

*** Assertion failure in -[fir_D0039B65-95B2-43B5-9053-D1303083355C_CUPHTTPClientDelegate URLSession:dataTask:didReceiveData:], CUPHTTPClientDelegate.m:148
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Dart_PostCObject_DL failed.'
*** First throw call stack:
(0x19dfa8f20 0x195e572b8 0x19d4af7f8 0x1080c48c8 0x1079716a4 0x19f106324 0x19cded8c0 0x19cded780 0x19cded580 0x19cdeb820 0x19ce70268 0x19ce6feb4 0x10bc73764 0x10bc627bc 0x10bc658e0 0x10bc64bb8 0x10bc76ae4 0x10bc774d8 0x1fa9f88f8 0x1fa9f50cc)
libc++abi: terminating due to uncaught exception of type NSException
delfme commented 2 months ago

Yea forgot to mention it. To us it occurs with and without hot restart. We have usual 10-20 sec per run