Forum Discussion
Invalid Package - Sharepoint Framework Extensions
- Jun 07, 2017
Issue was in the elements.xml file, but not in encoding. More obvious than that, but still hard to catch. App catalow actually has actually "unavailable apps" link, which provides details on the possible errors and it's typically really accurate.
If you open up the elements.xml file from the sharepoint/assets folder, you can see that the last Elements element is missing closing tag, like defined in above exception. Below is the original Elements.xml file content and you can see that we are missing final > closing. After adding that missing character there, it was all good for deployment.
<?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Title="SPFxApplicationCustomizer" Location="ClientSideExtension.ApplicationCustomizer" ClientSideComponentId="43833b44-df29-40bf-aec2-294dd435ee05"> </CustomAction> </ElementsSo - completely logical reason, was just hard to spot.
Issue was in the elements.xml file, but not in encoding. More obvious than that, but still hard to catch. App catalow actually has actually "unavailable apps" link, which provides details on the possible errors and it's typically really accurate.
If you open up the elements.xml file from the sharepoint/assets folder, you can see that the last Elements element is missing closing tag, like defined in above exception. Below is the original Elements.xml file content and you can see that we are missing final > closing. After adding that missing character there, it was all good for deployment.
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Title="SPFxApplicationCustomizer"
Location="ClientSideExtension.ApplicationCustomizer"
ClientSideComponentId="43833b44-df29-40bf-aec2-294dd435ee05">
</CustomAction>
</Elements
So - completely logical reason, was just hard to spot.
- DeletedJun 07, 2017btw, I guess gulp serve only compiles/transpiles typescript and it doesnt check xml files thats why the error never came up, any idea how to avoid this in the future (my question is from the tooling perspective), it would be nice to see a warning somewhere.
Maybe a gulp custom task, that checks xml formatting at least?- VesaJuvonenJun 07, 2017
Microsoft
Good suggestion around the schema validation improvement. Thx Luis.- DeletedJun 07, 2017
SP User voice suggestion created :)
https://sharepoint.uservoice.com/forums/329220-sharepoint-dev-platform/suggestions/19527688-please-let-us-know-what-is-wrong-with-xml-files-o
- DeletedJun 07, 2017
Amazing, thanks a lot Vesa, sometimes just fresh eyes will spot the errors in minutes..