devtools
devtools copied to clipboard
When running a Flutter iOS app in debug mode the app crashes with error
It seems to happen when closing a RawSecureSocket.
Steps to Reproduce
- Run a Flutter app on iOS (debug build) and open network in Flutter DevTools.
- Perform network requests (HTTPS).
- After some socket closures, the app throws the above exception.
Expected behavior
Sockets should close normally without any errors being printed in the debug console or terminal.
Actual behavior
When closing sockets, the app prints the _idToSocketStatistic assertion error in the terminal/debug console and may crash in debug mode.
Additional context
- Happens only in debug mode (profiling enabled).
- Likely related to socket profiling cleanup logic in
dart:io/network_profiling.dart.
Environment
- DevTools version: 2.48.0
- IDE: VSCode
- Connected Device: iOS (arm64, 64-bit)
- Connected app type: Flutter native (debug build)
- Dart version: 3.9.0
- Flutter version: 3.35.1 (stable)
- Framework / Engine: 20f8274939 / 1e9a811bf8
FYI @brianquinlan @srawlins it sounds like this is a dart:io issue and not a DevTools Network Panel issue, should I file an issue in the SDK?
When I (thought I) fixed this last time, it was a problem in dart:io that was only triggered by DevTools. (Also it was my code that was triggering the exception.) So I think we could track this here.