canonical / flutter-snap

GNU General Public License v3.0
18 stars 8 forks source link

Can't launch emulator with 'flutter emulators' #27

Closed brunotacca closed 3 years ago

brunotacca commented 3 years ago

Migrating the issue from flutter main repository. flutter/flutter#74538

More details can be found at the original issue, but, in summary:

By installing flutter through snap install flutter --classic, launching an android emulator through flutter emulators --launch fails, while it's possible to launch it through emulators -avd.

The main errors displayed on both tools while on verbose mode are:

handleCpuAcceleration: feature check for hvf
cannot add library /home/tacca/Android/Sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed
added library /home/tacca/Android/Sdk/emulator/lib64/vulkan/libvulkan.so
cannot add library /home/tacca/Android/Sdk/emulator/lib64/vulkan/libvulkan.so.1: full

The difference is that, using flutter emulators --launch these errors exits the emulator, while emulators -avd just ignores them and proceeds with launching.

It might be related with snap because it was discovered that by installing flutter manually, it solves the problem. It might also be related with file permissions or vulkan itself.

Let me know if I can provide more information. Thank you all in advance.

Here is my rig:

Steps to Reproduce

Might not be possible to reproduce since it could be related to my setup/installation.

  1. Open a terminal
  2. flutter emulators --launch Pixel_3_API_28 -v > failed launch
  3. emulator -avd Pixel_3_API_28 -verbose > successful launch

Logs

flutter doctor -v ``` [✓] Flutter (Channel beta, 1.25.0-8.3.pre, on Linux, locale en_US.UTF-8) • Flutter version 1.25.0-8.3.pre at /home/tacca/snap/flutter/common/flutter • Framework revision 5d36f2e7f5 (8 days ago), 2021-01-14 15:57:49 -0800 • Engine revision 7a8f8ca02c • Dart version 2.12.0 (build 2.12.0-133.7.beta) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /home/tacca/Android/Sdk • Platform android-30, build-tools 30.0.3 • ANDROID_HOME = /home/tacca/Android/Sdk • Java binary at: /usr/local/android-studio/jre/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted. [✓] Android Studio (version 4.0) • Android Studio at /usr/local/android-studio • Flutter plugin version 48.1.2 • Dart plugin version 193.7547 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) [✓] VS Code (version 1.52.1) • VS Code at /usr/share/code • Flutter extension version 3.18.1 [!] Connected device ! No devices available ! Doctor found issues in 1 category. ```
flutter devices -v ``` [ +55 ms] executing: [/home/tacca/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +25 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] 5d36f2e7f5387b6c751449258ade8e4e6edf99be [ ] executing: [/home/tacca/snap/flutter/common/flutter/] git tag --points-at 5d36f2e7f5387b6c751449258ade8e4e6edf99be [ +8 ms] Exit code 0 from: git tag --points-at 5d36f2e7f5387b6c751449258ade8e4e6edf99be [ ] 1.25.0-8.3.pre [ +30 ms] executing: [/home/tacca/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +3 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/beta [ ] executing: [/home/tacca/snap/flutter/common/flutter/] git ls-remote --get-url origin [ +2 ms] Exit code 0 from: git ls-remote --get-url origin [ ] https://github.com/flutter/flutter.git [ +29 ms] executing: [/home/tacca/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD [ +3 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] beta [ +32 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +36 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update. [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update. [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update. [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update. [ ] Artifact Instance of 'PubDependencies' is not required, skipping update. [ +28 ms] executing: /home/tacca/Android/Sdk/platform-tools/adb devices -l [ +30 ms] List of devices attached [ +4 ms] No devices detected. Run "flutter emulators" to list and start any available device emulators. If you expected your device to be detected, please run "flutter doctor" to diagnose potential issues. You may also try increasing the time to wait for connected devices with the --device-timeout flag. Visit https://flutter.dev/setup/ for troubleshooting tips. [ +2 ms] executing: /home/tacca/Android/Sdk/platform-tools/adb devices -l [ +4 ms] List of devices attached [ +8 ms] "flutter devices" took 124ms. [ +254 ms] ensureAnalyticsSent: 251ms [ +1 ms] Running shutdown hooks [ ] Shutdown hooks complete [ ] exiting with code 0 ```
flutter emulators -v ``` [ +54 ms] executing: [/home/tacca/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +24 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] 5d36f2e7f5387b6c751449258ade8e4e6edf99be [ ] executing: [/home/tacca/snap/flutter/common/flutter/] git tag --points-at 5d36f2e7f5387b6c751449258ade8e4e6edf99be [ +8 ms] Exit code 0 from: git tag --points-at 5d36f2e7f5387b6c751449258ade8e4e6edf99be [ ] 1.25.0-8.3.pre [ +29 ms] executing: [/home/tacca/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +3 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/beta [ ] executing: [/home/tacca/snap/flutter/common/flutter/] git ls-remote --get-url origin [ +2 ms] Exit code 0 from: git ls-remote --get-url origin [ ] https://github.com/flutter/flutter.git [ +28 ms] executing: [/home/tacca/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD [ +3 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] beta [ +32 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +36 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update. [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update. [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update. [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update. [ ] Artifact Instance of 'PubDependencies' is not required, skipping update. [ +28 ms] executing: /home/tacca/Android/Sdk/emulator/emulator -list-avds [ +27 ms] Pixel_3_API_28 [ +3 ms] 1 available emulator: [ +3 ms] Pixel_3_API_28 • Pixel 3 API 28 • Google • android [ ] To run an emulator, run 'flutter emulators --launch '. [ ] To create a new emulator, run 'flutter emulators --create [--name xyz]'. [ ] You can find more information on managing emulators at the links below: https://developer.android.com/studio/run/managing-avds https://developer.android.com/studio/command-line/avdmanager [ +7 ms] "flutter emulators" took 118ms. [ +254 ms] ensureAnalyticsSent: 251ms [ +1 ms] Running shutdown hooks [ ] Shutdown hooks complete [ ] exiting with code 0 ```
flutter emulators --launch Pixel_3_API_28 -v ``` [ +54 ms] executing: [/home/tacca/snap/flutter/common/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +26 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] 5d36f2e7f5387b6c751449258ade8e4e6edf99be [ ] executing: [/home/tacca/snap/flutter/common/flutter/] git tag --points-at 5d36f2e7f5387b6c751449258ade8e4e6edf99be [ +8 ms] Exit code 0 from: git tag --points-at 5d36f2e7f5387b6c751449258ade8e4e6edf99be [ ] 1.25.0-8.3.pre [ +31 ms] executing: [/home/tacca/snap/flutter/common/flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +3 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/beta [ ] executing: [/home/tacca/snap/flutter/common/flutter/] git ls-remote --get-url origin [ +2 ms] Exit code 0 from: git ls-remote --get-url origin [ ] https://github.com/flutter/flutter.git [ +29 ms] executing: [/home/tacca/snap/flutter/common/flutter/] git rev-parse --abbrev-ref HEAD [ +3 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] beta [ +32 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +40 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update. [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update. [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update. [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update. [ ] Artifact Instance of 'PubDependencies' is not required, skipping update. [ +25 ms] executing: /home/tacca/Android/Sdk/emulator/emulator -list-avds [ +23 ms] Pixel_3_API_28 [ +3 ms] executing: /home/tacca/Android/Sdk/emulator/emulator -avd Pixel_3_API_28 [ +568 ms] Android emulator stdout: [ +1 ms] emulator: INFO: GrpcServices.cpp:288: Started GRPC server at 127.0.0.1:8554, security: Local [ ] The Android emulator exited with code -11 during startup [ +1 ms] Android emulator stderr: [ ] handleCpuAcceleration: feature check for hvf [ ] cannot add library /home/tacca/Android/Sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed [ ] added library /home/tacca/Android/Sdk/emulator/lib64/vulkan/libvulkan.so [ ] cannot add library /home/tacca/Android/Sdk/emulator/lib64/vulkan/libvulkan.so.1: full [ ] Address these issues and try again. [+2439 ms] "flutter emulators" took 3,114ms. [ +255 ms] ensureAnalyticsSent: 252ms [ +1 ms] Running shutdown hooks [ ] Shutdown hooks complete [ ] exiting with code 0 ```
emulator -avd Pixel_3_API_28 -verbose ``` emulator: Android emulator version 30.3.5.0 (build_id 7033400) (CL:N/A) emulator: Found AVD name 'Pixel_3_API_28' emulator: Found AVD target architecture: x86 emulator: argv[0]: 'emulator'; program directory: '/home/tacca/Android/Sdk/emulator' emulator: Found directory: /home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86/ emulator: emuDirName: '/home/tacca/Android/Sdk/emulator' emulator: Found directory: /home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86/ emulator: Probing for /home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//kernel-ranchu-64: file exists emulator: try dir /home/tacca/Android/Sdk/emulator emulator: Trying emulator path '/home/tacca/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64' emulator: Found target-specific 64-bit emulator binary: /home/tacca/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64 emulator: Adding library search path: '/home/tacca/Android/Sdk/emulator/lib64' emulator: Adding library search path: '/home/tacca/Android/Sdk/emulator/lib64/gles_angle' emulator: Adding library search path: '/home/tacca/Android/Sdk/emulator/lib64/gles_angle9' emulator: Adding library search path: '/home/tacca/Android/Sdk/emulator/lib64/gles_angle11' emulator: Adding library search path: '/home/tacca/Android/Sdk/emulator/lib64/gles_swiftshader' emulator: Adding library search path: '/home/tacca/Android/Sdk/emulator/lib64/libstdc++' emulator: Adding library search path for Qt: '/home/tacca/Android/Sdk/emulator/lib64/qt/lib' emulator: Silencing all qWarning(); use qCWarning(...) instead: QT_LOGGING_RULES=default.warning=false emulator: Setting Qt plugin search path: QT_QPA_PLATFORM_PLUGIN_PATH=/home/tacca/Android/Sdk/emulator/lib64/qt/plugins emulator: Setting Qt to use software OpenGL: QT_OPENGL=software emulator: Setting QML to use software QtQuick2D: QMLSCENE_DEVICE=softwarecontext emulator: Overriding pre-existing bad Qt high dpi settings... emulator: Setting LD_PRELOAD to /home/tacca/Android/Sdk/emulator/lib64/qt/lib/libfreetype.so.6 emulator: Running :/home/tacca/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64 emulator: qemu backend: argv[00] = "/home/tacca/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64" emulator: qemu backend: argv[01] = "-avd" emulator: qemu backend: argv[02] = "Pixel_3_API_28" emulator: qemu backend: argv[03] = "-verbose" emulator: Concatenated backend parameters: /home/tacca/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64 -avd Pixel_3_API_28 -verbose emulator: autoconfig: -skin pixel_3 emulator: autoconfig: -skindir /home/tacca/Android/Sdk/skins/ emulator: autoconfig: -kernel /home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//kernel-ranchu-64 emulator: Target arch = 'x86' emulator: Auto-config: -qemu -cpu qemu32 emulator: Auto-detect: Kernel image requires new device naming scheme. emulator: Auto-detect: Kernel does not support YAFFS2 partitions. emulator: autoconfig: -ramdisk /home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//ramdisk.img emulator: Using initial system image: /home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//system.img emulator: Using initial vendor image: /home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//vendor.img emulator: autoconfig: -data /home/tacca/.android/avd/Pixel_3_API_28.avd/userdata-qemu.img emulator: autoconfig: -initdata /home/tacca/.android/avd/Pixel_3_API_28.avd/userdata.img emulator: autoconfig: -cache /home/tacca/.android/avd/Pixel_3_API_28.avd/cache.img emulator: autoconfig: -sdcard /home/tacca/.android/avd/Pixel_3_API_28.avd/sdcard.img emulator: Physical RAM size: 1536MB emulator: VM heap size 256MB is below hardware specified minimum of 384MB,setting it to that value emulator: System image is read only emulator: Found 1 DNS servers: 127.0.0.53 emulator: trying to load skin file '/home/tacca/Android/Sdk/skins//pixel_3/layout' emulator: registered 'boot-properties' qemud service emulator: Adding boot property: 'qemu.cmdline' = 'androidboot.logcat=v:* androidboot.consolepipe=qemu_pipe,pipe:logcat' emulator: Adding boot property: 'qemu.logcat' = 'start' emulator: CPU Acceleration: working emulator: CPU Acceleration status: KVM (version 12) is installed and usable. handleCpuAcceleration: feature check for hvf emulator: GPU emulation enabled using 'host' mode emulator: Initializing hardware OpenGLES emulation support emulator: VERBOSE: MultiDisplay.cpp:325: create display 0 emulator: VERBOSE: MultiDisplay.cpp:414: setDisplayPose 0 x 0 y 0 w 1080 h 2160 dpi 0 emulator: Found 1 DNS servers: 127.0.0.53 cannot add library /home/tacca/Android/Sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed Content of hardware configuration file: hw.cpu.arch = x86 hw.cpu.model = qemu32 hw.cpu.ncore = 4 hw.ramSize = 1536 hw.screen = multi-touch hw.mainKeys = false hw.trackBall = false hw.keyboard = true hw.keyboard.lid = false hw.keyboard.charmap = qwerty2 hw.dPad = false hw.rotaryInput = false hw.gsmModem = true hw.gps = true hw.battery = true hw.accelerometer = true hw.gyroscope = true hw.audioInput = true hw.audioOutput = true hw.sdCard = true hw.sdCard.path = /home/tacca/.android/avd/Pixel_3_API_28.avd/sdcard.img disk.cachePartition = true disk.cachePartition.path = /home/tacca/.android/avd/Pixel_3_API_28.avd/cache.img disk.cachePartition.size = 66m test.quitAfterBootTimeOut = -1 test.delayAdbTillBootComplete = 0 test.monitorAdb = 0 hw.lcd.width = 1080 hw.lcd.height = 2160 hw.lcd.depth = 16 hw.lcd.density = 440 hw.lcd.backlight = true hw.lcd.vsync = 60 hw.gltransport = pipe hw.gltransport.asg.writeBufferSize = 1048576 hw.gltransport.asg.writeStepSize = 4096 hw.gltransport.asg.dataRingSize = 32768 hw.gltransport.drawFlushInterval = 800 hw.displayRegion.0.1.xOffset = -1 hw.displayRegion.0.1.yOffset = -1 hw.displayRegion.0.1.width = 0 hw.displayRegion.0.1.height = 0 hw.displayRegion.0.2.xOffset = -1 hw.displayRegion.0.2.yOffset = -1 hw.displayRegion.0.2.width = 0 hw.displayRegion.0.2.height = 0 hw.displayRegion.0.3.xOffset = -1 hw.displayRegion.0.3.yOffset = -1 hw.displayRegion.0.3.width = 0 hw.displayRegion.0.3.height = 0 hw.display1.width = 0 hw.display1.height = 0 hw.display1.density = 0 hw.display1.xOffset = -1 hw.display1.yOffset = -1 hw.display1.flag = 0 hw.display2.width = 0 hw.display2.height = 0 hw.display2.density = 0 hw.display2.xOffset = -1 hw.display2.yOffset = -1 hw.display2.flag = 0 hw.display3.width = 0 hw.display3.height = 0 hw.display3.density = 0 hw.display3.xOffset = -1 hw.display3.yOffset = -1 hw.display3.flag = 0 hw.gpu.enabled = true hw.gpu.mode = host hw.initialOrientation = Portrait hw.camera.back = virtualscene hw.camera.front = emulated vm.heapSize = 384 hw.sensors.light = true hw.sensors.pressure = true hw.sensors.humidity = true hw.sensors.proximity = true hw.sensors.magnetic_field = true hw.sensors.magnetic_field_uncalibrated = true hw.sensors.gyroscope_uncalibrated = true hw.sensors.orientation = true hw.sensors.temperature = true hw.sensor.hinge = true hw.sensor.hinge.count = 0 hw.sensor.hinge.type = 0 hw.sensor.hinge.sub_type = 0 hw.sensor.hinge.fold_to_displayRegion.0.1_at_posture = 1 hw.sensor.roll = false hw.sensor.roll.count = 0 hw.sensor.roll.resize_to_displayRegion.0.1_at_posture = 6 hw.sensor.roll.resize_to_displayRegion.0.2_at_posture = 6 hw.sensor.roll.resize_to_displayRegion.0.3_at_posture = 6 hw.sensors.heart_rate = true hw.useext4 = true hw.arc = false hw.arc.autologin = false kernel.path = /home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//kernel-ranchu-64 kernel.newDeviceNaming = yes kernel.supportsYaffs2 = no disk.ramdisk.path = /home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//ramdisk.img disk.systemPartition.initPath = /home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//system.img disk.systemPartition.size = 2641m disk.vendorPartition.initPath = /home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//vendor.img disk.vendorPartition.size = 800m disk.dataPartition.path = /home/tacca/.android/avd/Pixel_3_API_28.avd/userdata-qemu.img disk.dataPartition.size = 6g disk.encryptionKeyPartition.path = /home/tacca/.android/avd/Pixel_3_API_28.avd/encryptionkey.img PlayStore.enabled = true avd.name = Pixel_3_API_28 avd.id = Pixel_3_API_28 fastboot.forceColdBoot = false android.sdk.root = /home/tacca/Android/Sdk android.avd.home = /home/tacca/.android/avd . QEMU options list: emulator: argv[00] = "/home/tacca/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64" emulator: argv[01] = "-dns-server" emulator: argv[02] = "127.0.0.53" emulator: argv[03] = "-mem-path" emulator: argv[04] = "/home/tacca/.android/avd/Pixel_3_API_28.avd/snapshots/default_boot/ram.img" emulator: argv[05] = "-mem-file-shared" emulator: argv[06] = "-serial" emulator: argv[07] = "null" emulator: argv[08] = "-device" emulator: argv[09] = "goldfish_pstore,addr=0xff018000,size=0x10000,file=/home/tacca/.android/avd/Pixel_3_API_28.avd/data/misc/pstore/pstore.bin" emulator: argv[10] = "-cpu" emulator: argv[11] = "android64" emulator: argv[12] = "-enable-kvm" emulator: argv[13] = "-smp" emulator: argv[14] = "cores=4" emulator: argv[15] = "-m" emulator: argv[16] = "1536" emulator: argv[17] = "-lcd-density" emulator: argv[18] = "440" emulator: argv[19] = "-object" emulator: argv[20] = "iothread,id=disk-iothread" emulator: argv[21] = "-nodefaults" emulator: argv[22] = "-kernel" emulator: argv[23] = "/home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//kernel-ranchu-64" emulator: argv[24] = "-initrd" emulator: argv[25] = "/home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//ramdisk.img" emulator: argv[26] = "-drive" emulator: argv[27] = "if=none,index=0,id=system,if=none,file=/home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//system.img,read-only" emulator: argv[28] = "-device" emulator: argv[29] = "virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify" emulator: argv[30] = "-drive" emulator: argv[31] = "if=none,index=1,id=cache,if=none,file=/home/tacca/.android/avd/Pixel_3_API_28.avd/cache.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576" emulator: argv[32] = "-device" emulator: argv[33] = "virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify" emulator: argv[34] = "-drive" emulator: argv[35] = "if=none,index=2,id=userdata,if=none,file=/home/tacca/.android/avd/Pixel_3_API_28.avd/userdata-qemu.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576" emulator: argv[36] = "-device" emulator: argv[37] = "virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify" emulator: argv[38] = "-drive" emulator: argv[39] = "if=none,index=3,id=encrypt,if=none,file=/home/tacca/.android/avd/Pixel_3_API_28.avd/encryptionkey.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576" emulator: argv[40] = "-device" emulator: argv[41] = "virtio-blk-pci,drive=encrypt,iothread=disk-iothread,modern-pio-notify" emulator: argv[42] = "-drive" emulator: argv[43] = "if=none,index=4,id=vendor,if=none,file=/home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//vendor.img,read-only" emulator: argv[44] = "-device" emulator: argv[45] = "virtio-blk-pci,drive=vendor,iothread=disk-iothread,modern-pio-notify" emulator: argv[46] = "-drive" emulator: argv[47] = "if=none,index=5,id=sdcard,if=none,file=/home/tacca/.android/avd/Pixel_3_API_28.avd/sdcard.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576" emulator: argv[48] = "-device" emulator: argv[49] = "virtio-blk-pci,drive=sdcard,iothread=disk-iothread,modern-pio-notify" emulator: argv[50] = "-netdev" emulator: argv[51] = "user,id=mynet" emulator: argv[52] = "-device" emulator: argv[53] = "virtio-net-pci,netdev=mynet" emulator: argv[54] = "-device" emulator: argv[55] = "virtio-rng-pci" emulator: argv[56] = "-show-cursor" emulator: argv[57] = "-L" emulator: argv[58] = "/home/tacca/Android/Sdk/emulator/lib/pc-bios" emulator: argv[59] = "-soundhw" emulator: argv[60] = "hda" emulator: argv[61] = "-vga" emulator: argv[62] = "none" emulator: argv[63] = "-append" emulator: argv[64] = "qemu=1 no_timer_check androidboot.hardware=ranchu androidboot.serialno=EMULATOR30X3X5X0 clocksource=pit no-kvmclock android.qemud=1 console=0 android.checkjni=1 qemu.gles=1 qemu.settings.system.screen_off_timeout=2147483647 qemu.encrypt=1 qemu.vsync=60 qemu.gltransport=pipe qemu.gltransport.drawFlushInterval=800 qemu.opengles.version=131072 cma=292M@0-4G qemu.wifi=1 mac80211_hwsim.channels=2 androidboot.android_dt_dir=/sys/bus/platform/devices/ANDR0001:00/properties/android/ skip_initramfs rootwait ro init=/init loop.max_part=7 dm="1 vroot none ro 1,0 5159992 verity 1 PARTUUID=CE334CE5-4136-4B5C-A16A-F32529669D8B PARTUUID=CE334CE5-4136-4B5C-A16A-F32529669D8B 4096 4096 644999 644999 sha1 260736367b2ac153f34fe2f6f0182b501a8f8fee 5f81fddb8cc753b134fc2901766e57a49cfae566dba7ca48630fdddc30913f84 1 ignore_zero_blocks" androidboot.veritymode=enforcing androidboot.verifiedbootstate=orange root=/dev/dm-0 ramoops.mem_address=0xff018000 ramoops.mem_size=0x10000 memmap=0x10000$0xff018000 qemu.dalvik.vm.heapsize=384m printk.devkmsg=on" emulator: argv[65] = "-android-hw" emulator: argv[66] = "/home/tacca/.android/avd/Pixel_3_API_28.avd/hardware-qemu.ini" Concatenated QEMU options: /home/tacca/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64 -dns-server 127.0.0.53 -mem-path /home/tacca/.android/avd/Pixel_3_API_28.avd/snapshots/default_boot/ram.img -mem-file-shared -serial null -device goldfish_pstore,addr=0xff018000,size=0x10000,file=/home/tacca/.android/avd/Pixel_3_API_28.avd/data/misc/pstore/pstore.bin -cpu android64 -enable-kvm -smp cores=4 -m 1536 -lcd-density 440 -object iothread,id=disk-iothread -nodefaults -kernel /home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//kernel-ranchu-64 -initrd /home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//ramdisk.img -drive if=none,index=0,id=system,if=none,file=/home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//system.img,read-only -device virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify -drive if=none,index=1,id=cache,if=none,file=/home/tacca/.android/avd/Pixel_3_API_28.avd/cache.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify -drive if=none,index=2,id=userdata,if=none,file=/home/tacca/.android/avd/Pixel_3_API_28.avd/userdata-qemu.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify -drive if=none,index=3,id=encrypt,if=none,file=/home/tacca/.android/avd/Pixel_3_API_28.avd/encryptionkey.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=encrypt,iothread=disk-iothread,modern-pio-notify -drive if=none,index=4,id=vendor,if=none,file=/home/tacca/Android/Sdk/system-images/android-28/google_apis_playstore/x86//vendor.img,read-only -device virtio-blk-pci,drive=vendor,iothread=disk-iothread,modern-pio-notify -drive if=none,index=5,id=sdcard,if=none,file=/home/tacca/.android/avd/Pixel_3_API_28.avd/sdcard.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=sdcard,iothread=disk-iothread,modern-pio-notify -netdev user,id=mynet -device virtio-net-pci,netdev=mynet -device virtio-rng-pci -show-cursor -L /home/tacca/Android/Sdk/emulator/lib/pc-bios -soundhw hda -vga none -append 'qemu=1 no_timer_check androidboot.hardware=ranchu androidboot.serialno=EMULATOR30X3X5X0 clocksource=pit no-kvmclock android.qemud=1 console=0 android.checkjni=1 qemu.gles=1 qemu.settings.system.screen_off_timeout=2147483647 qemu.encrypt=1 qemu.vsync=60 qemu.gltransport=pipe qemu.gltransport.drawFlushInterval=800 qemu.opengles.version=131072 cma=292M@0-4G qemu.wifi=1 mac80211_hwsim.channels=2 androidboot.android_dt_dir=/sys/bus/platform/devices/ANDR0001:00/properties/android/ skip_initramfs rootwait ro init=/init loop.max_part=7 dm="1 vroot none ro 1,0 5159992 verity 1 PARTUUID=CE334CE5-4136-4B5C-A16A-F32529669D8B PARTUUID=CE334CE5-4136-4B5C-A16A-F32529669D8B 4096 4096 644999 644999 sha1 260736367b2ac153f34fe2f6f0182b501a8f8fee 5f81fddb8cc753b134fc2901766e57a49cfae566dba7ca48630fdddc30913f84 1 ignore_zero_blocks" androidboot.veritymode=enforcing androidboot.verifiedbootstate=orange root=/dev/dm-0 ramoops.mem_address=0xff018000 ramoops.mem_size=0x10000 memmap=0x10000$0xff018000 qemu.dalvik.vm.heapsize=384m printk.devkmsg=on' -android-hw /home/tacca/.android/avd/Pixel_3_API_28.avd/hardware-qemu.ini emulator: Android qemu version 30.3.5.0 (build_id 7033400) (CL:N/A) emulator: Starting QEMU main loop added library /home/tacca/Android/Sdk/emulator/lib64/vulkan/libvulkan.so cannot add library /home/tacca/Android/Sdk/emulator/lib64/vulkan/libvulkan.so.1: full emulator: Adding boot property: 'ro.opengles.version' = '131072' emulator: Adding boot property: 'qemu.sf.fake_camera' = 'front' emulator: Adding boot property: 'qemu.adb.secure' = '1' emulator: Adding boot property: 'dalvik.vm.heapsize' = '384m' emulator: Adding boot property: 'qemu.hw.mainkeys' = '0' emulator: Adding boot property: 'qemu.sf.lcd_density' = '440' emulator: goldfish_events.have-dpad: false emulator: goldfish_events.have-trackball: false emulator: goldfish_events.have-camera: true emulator: goldfish_events.have-keyboard: true emulator: goldfish_events.have-lidswitch: false emulator: goldfish_events.have-tabletmode: false emulator: goldfish_events.have-touch: false emulator: goldfish_events.have-multitouch: true emulator: control console listening on port 5554, ADB on port 5555 Not using any http proxy emulator: Adding boot property: 'qemu.timezone' = 'America/Sao_Paulo' emulator: android_hw_fingerprint_init: fingerprint qemud listen service initialized emulator: INFO: GrpcServices.cpp:288: Started GRPC server at 127.0.0.1:8554, security: Local emulator: emulator_window_fb_rotate emulator: No acpi ini file provided, using default emulator: No acpi ini file provided, using default emulator: VERBOSE: AdbInterface.cpp:386: Found: 3 adb executables emulator: VERBOSE: AdbInterface.cpp:388: Adb: /home/tacca/Android/Sdk/platform-tools/adb emulator: VERBOSE: AdbInterface.cpp:388: Adb: /home/tacca/Android/Sdk/platform-tools/adb emulator: VERBOSE: AdbInterface.cpp:388: Adb: /usr/bin/adb emulator: VERBOSE: AdbInterface.cpp:410: Path:/home/tacca/Android/Sdk/platform-tools/adb protocol version: 41 emulator: VERBOSE: AdbInterface.cpp:410: Path:/home/tacca/Android/Sdk/platform-tools/adb protocol version: 41 emulator: VERBOSE: AdbInterface.cpp:410: Path:/usr/bin/adb protocol version: 41 emulator: _hwFingerprint_connect: connect finger print listen is called emulator: got message from guest system fingerprint HAL emulator: onGuestSendCommand: [0x8bf9a00] Adb connected, start proxing data emulator: INFO: boot completed emulator: INFO: boot time 17665 ms emulator: Increasing screen off timeout, logcat buffer size to 2M. emulator: Revoking microphone permissions for Google App. emulator: Saving state on exit with session uptime 29060 ms emulator: VERBOSE: MultiDisplay.cpp:189: getMultiDisplay 0x 0 y 0 w 1080 h 2160 dpi 0 flag 0 enable 1 emulator: Done with QEMU main loop emulator: User-config was not changed. emulator: VERBOSE: AdbConnection.cpp:490: Adb transition disconnected -> disconnected ```
MarcusTomlinson commented 3 years ago

Hmm, I just tried this with the latest snap and Android Studio 4.1.2 installed, and worked fine via flutter emulators --launch.

Note that flutter emulators --launch opens the emulator process separate to its own, so the operation may appear to have failed whereas you just need to wait a little longer for the emulator to pop up.

I do notice that my version of emulator is newer than yours as well: Pixel_3a_API_30_x86 vs Pixel_3_API_28

Could you try updating Android Studio as well as fully update the snap like so:

snap refresh flutter --stable
flutter channel dev
flutter upgrade
brunotacca commented 3 years ago

Hello @MarcusTomlinson, thank you for your response

so the operation may appear to have failed whereas you just need to wait a little longer for the emulator to pop up.

At my screen, the emulator appears and closes really fast... The operation indeed failed, the logs shows that it runs shutdown hooks:

[   +1 ms] Android emulator stderr:
[        ] handleCpuAcceleration: feature check for hvf
[        ] cannot add library /home/tacca/Android/Sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed
[        ] added library /home/tacca/Android/Sdk/emulator/lib64/vulkan/libvulkan.so
[        ] cannot add library /home/tacca/Android/Sdk/emulator/lib64/vulkan/libvulkan.so.1: full
[        ] Address these issues and try again.
[+2439 ms] "flutter emulators" took 3,114ms.
[ +255 ms] ensureAnalyticsSent: 252ms
[   +1 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 0

The problem isn't related with the emulator as well (I think), since I tried recreating other versions of it.

I will try to update Android Studio and Snap as you mentioned to see if it's solved, but IMO, I suspect it must be something related with Vulkan files. Which I intend to check when I find some spare time, with a clean install in another computer I have. Might even partition and make another clean install on this one as well, just to verify.

Thanks.

MarcusTomlinson commented 3 years ago

I'm going to close this seeing that we don't seem to have any other reports of this nature. Please feel free to reopen if you uncover any more info. Thanks!

4350pChris commented 3 years ago

Same issue pops up for me. When capturing the debug logs I get the same errors as @brunotacca .

[5:51:54 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.logMessage","params":{"level":"error","message":"The Android emulator exited with code -11 after startup"}}]
[5:51:54 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.logMessage","params":{"level":"error","message":"Android emulator stderr:"}}]
[5:51:54 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.logMessage","params":{"level":"error","message":"handleCpuAcceleration: feature check for hvf"}}]
[5:51:54 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.logMessage","params":{"level":"error","message":"cannot add library /home/chris/Android/Sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed"}}]
[5:51:54 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.logMessage","params":{"level":"error","message":"added library /home/chris/Android/Sdk/emulator/lib64/vulkan/libvulkan.so"}}]
[5:51:54 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.logMessage","params":{"level":"error","message":"cannot add library /home/chris/Android/Sdk/emulator/lib64/vulkan/libvulkan.so.1: full"}}]
[5:51:54 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.logMessage","params":{"level":"error","message":"Xlib: sequence lost (0x1001a > 0x1c) in reply type 0x0!"}}]
[5:51:54 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.logMessage","params":{"level":"error","message":"Xlib: sequence lost (0x1001f > 0x21) in reply type 0x0!"}}]
[5:51:54 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.logMessage","params":{"level":"error","message":"Xlib: sequence lost (0x10024 > 0x26) in reply type 0x0!"}}]
[5:51:54 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.logMessage","params":{"level":"error","message":"Address these issues and try again."}}]

My setup:

Flutter:

Flutter 2.1.0-12.1.pre • channel dev • https://github.com/flutter/flutter.git
Framework • revision 8264cb3e8a (4 days ago) • 2021-03-10 12:37:57 -0800
Engine • revision 711ab3fda0
Tools • Dart 2.13.0 (build 2.13.0-116.0.dev)