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
It seems to happen when closing a
RawSecureSocket.Steps to Reproduce
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
_idToSocketStatisticassertion error in the terminal/debug console and may crash in debug mode.Additional context
dart:io/network_profiling.dart.Environment