Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"message": "Could not get Virtual Machine for Mobile Emulator 10.0.10240.0 WVGA 4 inch 512MB" #124

Closed
WiniumLover opened this issue Dec 21, 2015 · 9 comments

Comments

@WiniumLover
Copy link

Hi,
I am using the winium latest version Winium.StoreApps-1.5.0 as well as direct copy from master branch. Initially all my app deployment and tests were running fine but recently noticed that both the versions end up with the below issue. Could you please advise me why on this issue?

"message": "Could not get Virtual Machine for Mobile Emulator 10.0.10240.0 WVGA 4 inch 512MB"

Noted that application deployment went fine without any issue but it failed when it try to create new session for testing.

winium

@WiniumLover
Copy link
Author

After the analysis, found that the below code in emulator controller constructor(EmulatorController.cs) gives this issue. so after commenting the line, code started working fine without any issues but this might impact when finding elements but not sure.. so this is just a workaround and looking for a permanent fix for this if any.

this.PhoneScreenSize = this.emulatorVm.GetCurrentResolution();

@NickAb
Copy link
Contributor

NickAb commented Dec 21, 2015

So, if I understand correctly it throws exception when

this.PhoneScreenSize = this.emulatorVm.GetCurrentResolution();

is called at EmulatorController.cs#L54.

This is strange, because I have tested it against Mobile 10 Emulators and it worked fine.
Catching all XdeVirtualMachineException prevents from seeing the original exception. I will need more info on what happens at this point.
Could you please uncomment this line and add error logging in catch block at EmulatorController.cs#L56-L61. This will help me a lot, as I am not able to reproduce this exception directly.

@WiniumLover
Copy link
Author

@NickAb , sure will do and update you on this.

@WiniumLover
Copy link
Author

@NickAb , I have added generic Exception type in catch block and found the below message. Please let me know if you need any more details.

Microsoft.Xde.Wmi.XdeVirtualMachineException: Couldn't find
a display controller on the system.
at Microsoft.Xde.Wmi.XdeVirtualMachine.GetCurrentResolution()
at Winium.Mobile.Connectivity.Emulator.VirtualMachine.GetCurrentResolution()
in C:\Prabhu\Winium.StoreApps-1.5.0\Winium\Winium.Mobile.Connectivity\Emulator\V
irtualMachine.cs:line 59
at Winium.Mobile.Connectivity.Emulator.EmulatorController..ctor(String emulat
orName) in C:\Prabhu\Winium.StoreApps-1.5.0\Winium\Winium.Mobile.Connectivity\Em
ulator\EmulatorController.cs:line 54

@NickAb
Copy link
Contributor

NickAb commented Dec 22, 2015

@WiniumLover, I've just ran tests on same emulator version as in your logs without any issue, considering that you wrote that

tests were running fine but recently noticed

I think this is specific to your system. I would recommend to try these options:

  1. restart the host machine or Hyper-V service
  2. try running driver as administrator
  3. repair Windows 10 SDK installation

@WiniumLover
Copy link
Author

@NickAb , thanks for the suggestion. many times I have reinstalled hyper-v but not luck. but I could try option 2 or 3. will let you know my findings.

@WiniumLover
Copy link
Author

@NickAb , after re-installing the Windows SDK and Emulators, started working fine. Please feel free to close this issue.

@NickAb
Copy link
Contributor

NickAb commented Dec 22, 2015

I have opened a new issue #126 on logging of underlying exception, so that it would be easier to understand what the problem is if it occurs for someone in future

@NickAb NickAb closed this as completed Dec 22, 2015
@WiniumLover
Copy link
Author

@NickAb , perfect thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants