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

Error:"Could not get Virtual Machine for Emulator 8.1 WVGA 4 inch 512MB" #78

Open
padmaja2812 opened this issue Aug 1, 2016 · 9 comments

Comments

@padmaja2812
Copy link

I am trying to setup winium on a VM.
App is getting installed on emulator but outer driver is giving about exception and hence remotedriver value is null.
When i looked into outerdriver code
in EmulatorFactory.cs in GetVm()
vm = wmiFactory.GetVirtualMachine(fullName); //returning Null
hence throwing exception.
Is there any specific setting for running Winium on a VM ?
Please help me out with this issue.

Thanks
Padmaja

@NickAb
Copy link
Contributor

NickAb commented Aug 1, 2016

Are you using English version of Windows or an localised version?

Could you please run WinAppDeployCmd.exe devices from the location where Windows Application Deployment tool is installed. Also, please provide driver logs so that it is easier to pinpoint the problem.

@padmaja2812
Copy link
Author

padmaja2812 commented Aug 1, 2016

Hi Nick,
Below is output for language and the devices in WinAppDeployCmd.exe devices .

C:\Program Files (x86)\Windows Kits\10\bin\x86>dism /online /get-intl

Deployment Image Servicing and Management tool
Version: 10.0.10586.0

Image Version: 10.0.10586.0

Reporting online international settings.

Default system UI language : en-US
System locale : en-US
Default time zone : India Standard Time
Active keyboard(s) : 0409:00000409
Keyboard layered driver : PC/AT Enhanced Keyboard (101/102-Key)

*Installed language(s): en-US*
*  Type : Fully localized language.*

The operation completed successfully.

C:\Program Files (x86)\Windows Kits\10\bin\x86>WinAppDeployCmd.exe devices
Windows App Deployment Tool
Version 10.0.0.0
Copyright (c) Microsoft Corporation. All rights reserved.

Discovering devices...
IP Address GUID Model/Name
Done.

Log for WiniumPhone.OuterServer

 14:05:51 [DEBUG] Waiting for a connection...
14:06:00 [DEBUG] ACCEPTED REQUEST POST /session HTTP/1.1
14:06:00 [INFO] COMMAND newSession
{"desiredCapabilities":{"app":"C:\\Stargate_Windows\\Application\\SanitySuite.xap","DeviceName":"Emulator
8.1 WVGA 4 inch 512MB"}}
14:07:03 [INFO] Target emulator: 'Emulator 8.1 WVGA 4 inch 512MB'
14:07:19 [INFO] KonyWP7 was successfully deployed using
Microsoft.Phone.Tools.Deploy
14:07:27 [INFO] Emulator 'Emulator 8.1 WVGA 4 inch 512MB.admin' not found
in cache. Requesting WMI.
14:07:35 [INFO] Emulator 'Emulator 8.1 WVGA 4 inch 512MB.admin' not found
in cache. Requesting WMI.
14:07:42 [DEBUG] RESPONSE:
OK:
{
  "sessionId": "AwesomeSession",
  "status": 13,
  "value": {
    "error": "unknown error",
    "stacktrace": "   at
Winium.Mobile.Connectivity.Emulator.EmulatorController..ctor(String
emulatorName)\r\n   at
WindowsPhoneDriver.OuterDriver.Automator.Automator.CreateEmulatorController(Boolean
withFallback) in
C:\\Stargate_Windows\\WiniumPhone8.1\\winphonedriver\\WindowsPhoneDriver\\WindowsPhoneDriver.OuterDriver\\Automator\\Automator.cs:line
127\r\n   at
WindowsPhoneDriver.OuterDriver.CommandExecutors.NewSessionExecutor.InitializeApplication(Boolean
debugDoNotDeploy) in
C:\\Stargate_Windows\\WiniumPhone8.1\\winphonedriver\\WindowsPhoneDriver\\WindowsPhoneDriver.OuterDriver\\CommandExecutors\\NewSessionExecutor.cs:line
81\r\n   at
WindowsPhoneDriver.OuterDriver.CommandExecutors.NewSessionExecutor.DoImpl()
in
C:\\Stargate_Windows\\WiniumPhone8.1\\winphonedriver\\WindowsPhoneDriver\\WindowsPhoneDriver.OuterDriver\\CommandExecutors\\NewSessionExecutor.cs:line
30\r\n   at
WindowsPhoneDriver.OuterDriver.CommandExecutors.CommandExecutorBase.Do() in
C:\\Stargate_Windows\\WiniumPhone8.1\\winphonedriver\\WindowsPhoneDriver\\WindowsPhoneDriver.OuterDriver\\CommandExecutors\\CommandExecutorBase.cs:line
45",
    "message": "Could not get Virtual Machine for Emulator 8.1 WVGA 4 inch
512MB"
  }
}

Thanks
Padmaja

On 1 August 2016 at 18:30, Nick Abalov [email protected] wrote:

Are you using English version of Windows or an localised version?

Could you please run WinAppDeployCmd.exe devices from the location where
Windows Application Deployment tool is installed. Also, please provide
driver logs so that it is easier to pinpoint the problem.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#78 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACLuhOcBwO35_MzaUOXwkEgEpx3l4agmks5qbe30gaJpZM4JZXah
.

@NickAb
Copy link
Contributor

NickAb commented Aug 2, 2016

Could you please run WinAppDeployCmd from 8.1 kit? (as you are trying to deploy to 8.1 emulator). It should print out list of devices, emulator you are trying to deploy should be among the items on the list.

Also, try running Hyper-V Manager and checking if Emulator 8.1 WVGA 4 inch 512MB.admin does exists and named exactly as above.

@padmaja2812
Copy link
Author

There is not such exe in 8.1 kit.Is there any other way i can find out same?

I have checked in Hyper-v this emulator is running.

Thanks
Padmaja

On 2 August 2016 at 06:56, Nick Abalov [email protected] wrote:

Could you please run WinAppDeployCmd from 8.1 kit? (as you are trying to
deploy to 8.1 emulator). It should print out list of devices, emulator you
are trying to deploy should be among the items on the list.

Also, try running Hyper-V Manager and checking if Emulator 8.1 WVGA 4
inch 512MB.admin does exists and named exactly as above.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#78 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACLuhBM4MzpzTolMHcL7F1ba5jtD9oGvks5qbpywgaJpZM4JZXah
.

@NickAb
Copy link
Contributor

NickAb commented Aug 2, 2016

My mistake, in 8.1 it is called AppDeployCmd.exe. It should be located at "C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\AppDeploy\AppDeploy.exe"

@padmaja2812
Copy link
Author

Hi Nick,
Sorry for the delay.

C:\Program Files (x86)\Microsoft SDKs\Windows
Phone\v8.1\Tools\AppDeploy>AppDeployCmd.exe /EnumerateDevices

Device Index Device Name


0 Device
1 Mobile Emulator 10.0.10586.0 WVGA 4 inch 512MB
2 Mobile Emulator 10.0.10586.0 WVGA 4 inch 1GB
3 Mobile Emulator 10.0.10586.0 WXGA 4.5 inch 1GB
4 Mobile Emulator 10.0.10586.0 720p 5 inch 1GB
5 Mobile Emulator 10.0.10586.0 1080p 6 inch 2GB
6 Mobile Emulator 10.0.10586.0 QHD 5.2 inch 3GB
7 * Emulator 8.1 WVGA 4 inch 512MB*
8 Emulator 8.1 WVGA 4 inch
9 Emulator 8.1 WXGA 4.5 inch
10 Emulator 8.1 720P 4.7 inch
11 Emulator 8.1 1080P 5.5 inch
12 Emulator 8.1 1080P 6 inch
Done.

I am able to get the emulator with this command.
Is there any other setting which i need to enable?

Thanks
Padmaja

On 2 August 2016 at 12:05, Nick Abalov [email protected] wrote:

My mistake, in 8.1 it is called AppDeployCmd.exe. It should be located
at"C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\AppDeploy
AppDeploy.exe"


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#78 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACLuhIT69FhRoRsMyJde7tcJgamKhdcMks5qbuUxgaJpZM4JZXah
.

@NickAb
Copy link
Contributor

NickAb commented Aug 10, 2016

After trying to run tests, do you have Emulator 8.1 WVGA 4 inch 512MB.admin in the list of virtual machines in Hyper-V Manager?

@padmaja2812
Copy link
Author

Yes it is showing.

On Aug 10, 2016 12:22 PM, "Nick Abalov" [email protected] wrote:

After trying to run tests, do you have Emulator 8.1 WVGA 4 inch
512MB.admin in the list of virtual machines in Hyper-V Manager?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#78 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACLuhGVeMcP5N9xvlNf5TtWxze7Gqq1Qks5qeXUhgaJpZM4JZXah
.

@NickAb
Copy link
Contributor

NickAb commented Aug 15, 2016

Does the emulator has exactly .admin at the end of the name in Hyper-V Manager? Please make sure that both emulator and driver are started from the same user. Try closing the emulator and restarting tests, or pick another emulator name and see what happens. This seems to be unusual situation.

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