Closed laterdayi closed 1 week ago
@CoderDake @polina-c @kenzieschmoll any update ?
Can you provide a small repro that mimics how you are sending your network request? This would allow us to easily reproduce the behavior you are seeing. Thanks.
@kenzieschmoll I can reproduce the issue with a simple request like this:
import 'dart:convert';
import 'dart:io';
void main() async {
HttpClient client = HttpClient();
HttpClientRequest request = await client.getUrl(
Uri.parse('https://home.archlinux.dk'),
);
HttpClientResponse response = await request.close();
print(await response.transform(utf8.decoder).join());
}
And starting the program with dart run --pause-isolates-on-start --observe
, go to the network tab and then click run. By doing so I get the issue where we only see the socket itself (websocket is an issue by itself as #3033) and not what we did inside the socket:
Using DevTools version 2.34.3 with Dart SDK version: 3.4.4 (stable) (Wed Jun 12 15:54:31 2024 +0000) on "windows_x64"
Ok, something interesting to observe is that I think the HTTP logging are not immediately available but VM Service needs some time before it gets running. If I add some arbitrary delay before making the first HTTP request:
import 'dart:convert';
import 'dart:io';
void main() async {
await Future<void>.delayed(Duration(seconds: 5)); // <-- this got added
HttpClient client = HttpClient();
HttpClientRequest request = await client.getUrl(
Uri.parse('https://home.archlinux.dk'),
);
HttpClientResponse response = await request.close();
print(await response.transform(utf8.decoder).join());
}
It starts working as expected:
EDIT 1: Talked to somebody about this and they do still have the issue even with the delay so there are definitely more to this issue.
im using retrofit and im having the same issues as above. it only shows InternetAddress('some ip addreess', IPv4) instead of the exact api uri . before upgrading my flutter to the latest version, it was showing the network requests fine.
same
Looking forward to solving it, the problem right now is very difficult for development debugging
This is a duplicate of https://github.com/flutter/devtools/issues/3033, which is now fixed.
When you start DevTools, Network can't listen to network requests
https://github.com/flutter/devtools/assets/122137647/34d8dbdc-deda-40e9-abc5-95a46b29a8db
InternetAddress is always displayed with no network requests