diff --git a/packages/devtools_app/lib/src/screens/network/network_controller.dart b/packages/devtools_app/lib/src/screens/network/network_controller.dart index dc76ad14cc1..43ffccdf3fa 100644 --- a/packages/devtools_app/lib/src/screens/network/network_controller.dart +++ b/packages/devtools_app/lib/src/screens/network/network_controller.dart @@ -61,7 +61,8 @@ class NetworkController extends DisposableController } List? _httpRequests; - String? exportAsHarFile() { + Future exportAsHarFile() async { + await _fetchFullDataBeforeExport(); _httpRequests = filteredData.value.whereType().toList(); @@ -386,6 +387,12 @@ class NetworkController extends DisposableController serviceConnection.errorBadgeManager.incrementBadgeCount(NetworkScreen.id); } } + + Future _fetchFullDataBeforeExport() => Future.wait( + filteredData.value + .whereType() + .map((item) => item.getFullRequestData()), + ); } /// Class for managing the set of all current sockets, and diff --git a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md index fa99239b317..1a8a6502f78 100644 --- a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md +++ b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md @@ -41,7 +41,7 @@ TODO: Remove this section if there are not any general updates. ## Network profiler updates -TODO: Remove this section if there are not any general updates. +* Resolved an issue in .har export where response content was sometimes missing in the data. - [#8333](https://github.com/flutter/devtools/pull/8333) ## Logging updates