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

A packaging error thrown when deploying universal windows application #116

Open
dnovikau opened this issue Dec 7, 2015 · 5 comments
Open

Comments

@dnovikau
Copy link

dnovikau commented Dec 7, 2015

Steps to reproduce:

  1. Download latest version of 'Winium.StoreApps' from https://github.com/2gis/Winium.StoreApps
    image
  2. Bulid the solution and start StoreApp.Driver from '\Winium.StoreApps.Driver\bin\x86\Debug' folder
  3. Create new Blank app (Universal Windows) project
    image
  4. Added Reference to 'InnerServer' project
    image
  5. Try to deploy UWP app with the following capabilities
    image

Expected behavior: Emulator is started and app is deployed successfully
Actual behavior: emulator(Mobile Emulator 10.0.10240.0 WVGA 4 inch 512MB) is started but app is not deployed due to exceptio - 'A packaging error prevented this application from installing. (33)'

Console output for StoreApps.Driver is following:
image

note: additional logging output was added to the place where exception is thrown

@dnovikau dnovikau closed this as completed Dec 8, 2015
@dnovikau
Copy link
Author

dnovikau commented Dec 8, 2015

Described error happened due to the framework was trying to deploy dependencies build for not suitable architecture (ARM, x64) when application is build for x86. Work around is to remove specified folders from 'Dependencies' directory.

@NickAb
Copy link
Contributor

NickAb commented Dec 9, 2015

Thanks for additional information.

Turns out I was testing it on package that contains build for x86 only. I will look if it could be fixed on our side, or if it is on MS libraries side.
Until then creating store package with x86 only should work.

I think we should try to pick correct dependencies automatically, so I have reopened your issue.

@dnovikau
Copy link
Author

One more update to current issue:

  1. First time exception is been thrown because of discrepancy between expected and actual package types (in my case 'manifestInfo.PackageType' = 'XAP, Main') in the following place:
    image

in order to let the code go forward and enforce trying to deploy UWP app I had to comment this verification -> then i found that deployment will fail on installing dependencies

@sargissargsyan
Copy link
Contributor

I have the same issue. It creates x64 and ARM even if the options are unchecked in Create app packages. After removing x64 and ARM from discrepancies folder it still trows expatiation:

{
  "sessionId": "40cc8c95-ff49-4573-9b46-4d00198a8c04",
  "status": 33,
  "value": {
    "error": "session not created",
    "stacktrace": "   at Winium.Mobile.Driver.CommandExecutors.NewSessionExecutor.DoImpl() in c:\\Dev\\Winium.StoreApps\\Winium\\Winium.Mobile.Driver\\CommandExecutors\\NewSessionExecutor.cs:line 38\r\n   at Winium.Mobile.Driver.CommandExecutors.CommandExecutorBase.Do() in c:\\Dev\\Winium.StoreApps\\Winium\\Winium.Mobile.Driver\\CommandExecutors\\CommandExecutorBase.cs:line 42",
    "message": "A packaging error prevented this application from installing."
  }
}

@NickAb
Copy link
Contributor

NickAb commented Dec 4, 2016

One workaround I was able to find was to deploy .appx using Visual Studio to the emulator you want to test on. This will make sure that all dependencies, including framework are satisfied. Then you should make a snapshot of the emulator using XDE tools window and set this snapshot as default boot state for the emulator.
After completing these steps driver should be able to deploy .appx without errors, if the problem was in dependencies.

Internally we use same libraries which are used by AppDeploy tool form Microsoft which itself did not support new UWP packages, so we patched it to make it work with basic packages. If someone have a time to research how Visual Studio does deployment or how it is done using new tools from Windows 10 SDK, we would really appreciate any help. But new tools from Windows 10 Mobile SDK requires pairing of devices and host system to be able to deploy, these includes manual entry of PIN code, which might make environment setup for test runs on emulators very laborious and fragile.

Unfortunately we do not have complex UWP app for Windows 10 to test this and we stopped our mobile app development at Store Apps for Windows 8.1, which seems to deploy both to Windows Phone 8.1 and Windows 10 Mobile without any problem.

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

No branches or pull requests

3 participants