Windowscommunitytoolkit: InAppNotification throws an Windows.UI.Xaml.Markup.XamlParseException on show on XBOX and some PCs

Created on 25 Feb 2019  路  10Comments  路  Source: windows-toolkit/WindowsCommunityToolkit

I'm submitting a...

  • Bug report (I searched for similar issues and did not find one)

Current behavior

Windows.UI.Xaml.Markup.XamlParseException when the method show is called.

Expected behavior

No xaml exception.
v4.0.0 works.

Minimal reproduction of the problem with instructions

100% on XBOX with v5.0.0

<controls:InAppNotification x:Name="InAppNotificationControl"> <controls:InAppNotification.ContentTemplate> <DataTemplate> <Grid> <TextBlock Grid.Column="1" VerticalAlignment="Center" Text="{Binding Notification}" TextWrapping="WrapWholeWords" /> </Grid> </DataTemplate> </controls:InAppNotification.ContentTemplate> </controls:InAppNotification>

this.InAppNotificationControl.Show(3000);

Environment

Nuget Package(s):
v5.0.0

Package Version(s):

Windows 10 Build Number:

  • [ ] Fall Creators Update (16299)
  • [ ] April 2018 Update (17134)
  • [X ] October 2018 Update (17763)
  • [ ] Insider Build (build number: )

App min and target version:

  • [ X] Fall Creators Update (16299)
  • [ ] April 2018 Update (17134)
  • [ ] October 2018 Update (17763)
  • [ ] Insider Build (xxxxx)

Device form factor:

  • [X ] Desktop 5% crash
  • [ ] Mobile
  • [ X] Xbox 100% crash
  • [ ] Surface Hub
  • [ ] IoT

Visual Studio

  • [ X] 2017 (version: )
  • [ ] 2017 Preview (version: )
bug controls in progress

All 10 comments

Could you gives us some more info about the desktop Pc's that crashed? and the environments where it happened? @Paradoxon101

Unfortunately this bug occurs with our customers and not during development. Therefore I cannot give you more details. However, we suspect that these are very slow PCs.

Could you at least find the windows 10 Build Number for the Pc's that show this problem?

of course

100% == All PCs with XamlParseException

84% -> 10.0.17134.590
7% -> 10.0.17134.523
5% -> 10.0.17134.472
2% -> 10.0.17763.316
2% -> unknown

I tried this on a Windows 10 VM with version 1803 (17134.1 ) and I was able to replicate the issue, but only when running the code alongside the toolkit, if I used the NuGet packages it worked correctly. The issue pops when the ResourceManager tries to match a String with a URI as you can see in the snip below.

Untitled picture

I've encountered this kind of issue before and in that case, it was caused by a missing resource in the XAML Style definition. I'll continue looking into it to try and give you an answer. Then you can test it on an XBOX device.

I found that the conditional XAML on the InAppNotification.xaml that checked for the UniversalApiContract was set to version 5, while the IXamlType2 interface was introduced in version 7 as you can see here. I tested this change in the VM and it run without any issues.

Annotation 2019-03-13 162104

I've submitted a PR with these changes, if you can test this on XBOX or in the Desktops with these issue, we could be near to closing this issue @Paradoxon101 .

I'm sorry, but how do I test it? I only use the Nuget component and the store download for the Xbox.

I'm sorry, but how do I test it? I only use the Nuget component and the store download for the Xbox.

Hi @Paradoxon101 , I'll send you the .nupkg file, you can add it to the project via powershell , you can see an example here.

Microsoft.Toolkit.Uwp.UI.Controls.5.1.0-build.176.g1a6c9ea43e.nupkg.zip

@Paradoxon101 I've merged in our fix as we're trying to get the release out today, but please let us know if it doesn't work for you.

Version 5.1.1 now works great on Xbox and PC. Thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ThomasPe picture ThomasPe  路  28Comments

mdtauk picture mdtauk  路  36Comments

WilliamABradley picture WilliamABradley  路  33Comments

HesamKashefi picture HesamKashefi  路  54Comments

deltakosh picture deltakosh  路  55Comments