microsoft / TemplateStudio

Template Studio accelerates the creation of new WinUI 3, WPF, and UWP apps using a wizard-based experience.
Other
2.68k stars 459 forks source link

Almost all WACK tests fail #3120

Closed ChrisKolan closed 5 years ago

ChrisKolan commented 5 years ago

I created a simple WindowsTemplateStudio application with Horizontal Navigation Pane, basic MVVM design pattern, additional settings page, and Features: SettingsStorage and ThemeSelection. That simple application template fails almost all WACK tests. Only 6 tests pass (Package size, Resource Packages, Banned file analyzer, Private code signing, Debug configuration, Special use capabilities).

Based on that template I also created a simple application and wanted to publish it in Microsoft Store. The application was rejected due to the failing WACK tests. I see that there are currently some problems with WACK tests. Are there some plans in the near future to make all WACK tests pass again?

System

sibille commented 5 years ago

Could you give us more details on what fails for the wack tests, they passed this morning on the dev branch. https://github.com/Microsoft/WindowsTemplateStudio/blob/vsts-builds/docs/vsts-builds/142.md

ChrisKolan commented 5 years ago

Tests that fail:

"App Policies: 10.4.2 App Crash or Freeze

Notes To Developer

Unfortunately, we can’t test the app, because the app crashes at launch.

Tip: A Windows app may run flawlessly during development and testing, but after submitting it for certification testing, the app may crash or perform unexpectedly. Along these same lines, your app may not perform as expected after publication. You can contact Developer Support at http://aka.ms/storesupport if you need assistance with troubleshooting.

Tested Devices: Dell Inspiron 12-5280, Sony Vaio Duo 11 (SVD112A1ST), Xbox One)"

I don't know how can I reproduce this bug. I tested the app on two different machines and it starts and runs for hours without problems.

crutkas commented 5 years ago

@chriskolan can you share the app with us some how? crutkas@microsoft.com is my email and i'll loop in Sibille as well / store to figure out what is happening

ChrisKolan commented 5 years ago

The app is on GitHub: https://github.com/ChrisKolan/PomiDone

sibille commented 5 years ago

Thanks for sharing, will try to figure out whats happening

mrlacey commented 5 years ago

The above repro instructions don't work for me. I created the following with WTS v3.2.191.20.1 (the latest version, released today) on VS15.9.11

The only WACK test that failed for me was "Branding" but this is expected as the app is generated with default image assets that must be replaced before submitting to the store.

I ran the WACK test against the code in the PomiDone repository and that passed.

@ChrisKolan Might it be an issue with your dev machine? Have you tried repairing the install or running the WACK test against a blank File>New project?

ChrisKolan commented 5 years ago

I have just run the tests against a blank File>New project>VisualC#>Windows Universal>Blank App (Universal Windows) and the same tests that I mentioned earlier failed this time. I also tried the same procedure on Microsoft Surface Pro with Windows 10 Pro VS Version: 15.9.11, Community 2017 Windows Build: 17763.437 And again the same tests failed.

So it seems I have some problem with my machines...

KevinLaMS commented 5 years ago

Hey Chris. Can you share the WACK Logs with me? C:\Users\\AppData\Local\Microsoft\AppCertKit I will get them to a dev to take a look at.

Thanks kevin

ChrisKolan commented 5 years ago

@KevinLaMS I looked through the WACK logs and it seems what I experience could be a permissions problem. As an example here are the contents of the file post_process_trace_LaunchAppCheck_512019_10287.txt:

te.processhost.exe Information: 0 : 01/05/2019 10:28:08 EXCEPTION[Infrastructure]: Infrastructure part name: "AppxProgramInventoryHelper.cs", Method name: "GetPackageFromManifestFile" Line: 614, Comment: N/A Exception message: Could not find a part of the path 'C:\Program Files\windowsapps\51chrisxxxxn.templateapplication_1.0.3.0_x641s3q2td0g6fnp\AppXManifest.xml'. Exception trace: at System.IO.Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy) at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) at System.Xml.XmlTextReaderImpl.FinishInitUriString() at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext) at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options) at Microsoft.Windows.SoftwareLogo.Shared.AppxProgramInventoryHelper.GetPackageFromManifestFile(String appxManifestFile, Boolean onlyHighLevelDetails, String packageFullName) te.processhost.exe Information: 0 : 01/05/2019 10:28:08 INFO:Switching back to desktop.

I looked in C:\Program Files\windowsapps\ and there is no folder named 51chrisxxxxn.templateapplication_1.0.3.0_x64__1s3q2td0g6fnp this could explain all the failed tests as other post_process_trace*.txt files have the same exception. The logs are in the attachment. AppCertKit.zip

I also run Visual Studio as an administrator and the same WACK tests failed. It seems that the build/create app packages or WACK procedure is not able to create the 51chrisxxxxn.templateapplication_1.0.3.0_x64__1s3q2td0g6fnp folder and somehow fails silently. Apparently, the same problem exists on the machines that are used to test windows store apps.

KevinLaMS commented 5 years ago

Thanks Chris. I believe the issue you are encountering is this one: https://social.msdn.microsoft.com/Forums/en-US/9394e2ee-6796-45d8-8578-0fc5a13d9826/known-issue-8211-windows-application-certification-kit-crashes-windows-10-1803-sdk-17134?forum=Win10SDKToolsIssues

The work around is in the post, OR if you update to the latest Windows SDK, we have fixed the bug. https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk

ChrisKolan commented 5 years ago

With the latest Windows SDK all WACK tests pass. Many thanks for all of you.

crutkas commented 5 years ago

no problem. Thank you for helping debug the issue with us. Glad we could unblock you.