push-notificationwindows-phone-8.1windows-store-appswns

WNS Notification : Channel URL incompatible with caller app


I'm currently developping an mobile application based on Cordova (version 4.0.0) for Windows Phone 8.1.

I implemented the Java code from API Java-WNS (from github of fernandospr) to send notification to my device.

When I push the notification message to WNS, I get this error :

Client in-bound response
403
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-WNS-DEBUG-TRACE: DB5SCH101111133
Date: Fri, 22 Jan 2016 10:44:55 GMT
Content-Length: 0
X-WNS-STATUS: dropped
X-WNS-ERROR-DESCRIPTION: Channel URL incompatible with caller app
X-WNS-MSG-ID: 6D850FC61AE7FDB5
X-WNS-NOTIFICATIONSTATUS: dropped

Here's the different steps to configure my app to receive notifications :

Here's the appxmanifest.file (truely name "package.phone.appxmanifest from platforms/windows folder and cordova windows phone project) :

<?xml version='1.0' encoding='utf-8'?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest">
    <Identity Name="company-name.70**********2" Publisher="CN=02******-****-****-****-***********9" Version="1.1.0.0" />
    <mp:PhoneIdentity PhoneProductId="06******-****-****-****-**********k" PhonePublisherId="s*******-****-****-****-***********5" />
    <Properties>
        <DisplayName>Demo Windows App Phone</DisplayName>
        <PublisherDisplayName>My Company Name</PublisherDisplayName>
        <Logo>images\StoreLogo.png</Logo>
    </Properties>
    <Prerequisites>
        <OSMinVersion>6.3.1</OSMinVersion>
        <OSMaxVersionTested>6.3.1</OSMaxVersionTested>
    </Prerequisites>
    <Resources>
        <Resource Language="x-generate" />
    </Resources>
    <Applications>
        <Application Id="com.company-name.demo" StartPage="www/index.html">
            <m3:VisualElements BackgroundColor="transparent" Description="CordovaApp" DisplayName="Demo Windows App Phone" ForegroundText="light" Square150x150Logo="images\Square150x150Logo.png" Square44x44Logo="images\Square44x44Logo.png">
                <m3:DefaultTile Square71x71Logo="images\Square71x71Logo.png" Wide310x150Logo="images\Wide310x150Logo.png">
                    <m3:ShowNameOnTiles>
                        <m3:ShowOn Tile="square150x150Logo" />
                        <m3:ShowOn Tile="wide310x150Logo" />
                    </m3:ShowNameOnTiles>
                </m3:DefaultTile>
                <m3:SplashScreen Image="images\SplashScreenPhone.png" />
            </m3:VisualElements>
            <ApplicationContentUriRules>
                <Rule Match="https://dev.company-name.fr/demo-windows-app/*" Type="include" />
            </ApplicationContentUriRules>
        </Application>
    </Applications>
    <Capabilities>
        <Capability Name="internetClientServer" />
        <DeviceCapability Name="webcam" />
        <DeviceCapability Name="microphone" />
    </Capabilities>
</Package>

From server side, I use the authentification to WNS with two parameters :

I checked differents topics about this error and the most of the useful answer is to associate the app to windows store. But I always did it and I don't work for me.

If I understand well, WNS platform just need to know the ID App (SID package) to find my app and to send notification to my app. I don't need to deploy my app through the windows store.

Do you have an idea about how to fix it ? Do you think I forget something or do a mistake ?

EDIT :

I'm thinking I find the problem ! I'm working on it and when I'll resolve my problem, I'll come back here to post my solution.


Solution

  • I found the solution about my problem. I'm stupid because I didn't see the relationship between the association of my app to windows store and the appx archive which must have generated. I deployed the wrong appx and that's why I never received the notifications windows. In fact, the wrong appx was never associated to the windows store...

    So, here's the steps (from Visual Studio 2015 RC) to deploy the appx archive linked to windows store :

    So, don't forget to create an app package to associate it to the windows store and can receive the notifications windows.

    You can retrieve the guidelines about this from documentation of Create a Windows 8.1 app package (excepted about the deployment's step).