imsardine / winappdriver

WebDriver for Windows Applications
MIT License
119 stars 11 forks source link

Cannot run WinAppDriver.exe, returns "A referral was returned from the server" #11

Closed nalai closed 9 years ago

nalai commented 9 years ago

Hi all,

I am trying to get my environment set up for running WinAppDriver. I have built with .NET Framework 4.0 and the windows 8.1 64-bit kit. However, when I try to execute WinAppDriver.exe, which was built and deployed to the Debug folder, it simply gives me an error "A referral was returned from the server".

I have followed the instructions on your slides but the 5th slide is quite vague as to how I should configure my firewall and what certificates need to be installed. I installed the .cer and the .spc certificates, but the .pfx certificate is protected by a private password.

EDIT: I ran the netsh command, but still getting the same error.

Any help would be appreciated, Thanks

nalai commented 9 years ago

I resolved the problem. I think that it needs to be explained that in order to run a program that has uiaccess=true in the manifest, e.g. any program that uses windows accessibility options, it needs to be run as administrator. The msbuild command, which copies files to Program Files, also has to be run as administrator, as it requires access to Program Files.

I also had to change the program manifest file to point to my current user; I had to change the {YourUserNameHere} manually. And I had to create the log directory inside of AppData as well.

imsardine commented 9 years ago

Hi Nathaniel,

Thanks for your feedback and interest in the project.

The error message "A referral was returned from the server." indicates that the self-signed signature of the executable (WinAppDriver.exe) is not trusted, and you have to install WinAppDriver Test Certificate (WinAppDriver.cer) to Trusted Root Certificate Authorities store.

To gain UIAccess privilege, the program must be launched from a secure location that is writable only by administrators. Please consult https://msdn.microsoft.com/en-us/library/bb625963.aspx for what secure location exactly means.

Actually, you must not run the program as an administrator, or some operations may behave unexpectedly.

Sorry for the documentation provided is not clear enough. We know the installation process is quite tedious and error-prone, so we're going to create an installer to simplify the process.