Code Monkey home page Code Monkey logo

Comments (5)

NickAb avatar NickAb commented on May 26, 2024

The error looks very strange, as XML is not used directly in driver, except for GetPageSource command and application deployment step.

To debug this case could you please try deploying the same .appx file using Windows Phone Application Deployment 8.1 from C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Phone SDK 8.1.

Driver logs will help a lot. You can either run driver with --verbose command and copy console output or run driver with --log-path option to save logs to file. Try Winium.StoreApps.Driver.exe --help for more help on command line options.

from winium.mobile.

rahulLiving avatar rahulLiving commented on May 26, 2024

I am using Windows 10 phone emulator (it supports windows 10 right?) , i am able to deploy it on emulator manually.

And while running with Winium.StoreApps.Driver.exe --help command, i got the below log.

11:09:57 [INFO] Winium.StoreApps.Driver, Version: 1.3.0.16463, Revision: 9a55686
Starting Winium.StoreApps.Driver on port 9999

11:09:58 [DEBUG] Waiting for a connection...
11:09:39 [DEBUG] ACCEPTED REQUEST POST /session HTTP/1.1
11:09:39 [INFO] COMMAND newSession
{
"desiredCapabilities": {
"app": "C:\Automation\KitchenSink.appx"
}
}
11:09:40 [INFO] Target emulator: Mobile Emulator 10.0.10240.0 WVGA 4 inch 512MB
11:09:40 [DEBUG] RESPONSE:
OK: {"sessionId":"AwesomeSession","status":13,"value":{"error":"unknown error","stacktrace":" at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)\r\n at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)\r\n at Microsoft.Phone.Tools.Appx.Package.LoadFromStream(Stream stream, Boolean fromBundle)\r\n at Microsoft.Phone.Tools.Deploy.Utils.ReadAppManifestInfoFromAppxStream(Stream packageStream, Boolean fromBundle)\r\n at Microsoft.Phone.Tools.Deploy.Utils.ReadAppManifestInfoFromAppx(String packagePath)\r\n at Microsoft.Phone.Tools.Deploy.Utils.ReadAppManifestInfoFromPackage(String path)\r\n at Winium.StoreApps.Driver.EmulatorHelpers.Deployer81.get_AppManifestInfo() in d:\Projects\windows-universal-app-driver\Winium\Winium.StoreApps.Driver\EmulatorHelpers\Deployer81.cs:line 93\r\n at Winium.StoreApps.Driver.EmulatorHelpers.Deployer81.Install() in d:\Projects\windows-universal-app-driver\Winium\Winium.StoreApps.Driver\EmulatorHelpers\Deployer81.cs:line 121\r\n at Winium.StoreApps.Driver.Automator.Automator.InitializeApp() in d:\Projects\windows-universal-app-driver\Winium\Winium.StoreApps.Driver\Automator\Automator.cs:line 156\r\n at Winium.StoreApps.Driver.CommandExecutors.NewSessionExecutor.DoImpl() in d:\Projects\windows-universal-app-driver\Winium\Winium.StoreApps.Driver\CommandExecutors\NewSessionExecutor.cs:line 20\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":"There is an error in XML document (2, 2)."}}
11:09:40 [DEBUG] Client closed

11:09:40 [DEBUG] Waiting for a connection...

from winium.mobile.

NickAb avatar NickAb commented on May 26, 2024

It was not tested with Windows 10 Phones yet, but we expected it to work with Windows 10 without any major modifications. The problem seems to be caused by the fact that Driver uses old Microsoft.Phone.Tools.Deploy library shipped with WP 8.1 SDK.

If you successful deployed application manually using Application Deployment tool, then you can try to look if there is a newer version of Microsoft.Phone.Tools.Deploy is shipped with app deployment tool and replace old versions (shipped with driver) by new version from you system files, but this is a wild guess.

I will be able to take a closer look at supporting Windows 10 somewhere after September 14th.

from winium.mobile.

NickAb avatar NickAb commented on May 26, 2024

The problem is due AppManifest.xml format changes, including some changes in namespace and tag names.

To deserialize app manifest Package class from C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\AppDeploy\Microsoft.Phone.Tools.Deploy.dll is used. Due to coupling in this assembly I had to basically copy and modify whole Utils and related classes from this assembly.

This fixed reading xml file, but when underlying SmartDevice Connectivity methods are called to install dependencies or app itself, then it fails with exception "Package failed updates, dependency or conflict validation".
Installing package using VS 2015 first (to install dependencies), removing it and running deployment programmatically did install the app, but it failed to launch correctly.

from winium.mobile.

NickAb avatar NickAb commented on May 26, 2024

There is WinAppDeploy shipped with Windows 10 SDK. This tool seems to be an official way to side load apps to devices. There is one major downside, it requires pairing device with host first, i.e. before using driver with emulator one will have to pair emulator to host and create default checkpoint after that.

from winium.mobile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.