Skip to content

flutter drive Impeller startup crashes appear as VM HTTP exceptions #162087

@matanlurey

Description

@matanlurey

Reproduction:

  1. Start an Android 34 emulator
  2. Use the following AndroidManifest.xml to force vulkan (i.e. no fallback logic), though other crashes might also cause this
  3. 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 received

There are two bugs:

  1. We are missing information on why we can't connect (more on that in a second)
  2. 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=/ws

Better, at least we get the error messages (I'd expect to see these in flutter drive, but do not).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listblockedIssue is blocked by another issuef: integration_testThe flutter/packages/integration_test pluginplatform-androidAndroid applications specificallyt: flutter driver"flutter driver", flutter_drive, or a driver testteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions