Winium.Mobile
Winium.Mobile copied to clipboard
Could not connect to the InnerServer issue in Windows10 application on Windows 10 host system
Hello @NickAb I am using Windows 10 host machine,have instrumented my windows 10 application using Winium.Innerserver(1.6.2) properly.I have set Internet(Client&Server) capability as well.Have tested it succesfully from Windows 8 host system.But when I try to deploy same application using Winium.Inspector on Windows10 host system,it gets deployed suceessfully.But Winium.inspector is unable to connect to the Winium.Inerserver started with my application. I am getting an error:Unble to connect to the innerserver.
Please help me in resolving this. Thanks and Regards, Pranoday
Have you tried enabling Developer mode? https://msdn.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development
@NickAb .I have developer mode enabled in my Windows emulator as well as on Windows 10 host system.I tried with disabling Firewall on my Windows 10 host system as well.But nothing could work.
@NickAb I have also confirmed following things: 1.My application is instrumented with latest Winium.StoreAppps.Inerserver(1.6.2) 2.I don't have any other service running on port 9998 using which Winium.StoreApps.Driver communicates to InnerServer. Everything looks fine but still unable to connect to Winium.Innerserver
Just to clarify, it works (you can run tests) on Windows 8, but does not work on Windows 10 host system. Is it right?
Note that InnerServer does not listen on 9998 since v1.3.0, it uses dynamic port. It binds to any free port and writes the port number into .Winium.StoreApps.ConnectionInformation.json
file in app's temporary storage.
It works on Windows 8.I can run tests on Windows 8 host system.Problem is only on Windows 10 host system.What could be the possible reason?
@NickAb Any idea about this?
Please provide log output of the driver launched with --verbose
flag. You can use --log-pathfile LOG.txt
to log directly to file and copy paste into reply.
Also, could you please try the following steps?
-
Install IsoStoreSpy https://isostorespy.codeplex.com
-
Deploy the app under test to emulator
-
Using IsoStoreSpy locate
.Winium.StoreApps.ConnectionInformation.json
file in temp storage of the app -
Note the port number specified in the json file
-
Try sending
HTTP POST
request tohttp://localhost:<port>
with following body{ "name": "ping", "parameters": {} }
It should respond with <pong>
.
@NickAb I will try and get back to you with my findings.
@NickAb Please see the error I am getting.
Also please see the log report I am getting. 15:44:21 [INFO] Winium.StoreApps.Driver, Version: 1.6.2.15006, Revision: efb0b81ea01243d898fcba88f99ca7513b7925ac 15:44:21 [INFO] RemoteWebDriver instances should connect to: http://localhost:10001/ 15:44:21 [DEBUG] Waiting for a connection... 15:44:39 [DEBUG] ACCEPTED REQUEST POST /session HTTP/1.1 15:44:39 [INFO] COMMAND newSession { "desiredCapabilities": { "app": "D:\Magic\UP2\RIAModules\Windows10Mobile\MagicDev\MagicApp_1.0.0.0_x86.appx" } } 15:44:43 [INFO] Target emulator: 'Mobile Emulator 10.0.10586.0 720p 5 inch 1GB' 15:44:44 [INFO] my.application was successfully deployed using Microsoft.Phone.Tools.Deploy 15:44:44 [INFO] Emulator 'Mobile Emulator 10.0.10586.0 720p 5 inch 1GB.krishanc' not found in cache. Requesting WMI. 15:45:40 [DEBUG] Connected in 50.4305935 seconds. 15:45:40 [DEBUG] RESPONSE: OK: { "sessionId": "ab4ee0e5-d0d1-47fc-b11b-33c3d09a6d16", "status": 33, "value": { "error": "session not created", "stacktrace": " at Winium.StoreApps.Driver.CommandExecutors.NewSessionExecutor.DoImpl() in d:\Projects\windows-universal-app-driver\Winium\Winium.StoreApps.Driver\CommandExecutors\NewSessionExecutor.cs:line 38\r\n at Winium.StoreApps.Driver.CommandExecutors.CommandExecutorBase.Do() in d:\Projects\windows-universal-app-driver\Winium\Winium.StoreApps.Driver\CommandExecutors\CommandExecutorBase.cs:line 42", "message": "Could not connect to the InnerServer." } } 15:45:40 [DEBUG] Client closed
15:45:40 [DEBUG] Waiting for a connection...
- Please check if you correctly embedded InnerServer into your application. You should call
AutomationServer.Instance.InitializeAndStart();
from UI thread once your app starts. - Check if you enabled
Internet Server
orInternet (Client & Server)
capability in your app
@NickAb I am unable to connect to the Winium.StoreApps.Innerserver eventhough I have followed the procedure you mentioned above correctly.Any help would be appreciated.
Thanks
Could you please build and test app and run sample tests from our python suite?
This will help determinate if there is a problem specific to your app or system. Also, our test app prints out port number on which inner server listens, so you should be able to test connection manually.
@NickAb I have built the .appx for test app but I am unable to run Python test on it.Can you please guide me on this?
Thanks and Regards, Pranoday