-
Notifications
You must be signed in to change notification settings - Fork 692
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
Build 2.2 causes build error ("child node 2 exited prematurely", IOException, "pipe is broken") #1286
Comments
So, turns out this isn't caused by WinUI itself, but rather by the SDK 18363 that's breaking my app as well as the app of some other UWP devs. Closing this, since it's off topic with respect to WinUI. |
@sotteson1 may be able to help with SDK issues. I'm not sure the right place to report them but if it's crashing MSBuild then perhaps filing a bug using the Visual Studio "send feedback" button (in VS itself) may collect the right logs. |
This is apparently an issue with the SDK as you found. HEre's some more details: https://dvlup.com/2019/08/07/postmortem-child-node-2-compilation-error-after-updating-to-18362-sdk/ And the SDK folks say this is fixed in latest insider SDK flights. |
Hi @jevansaks - thank you for following up on this, even though it's not really an issue caused by WinUI. I'm aware of that block post (a couple other MS engineers have linked it to me as well), but unfortunately that hasn't solved the issue for me just yet. Currently there's @LanceMcCarthy that has kindly offered to help and is looking at my repo to reproduce the issue on his end and possibly figure out a way to work around that on the current SDK. Thank you all again for your time and your help, I really appreciate it! ...And people said the Windows dev community wasn't that great 😄 |
FYI @jevansaks @ranjeshj hit this same issue or something pretty similar just now on 2004 (it's building fine on another machine with 1909). It's something in this commit range to the sample page xaml file there at the top. I'll try and filter it down a bit more tomorrow. |
Yup, I've confirmed it looks like a weird version of the same issue @jevansaks linked to. As if I add the extra namespaces to the top: xmlns:base="using:Microsoft.Toolkit.Uwp.UI.Media.Base"
xmlns:effects="using:Microsoft.Toolkit.Uwp.UI.Media.Effects"
xmlns:effectbase="using:Microsoft.Toolkit.Uwp.UI.Media.Effects.Abstract"
xmlns:int="using:Microsoft.Toolkit.Uwp.UI.Media.Effects.Interfaces" Then I can build again. The weird thing though is that it seems to work for others on 1909 targeting the 18362 SDK in VS 2019. However, trying to compile on OS 2004 caused it to break. I tried retargeting the app to the 19041 SDK and then it worked again! Really really odd. |
According to the tracking issue in the VS feedback hub (here), the fact that it builds fine when targeting the 19041 SDK makes perfect sense, as this issue was apparently caused by a XAML compiler bug in the toolchain set for the 18362 SDK. The super weird things though are:
I'm very confused 🤣 |
It just seems to come down to using any properties that are only defined on the base class that has no xmlns. e.g. namespace MyLibrary.BaseStuff
{
public class MyBaseControl : UIElement
{
public DependencyProperty PixelHeightProperty {...}
public double PixelHeight {...}
}
} and a control that inherits from that: namespace MyLibrary.Controls
{
public class MyConcreteControl : MyBaseControl
{ }
} If you use that control and set the DependencyProperty that is defined in the base... <Page xmlns:myControls="using:MyLibrary.Controls" >
<myControls:MyConcreteControl PixelHeight="200" />
</Page> that replicates the issue. The workaround is to make sure the compiler has access to the base where the DP is defined: <Page xmlns:myControls="using:MyLibrary.Controls"
xmlns:ExcpetionPreventer="using:MyLibrary.BaseStuff">
<myControls:MyConcreteControl PixelHeight="200" />
</Page> @michael-hawker Reach out to Alan Wu (WDG), he's the one who discovered the cause and offered the workaround |
Also, running a Release mode version of the package built on 1909 worked fine on 2004, so it appears to be purely a build issue. |
@StephenLPeters if you need another repo, building the Sample App out of the current master of the Windows Community Toolkit should exhibit the problem: https://github.com/windows-toolkit/WindowsCommunityToolkit#-required-dependencies My co-worker hit it on their machine as well running 2004. |
To add to this, I can confirm that in my case, setting the 19041 SDK as target SDK for my app solved the issue, I can now finally build it without having to change anything. For reference, if I keep the target SDK to 18362 and try to build an app package from a PC with Windows 10 19041, the app package creation will just fail with that "child node 2 exited" error message. |
I'm hitting this same error when attempting to build the Windows Community Toolkit Sample App, targeting Windows 10 18362, with Windows 10 18363. |
@yoshiask The problem is in the 18362 SDK. Since there was no updated SDK for 18363, you needed to wait for the new SDK that has the fix: 19041, which is available now.
After that's done, update the project's Target SDK to 19041, then do a Rebuild. |
To clarify, I've seen similar issue with "child node 3" and "child node 9", I think they're all related to the same root issue. |
So, just hit this in another inheritance scenario. In this commit, I had one of our controls inherit from another in a different namespace/assembly. If I add any properties from the base control to it in the MainPage.xaml where I use the control, then the compile step blows up and gives me this error:
<wgt:PeoplePicker x:Name="PeopleChooser" PlaceholderText="Testing"/> Where |
Aha, that's exactly the problem that was supposed to be fixed in 19041. Add the xmlns for the TokenizingTextbox to the page, even though it won't be used anywhere, and it will fix that. |
Thanks @LanceMcCarthy, I forgot to call out that appeared to help (though I was noticing other issues with one of our properties I'll have to investigate). It'll be a pain for anyone to use though as they'll have to do that down-stream too, eh? |
yep, as far as I can tell, all downstream consumers are affected. check out what I had to do with the input namespace here https://dvlup.com/2019/08/07/postmortem-child-node-2-compilation-error-after-updating-to-18362-sdk/ |
This was fixed a while ago. (For future reference the internal bug is https://task.ms/23467613.) |
Describe the bug
Updating to the new
Microsoft.UI.Xaml
package version2.2
causes the following build error for me:Steps to reproduce the bug
Steps to reproduce the behavior:
Microsoft.UI.Xaml
to2.2
NOTE: this is happening for me with a specific app, and I'd be happy to give access to the solution to someone from the team to look into it. I've already tried to clean the solution, restart VS, update VS, even tried on 2 different devices, same error. If I try to reproduce this with a blank UWP app, it works just fine and builds with no problems, but I have no clue on what's triggering this in particular in my current app. Due to the nature of the error though, this clearly looks like an issue with the library and not with my actual code (which works just fine with WinUI version
2.1
).Expected behavior
The app should just build
Version Info
NuGet package version:
Microsoft.UI.Xaml 2.2.190830001
Additional info
I can confirm that this is happening to other developers as well. Here's an error log I got from one of them (which is pretty similar to the one I'm getting):
The text was updated successfully, but these errors were encountered: