Repository navigation
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listblockedIssue is blocked by another issueIssue is blocked by another issuef: integration_testThe flutter/packages/integration_test pluginThe flutter/packages/integration_test pluginplatform-androidAndroid applications specificallyAndroid applications specificallyt: flutter driver"flutter driver", flutter_drive, or a driver test"flutter driver", flutter_drive, or a driver testteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
Reproduction:
- Start an Android 34 emulator
- Use the following
AndroidManifest.xmlto forcevulkan(i.e. no fallback logic), though other crashes might also cause this - Try running the app with
flutter drive lib/main.dart
You'll get something like:
$ flutter drive lib/main.dart
It is taking an unusually long time to connect to the VM...
Oops; flutter has exited unexpectedly: "HttpException: Connection closed before full header was receivedThere are two bugs:
- We are missing information on why we can't connect (more on that in a second)
- The crash has nothing to do with the VM service or HTTP
If you flutter run lib/main.dart (i.e. the same code, just with flutter run):
$ flutter run lib/main.dart
E/flutter ( 5377): [ERROR:flutter/impeller/renderer/backend/vulkan/capabilities_vk.cc(285)] Break on 'ImpellerValidationBreak' to inspect point of failure: Device does not support required Android extension: VK_KHR_external_semaphore_fd
E/flutter ( 5377): [ERROR:flutter/impeller/renderer/backend/vulkan/capabilities_vk.cc(310)] Break on 'ImpellerValidationBreak' to inspect point of failure: Device not suitable since required extensions are not supported.
E/flutter ( 5377): [ERROR:flutter/impeller/renderer/backend/vulkan/capabilities_vk.cc(393)] Break on 'ImpellerValidationBreak' to inspect point of failure: Device doesn't support the required queues.
E/flutter ( 5377): [ERROR:flutter/impeller/renderer/backend/vulkan/context_vk.cc(278)] Break on 'ImpellerValidationBreak' to inspect point of failure: No valid Vulkan device found.
I/flutter ( 5377): [IMPORTANT:flutter/shell/platform/android/android_context_vk_impeller.cc(60)] Using the Impeller rendering backend (Vulkan).
F/flutter ( 5377): [FATAL:flutter/shell/platform/android/platform_view_android.cc(127)] Check failed: android_context_->IsValid(). Could not create surface from invalid Android context.
Error connecting to the service protocol: failed to connect to http://127.0.0.1:58976/_qg3X7xW8FA=/ DartDevelopmentServiceException: WebSocketChannelException:
HttpException: Connection closed before full header was received, uri = http://127.0.0.1:58976/_qg3X7xW8FA=/wsBetter, at least we get the error messages (I'd expect to see these in flutter drive, but do not).
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listblockedIssue is blocked by another issueIssue is blocked by another issuef: integration_testThe flutter/packages/integration_test pluginThe flutter/packages/integration_test pluginplatform-androidAndroid applications specificallyAndroid applications specificallyt: flutter driver"flutter driver", flutter_drive, or a driver test"flutter driver", flutter_drive, or a driver testteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Activity
matanlurey commentedon Jan 24, 2025
The error is hidden in the following snippet:
For example, this would output:
>>> (await runAdbCheckedAsync(cmd)).stdout: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x20000000 cmp=com.example.android_engine_test/.MainActivity (has extras) } An error occurred when setting up filtering for adb logs. Unable to communicate with the VM service. E/flutter ( 4754): [ERROR:flutter/impeller/renderer/backend/vulkan/capabilities_vk.cc(285)] Break on 'ImpellerValidationBreak' to inspect point of failure: Device does not support required Android extension: VK_KHR_external_semaphore_fd E/flutter ( 4754): [ERROR:flutter/impeller/renderer/backend/vulkan/capabilities_vk.cc(310)] Break on 'ImpellerValidationBreak' to inspect point of failure: Device not suitable since required extensions are not supported. E/flutter ( 4754): [ERROR:flutter/impeller/renderer/backend/vulkan/capabilities_vk.cc(393)] Break on 'ImpellerValidationBreak' to inspect point of failure: Device doesn't support the required queues. E/flutter ( 4754): [ERROR:flutter/impeller/renderer/backend/vulkan/context_vk.cc(278)] Break on 'ImpellerValidationBreak' to inspect point of failure: No valid Vulkan device found. I/flutter ( 4754): [IMPORTANT:flutter/shell/platform/android/android_context_vk_impeller.cc(60)] Using the Impeller rendering backend (Vulkan). F/flutter ( 4754): [FATAL:flutter/shell/platform/android/platform_view_android.cc(127)] Check failed: android_context_->IsValid(). Could not create surface from invalid Android context.matanlurey commentedon Jan 24, 2025
Unfortunately it's not always available, I'm guessing sometimes logcat is required to read these logs.
Force Impeller backend for `android_engine_test`, and test both OpenG…
jonahwilliams commentedon Jan 27, 2025
Talked about this a bit in triage and we're not sure that there is a better way than what we're doing now. :(
matanlurey commentedon Jan 27, 2025
I am marking this as blocked and downgrading due to more systemic issues.
1 remaining item
Checkerbeule commentedon Dec 18, 2025
Additional details / same or similar issue on my device
I’m seeing the same (or very similar) behavior on a Pixel 2 XL running Android 15 (LineageOS 22.2).
• The failure does not happen immediately
• It occurs after ~2–3 minutes, while VS Code is still showing Gradle task assemble…
• The app installs and launches, but the VM service / WebSocket connection drops after a couple of minutes.
• Affected modes: debug and profile
• --no-enable-impeller does not change the behavior
Error message:
failed to connect to http://127.0.0.1:XXXXX
HttpException: Connection closed before full header was received
Resolve issue flutter#162087: Listen to device log reader before VM S…
fix(flutter_tools): listen to log reader before VM Service and make d…
Listen to log reader before VM Service and make delay configurable (f…
github-actions commentedon Aug 6, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.