Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23261] Windows: Error when adding capabilities in wrong order

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-06-27T00:32:01.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.0.0
ComponentsWindows
Labelsn/a
ReporterRene Pot
AssigneeGary Mathews
Created2016-04-21T14:46:57.000+0000
Updated2016-09-05T16:45:05.000+0000

Description

When I have capabilities in this order:
    <windows>
        <manifest>
            <Capabilities>
                <Capability Name="internetClient"/>
               <DeviceCapability Name="location"/>
                 <Capability Name="picturesLibrary" />
                <DeviceCapability Name="webcam" />
            </Capabilities>
        </manifest>
    </windows>
I get an error:
[ERROR] :  C:\Users\Rene\.titanium\vsbuild\Roamler\phone.x86\Release\AppxManifest.xml(48,6): error APPX1404: File content does not conform to specified schema. The element 'Capabilities' in namespace 'http://schemas.microsoft.com/appx/2010/manifest' has invalid child element 'Capability' in namespace 'http://schemas.microsoft.com/appx/2010/manifest'. List of possible elements expected: 'DeviceCapabilityChoice, DeviceCapability' in namespace 'http://schemas.microsoft.com/appx/2010/manifest' as well as 'DeviceCapability' in namespace 'http://schemas.microsoft.com/appx/2013/manifest'. [C:\Users\Rene\.titanium\vsbuild\Roamler\phone.x86\Roamler.vcxproj]
[ERROR] :  C:\Users\Rene\.titanium\vsbuild\Roamler\phone.x86\Release\AppxManifest.xml(48,6): error APPX1404: File content does not conform to specified schema. The element 'Capabilities' in namespace 'http://schemas.microsoft.com/appx/2010/manifest' has invalid child element 'Capability' in namespace 'http://schemas.microsoft.com/appx/2010/manifest'. List of possible elements expected: 'DeviceCapabilityChoice, DeviceCapability' in namespace 'http://schemas.microsoft.com/appx/2010/manifest' as well as 'DeviceCapability' in namespace 'http://schemas.microsoft.com/appx/2013/manifest'. [C:\Users\Rene\.titanium\vsbuild\Roamler\phone.x86\Roamler.vcxproj]
    0 Warning(s)
    1 Error(s)
Time Elapsed 00:00:17.70
However, when I put them in this order all works fine:
    <windows>
        <manifest>
            <Capabilities>
                <Capability Name="internetClient"/>
                 <Capability Name="picturesLibrary" />
               <DeviceCapability Name="location"/>
                <DeviceCapability Name="webcam" />
            </Capabilities>
        </manifest>
    </windows>
This sounds like a bug

Comments

  1. Sharif AbuDarda 2016-04-21

    Hello, This could be windows default behavior. As in https://msdn.microsoft.com/en-us/library/windows/apps/hh464936.aspx It's clear that you need to define General-use capabilities first then Device capabilities and after that Special-use capabilities. This should be the idle case. Regards, Sharif.
  2. Rene Pot 2016-04-21

    Would be good functionality to add to Titanium to prevent issues like this
  3. Christopher Williams 2016-04-21

    This may be an error stemming from Windows/MS tooling itself, but there's no reason we have to make our users deal with crappy experience like this. We already do some filtering/manipulation of capabilities for them, so we should also just order them properly under the covers to prevent this.
  4. Gary Mathews 2016-06-26

    master: https://github.com/appcelerator/titanium_mobile_windows/pull/753
  5. Ewan Harris 2016-09-05

    Verified using: OS: Microsoft Windows 10 Pro 10.0.14393 Appc core: 6.0.0-38 Appc NPM: 4.2.8-6 Ti SDK: 6.0.0.v20160904203840 Incorrect order of capabilities no longer causes an error in the build process Closing ticket

JSON Source