flutter / flutter/devtools

Flutter service extensions disabled after a hot-restart

Đang mở
#8,490 5 bình luận 0 reaction 1 người được giao Được @elliette nhận Xem trên GitHub
P2 reproduce to verify testing
Ngôn ngữ chính
Dart
Star
1.7k
Fork
404
Merge trung bình
6 ngày 17 giờ
Pull request đã merge (30 ngày)
18

Mô tả

I noticed that if you start a test with a connection to a live app, trigger a hot-restart, and then try to call a service extension from Flutter, the test will fail because the service extension is never re-registered.

I'm pretty sure this is the same underlying cause as https://github.com/flutter/devtools/issues/7313, when DWDS was connecting directly to the VM Service URI instead of the DDS URI.

Because DDS intercepts the `streamListen` request and [sends back all of the service extensions it is aware of](https://github.com/dart-lang/sdk/blob/df3d7e339dd24d6867b64f0867575f80953d0d70/pkg/dds/lib/src/stream_manager.dart#L291), these service extensions are never sent back to the DevTools test infra VM service connection.

Here is the code we will likely need to modify (where we get the VM service URI and connect to it):

https://github.com/flutter/devtools/blob/9bd0125579f2d57c374eabac6eb1f162b02b9f87/packages/devtools_app/test/test_infra/flutter_test_driver.dart#L327-L358

@bkonyi Do you happen to know how we could get the DDS URI here instead? Thanks!

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.