wslg icon indicating copy to clipboard operation
wslg copied to clipboard

Unable to run android emulator

Open n1h41 opened this issue 3 years ago • 18 comments

Windows build number:

22621.0

Your Distribution version:

20.04

Your WSL versions:

WSL version: 0.64.0.0 Kernel version: 5.10.102.1 WSLg version: 1.0.40 MSRDC version: 1.2.3213 Direct3D version: 1.601.0 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22621.382

Steps to reproduce:

  1. start android studio
  2. open virtual device manager
  3. try running an emulator

WSL logs:

No response

WSL dumps:

No response

Expected behavior:

Start android emulator in Ubuntu installed in wsl

Actual behavior:

2022-09-24 16:27:56,027 [ 17655] WARN - #com.intellij.ui.jcef.JBCefApp - JCEF runtime library is not a JBR module (Use JBR bundled with the IDE) 2022-09-24 16:27:56,194 [ 17822] WARN - ulator: Pixel_3a_API_33_x86_64 - cannot add library /home/nihal/Android/Sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed 2022-09-24 16:27:56,786 [ 18414] WARN - ulator: Pixel_3a_API_33_x86_64 - *** No gRPC protection active, consider launching with the -grpc-use-jwt flag.***

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00007faa56a4f581, pid=13494, tid=13548

JRE version: OpenJDK Runtime Environment (11.0.13) (build 11.0.13+0-b1751.21-8125866) Java VM: OpenJDK 64-Bit Server VM (11.0.13+0-b1751.21-8125866, mixed mode, tiered, compressed oops, g1 gc, linux-amd64) Problematic frame: C [libnvwgf2umx.so+0x1a47581]

No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

An error report file with more information is saved as: /home/nihal/java_error_in_studio_13494.log

n1h41 avatar Sep 24 '22 11:09 n1h41

@n1h41, thanks for reporting the issue, below looks indicate this is an issue within NVIDIA GPU driver, would you please try with GPU disabled and see if it works? thanks!

Problematic frame:
C [libnvwgf2umx.so+0x1a47581]

hideyukn88 avatar Oct 12 '22 23:10 hideyukn88

I have same problem.

ZdenekKrcal avatar Oct 25 '22 10:10 ZdenekKrcal

@ZdenekKrcal, how do you run the emulator? is it from AVD from Android Studio? Or more like with the steps described at https://github.com/microsoft/wslg/issues/802? And if disabling Display Driver from Window's device manager makes any difference? thanks!

hideyukn88 avatar Oct 25 '22 12:10 hideyukn88

@ZdenekKrcal, how do you run the emulator? is it from AVD from Android Studio? Or more like with the steps described at #802? And if disabling Display Driver from Window's device manager makes any difference? thanks!

It is AVD from Android Studio. What exactly I shoud disable? I can see in Display driver my drivers for NVDIA (RTX 3080 Ti Laptop GPU)

ZdenekKrcal avatar Oct 25 '22 13:10 ZdenekKrcal

@ZdenekKrcal, please disable that NVIDIA driver, and shutdown WSL by wsl --shutdown, and try again, thanks!

hideyukn88 avatar Oct 25 '22 14:10 hideyukn88

@hideyukn88 so it didn't help. And i recived this in console:

2022-10-26 12:17:17,241 [ 11430] WARN - #com.intellij.ui.jcef.JBCefApp - JCEF runtime library is not a JBR module (Use JBR bundled with the IDE) 2022-10-26 12:17:17,288 [ 11477] WARN - ulator: Pixel_3a_API_33_x86_64 - cannot add library /home/zdenek/Android/Sdk/emulator/qemu/linux-x86_64/lib64/vulkan/libvulkan.so: failed 2022-10-26 12:17:17,517 [ 11706] WARN - ulator: Pixel_3a_API_33_x86_64 - *** No gRPC protection active, consider launching with the -grpc-use-jwt flag.***

I have another driver active yet. Is it problem? Intel(R) UHD Graphics - this is active NVIDIA Geforce RTX 3080 Ti Laptop GPU - this is disabled

And of course Im talking about Android Studio with emulator installed in WSL2 (WSLg). And I have installed Android Studio with emulator on classic WINDOWS 11 as well.

On windows version everything works well but in WSLg is problem.

ZdenekKrcal avatar Oct 26 '22 10:10 ZdenekKrcal

@hideyukn88 And one important thing. I can run emulator when I create project in Android Studio. In that case everything works fine. Problem is when I want run only Emulator and close Android Studio. I build apps by flutter in VS Code but emulator can't run in that case as standalone.

ZdenekKrcal avatar Oct 27 '22 07:10 ZdenekKrcal

I have the same problem. The emulator can run inside the android studio like inside the application however when run in separate window, it crashes and produce the same error.

Mtlayones avatar Nov 01 '22 14:11 Mtlayones

@ZdenekKrcal, @Mtlayones, the fix for that is in WSLg 1.0.47, and it is now included in WSL 0.70.8, https://github.com/microsoft/WSL/releases/tag/0.70.8, which is still prerelease state, thanks!

hideyukn88 avatar Nov 14 '22 17:11 hideyukn88

@hideyukn88 great, looking forward to it.

ZdenekKrcal avatar Nov 14 '22 18:11 ZdenekKrcal

@hideyukn88 Hi, so it is working now but I have another problem. Control panel for controling emulator like changing emulator to landscape etc. is disabled. I can see panel but it doesn't make any reaction. All buttons are disabled.

ZdenekKrcal avatar Dec 03 '22 20:12 ZdenekKrcal

@hideyukn88 Hi, so it is working now but I have another problem. Control panel for controling emulator like changing emulator to landscape etc. is disabled. I can see panel but it doesn't make any reaction. All buttons are disabled.

same issue for me

Mtlayones avatar Dec 28 '22 17:12 Mtlayones

@ZdenekKrcal, @Mtlayones, thanks for reporting the issue, and yes, we are aware of that issue and looking into the solution, currently the best workaround is to run emulator in docked mode with Android Studio IDE, thanks!

hideyukn88 avatar Dec 28 '22 18:12 hideyukn88

Android studio 可以运行,但是显示"Emulator: WARNING | *** No gRPC protection active, consider launching with the -grpc-use-jwt flag.***" 该如何解决? 0I0E5CBDFY {{(X{AEDSIZW

FXnadu avatar Apr 04 '23 09:04 FXnadu

Any update?

ZdenekKrcal avatar Oct 19 '23 11:10 ZdenekKrcal

Still not solved yet

maximosdrr avatar Jul 02 '24 19:07 maximosdrr

I thought I had added a note here, sorry; a workaround is to run an X11 server (such as VcXsrv) and use the DISPLAY variable to show the emulator through X11. I get working buttons if I do that.

(Note: I'm not a WSL maintainer- just commenting my workaround in case people arrive to this issue via Google, so they find a fix. I have no opinion on whether the ticket should be addressed more properly or not.)

alexveecle avatar Jul 03 '24 08:07 alexveecle