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

Windows Store App Certification Fails after upgrading Microsoft.UI.XAML to v2.5.0 #3780

Closed
under3415 opened this issue Dec 7, 2020 · 19 comments · Fixed by #4820
Closed

Windows Store App Certification Fails after upgrading Microsoft.UI.XAML to v2.5.0 #3780

under3415 opened this issue Dec 7, 2020 · 19 comments · Fixed by #4820
Labels
area-NugetPackage Issue with the nuget package developer experience (e.g. build error, missing files) team-Controls Issue for the Controls team

Comments

@under3415
Copy link

Describe the bug
After updating Microsoft.UI.Xaml from 2.5.0-prerelease201202003 to the v.2.5.0 (release) the UWP app got rejected from the store with the following errors. This was the only change to the app, It was all good with pre-release UI.Xaml

FAILED
General metadata correctness

Error Found: The general metadata correctness test detected the following errors:
    Parameter value of method add_AnimatedVisualInvalidated of type Microsoft.Toolkit.Uwp.UI.Lottie.ILottieVisualSourceClass in file Microsoft.Toolkit.Uwp.UI.Lottie.winmd references the non-Windows Runtime type Microsoft.UI.Xaml.Controls.IDynamicAnimatedVisualSource. Windows Runtime types can reference only Windows Runtime types.
    The type Microsoft.UI.Xaml.Controls.IAnimatedVisual referenced by type Microsoft.Toolkit.Uwp.UI.Lottie.ILottieVisualSourceClass in file Microsoft.Toolkit.Uwp.UI.Lottie.winmd was not found. All types referenced in metadata files must be discoverable.

    Parameter value of method add_AnimatedVisualInvalidated of type Microsoft.Toolkit.Uwp.UI.Lottie.LottieVisualSource in file Microsoft.Toolkit.Uwp.UI.Lottie.winmd references the non-Windows Runtime type Microsoft.UI.Xaml.Controls.IDynamicAnimatedVisualSource. Windows Runtime types can reference only Windows Runtime types.
    The type Microsoft.UI.Xaml.Controls.IAnimatedVisual referenced by type Microsoft.Toolkit.Uwp.UI.Lottie.LottieVisualSource in file Microsoft.Toolkit.Uwp.UI.Lottie.winmd was not found. All types referenced in metadata files must be discoverable.

Steps to reproduce the bug
Submit UWP app to store with UI>XAML and Microsoft.Toolkit.Uwp.UI.Lottie (either v.6.1.0 or v7 preview4)
This is NOT picked up by app cert kit on PC

Expected behavior
No certification issues

Screenshots

Version Info

NuGet package version:
Microsoft.UI.XAML v.2.5.0

Examples

Windows 10 version Saw the problem?
Insider Build (xxxxx)
May 2020 Update (19041)
Device form factor Saw the problem?
Desktop

Additional context

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Dec 7, 2020
@YuliKl
Copy link

YuliKl commented Dec 8, 2020

Sounds related to #3298.

@StephenLPeters FYI.

@StephenLPeters
Copy link
Contributor

@kmahone and @ranjeshj FYI as well

@StephenLPeters StephenLPeters added area-NugetPackage Issue with the nuget package developer experience (e.g. build error, missing files) needs-cherrypicktorelease PR tagged for cherry-pick to the current release branch (but not yet picked) team-Controls Issue for the Controls team labels Dec 8, 2020
@StephenLPeters
Copy link
Contributor

The workaround is simple – app developers need to open the .csproj or .vcxproj file that has a reference to the Project which targets the winui2 nuget package (or includes a project which does, like lottie) NuGet package and insert this target at the bottom of the file right before :

That will have MSBuild copy the WinMD file to the root of the AppX, which should allow WACK certification to find it.

I think we can also fix this from the Winui2 side and should take a patch to the 2.5 release.

@StephenLPeters StephenLPeters removed the needs-triage Issue needs to be triaged by the area owners label Dec 9, 2020
@under3415
Copy link
Author

under3415 commented Dec 9, 2020

The workaround is simple – app developers need to open the .csproj or .vcxproj file that has a reference to the Project which targets the winui2 nuget package (or includes a project which does, like lottie) NuGet package and insert this target at the bottom of the file right before :

That will have MSBuild copy the WinMD file to the root of the AppX, which should allow WACK certification to find it.

I think we can also fix this from the Winui2 side and should take a patch to the 2.5 release.

Not sure if I did the right thing. When you say "insert this target at the bottom of the file right before :" do you mean before a colon character or is something missing?

This is what the end of my csproj file looks like and this did NOT resolve the issue, it still got rejected by the store. Am I not doing it right?

 <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
  <Target Name="_AddXamlWinmdToPackageLayoutRoot" AfterTargets="_CreatePackageLayout">
    <Copy SourceFiles="@(_PackageLayoutFileSource)" DestinationFiles="@(_PackageLayoutFileSource->'$(AppxLayoutDir)%(Filename)%(Extension)')" Condition="'%(Filename)%(Extension)' == 'Microsoft.UI.Xaml.winmd'" />
  </Target>
  
</Project>

@michael-hawker
Copy link
Collaborator

@StephenLPeters this is resolved now, eh? We just shipped the WCT Sample App via the store with 2.5 as a dependency for our 7.0.0 release...

@StephenLPeters
Copy link
Contributor

@llongley can you confirm?

@llongley
Copy link
Member

A fix is in final testing, hopefully to be checked in by today or tomorrow:

#4218

It'll be part of the 2.6.0 release.

@under3415
Copy link
Author

under3415 commented Mar 23, 2021

Hi, I was NOT getting this error in UI.XAML prerelease packages until yesterday. Now the error is back with
Microsoft.UI.XAML 2.6.0-prerelease.210315002
Interestingly, the error wasn't there with 2.5 pre-releases either, only happened after the final prod release!?

@under3415
Copy link
Author

Hi
I can confirm this is still an issue with the latest versions of UI XAML and Lottie:

  • Microsoft.UI.XAML 2.6.0-prerelease.210405001
  • Microsoft.Toolkit.Uwp.UI.Lottie v7.0.2

Error Found: The general metadata correctness test detected the following errors:

Parameter value of method add_AnimatedVisualInvalidated of type Microsoft.Toolkit.Uwp.UI.Lottie.ILottieVisualSourceClass in file Microsoft.Toolkit.Uwp.UI.Lottie.winmd references the non-Windows Runtime type Microsoft.UI.Xaml.Controls.IDynamicAnimatedVisualSource. Windows Runtime types can reference only Windows Runtime types.
The type Microsoft.UI.Xaml.Controls.IAnimatedVisual referenced by type Microsoft.Toolkit.Uwp.UI.Lottie.ILottieVisualSourceClass in file Microsoft.Toolkit.Uwp.UI.Lottie.winmd was not found. All types referenced in metadata files must be discoverable.
Parameter value of method add_AnimatedVisualInvalidated of type Microsoft.Toolkit.Uwp.UI.Lottie.LottieVisualSource in file Microsoft.Toolkit.Uwp.UI.Lottie.winmd references the non-Windows Runtime type Microsoft.UI.Xaml.Controls.IDynamicAnimatedVisualSource. Windows Runtime types can reference only Windows Runtime types.
The type Microsoft.UI.Xaml.Controls.IAnimatedVisual referenced by type Microsoft.Toolkit.Uwp.UI.Lottie.LottieVisualSource in file Microsoft.Toolkit.Uwp.UI.Lottie.winmd was not found. All types referenced in metadata files must be discoverable.

@rajeshangappan
Copy link

Please anyone suggest which version is working fine for store submission. I tried the below version and facing some other exceptions.
Microsoft.UI.Xaml - 2.5.0-prerelease201202003 and Lottie - 6.1.0

@jp-weber
Copy link
Contributor

@rajeshangappan
I have successfully made the store submission with the following packages in the last days:
Microsoft.UI.Xaml -2.6.0-prerelease.210227001 & the newest Lottie version.

@under3415
Copy link
Author

If you are on version 2.5, it worked in 2.5.0-prerelease.201202003, but not the release 2.5.0

@llongley
Copy link
Member

@under3415 Do you have or could you create a repro app that you could share, by any chance? I created a test app that includes Lottie 7.0.2 and WinUI 2.6.0-prerelease.210405001, and the AppX produced passes WACK metadata tests, so I haven't been able to repro the issue you're seeing.

@under3415
Copy link
Author

This issue is not picked up by the certification app, or even in the Store in the test flight!
It is only rejected by the Store when you try to submit to "production", so it is really hard to test and replicate.
You have to deploy the app to the public store to see the issue.

@llongley
Copy link
Member

Ah, I see the WACK failure now that I tried to submit the test app to the store. Thanks, we'll investigate.

@llongley
Copy link
Member

Sorry for the trouble - I have a fix out for PR.

@RobbyRobbyRobby
Copy link

I can confirm that with the latest preview (v2.6.0-prerelease.210430001) that apps again pass the store submission.

image

Thanks everyone.
Rob.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label May 4, 2021
@StephenLPeters StephenLPeters removed the needs-triage Issue needs to be triaged by the area owners label May 4, 2021
@under3415
Copy link
Author

Hi,
Another RTM release, another store rejection!

I have updated Microrsoft.UI.Xaml to 2.6.0 and my app got rejected by the store (in test flight). There were no other changes.

Unfortunately, the store no longer gives any details, just says "failed certification". There is no report :-(
image

Cert App on PC does not detect any issues.

Can we please re-open this issue?

@StephenLPeters
Copy link
Contributor

#5298 is tracking this issue.

@ghost ghost removed the needs-triage Issue needs to be triaged by the area owners label Jul 1, 2021
@ranjeshj ranjeshj removed the needs-cherrypicktorelease PR tagged for cherry-pick to the current release branch (but not yet picked) label Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NugetPackage Issue with the nuget package developer experience (e.g. build error, missing files) team-Controls Issue for the Controls team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants