1

We are using latest version v6 of https://github.com/salesforce-marketingcloud/MC-Cordova-Plugin.

But when trying to create a contact, we don't see it in push contacts on Marketing Cloud. It looks as if there is a problem on the logs:

2019-04-08 15:11:54.566411+0200 savia[20655:8440114] Push Enabled, setting contact key
2019-04-08 15:11:54.566938+0200 savia[20655:8440114] [foundation] sfmc_setContactKey 00325000011Twx9AAC succeeded
MarketingCloudSDKFoundation+ClientData.m
line: 40
2019-04-08 15:11:54.569749+0200 savia[20655:8440114] success setting contact: 1
2019-04-08 15:11:54.573502+0200 savia[20655:8440114] deviceToken1 = <516e5df0 585ceb71 d37993bc 2ff49101 c560d3f9 eb89053b 7be2838d ea630ff3>

It looks as if there is a success on creation but then we see:

2019-04-08 15:14:05.556259+0200 savia[20655:8441704] [foundation] registration response: <NSHTTPURLResponse: 0x282669960> { URL: https://XXXXXXX.device.marketingcloudapis.com/device/v1/registration } { Status Code: 401, Headers {

    "Cache-Control" =     (

        "no-cache, must-revalidate, max-age=0, no-store, private"

    );

    Connection =     (

        "keep-alive"

    );

    "Content-Length" =     (

        148

    );

    "Content-Security-Policy" =     (

        "upgrade-insecure-requests"

    );

    "Content-Type" =     (

        "application/json; charset=utf-8"

    );

    Date =     (

        "Mon, 08 Apr 2019 13:14:05 GMT"

    );

    "Referrer-Policy" =     (

        "strict-origin-when-cross-origin"

    );

    "Strict-Transport-Security" =     (

        "max-age=15552000; preload"

    );

    Vary =     (

        Origin

    );

    "Www-Authenticate" =     (

        "Bearer realm=\"XXXXXXX.device.marketingcloudapis.com\", error=\"invalid_token\""

    );

    "x-content-type-options" =     (

        nosniff

    );

    "x-frame-options" =     (

        DENY

    );

    "x-mashery-error-code" =     (

        "ERR_403_DEVELOPER_INACTIVE"

    );

    "x-mashery-message-id" =     (

        "653afdc4-ccbe-49d0-b954-691cd29ef830"

    );

    "x-mashery-responder" =     (

        na

    );

    "x-xss-protection" =     (

        "1; mode=block"

    );

} }

MarketingCloudSDKFoundation.m

line: 702

The endpoint is changed to XXXXXXX, we've checked all the relevant data such as APP ID, token and endpoint on Marketing Cloud and is correct on our plug-in configuration.

We've also tested native SDKs without any problem, is there any issue with this version of the plugin? Has someone deployed with out any problem this version of the plugin?

UPDATE: We've compared what the SDK does on Android and on iOS. On iOS the token is beeing passed to the authorization header in lowercase, that gives us 401, if we try to replicate with postman and with the correct token, we get 200. On the native iOS learning app we are seeing the native plugin gets configured with a JSON put with Cordova it invokes MarketingCloudSDKConfigBuilder. Both methods are on the native SDK, when using sfmc_setAccessToken method from the builder, the token is correctly read from the config.xml of Cordova, it looks as if the problem is in the builder, probably on sfmc_build invoke.

Any workaround or fix?

1 Answer 1

0

Daniel,

Please open an investigation with your Marketing Cloud support rep so we can track this formally. We'll be asking for some of your configuration data (which shouldn't be posted here) as part of that, so please be ready with your config.xml to pass along.

Once we get that investigation we'll be able to move quickly through the process.

In the meantime - would you please try installing the previous version of the plugin (via NPM) as a possible workaround:

cordova plugin add [email protected]

Thank you so much. Hoping to get you moving along shortly.

Brian

4
  • Hi Brian, Thanks, but support is giving us an out of scope reply, no premium support yet. Should I provide you with a new case number here? Commented Apr 15, 2019 at 16:57
  • @DanielLozano please - I'll look it up directly. Commented Apr 16, 2019 at 17:19
  • Thanks Brian, case nº 22463793. Commented Apr 17, 2019 at 7:03
  • @DanielLozano thank you. I see that the issue has been noted by support and is tied to an existing (now fixed) issue that we are in the process of preparing for a release within 10 days. Thank you for your patience. AND your excellent description/diagnosis. Commented Apr 19, 2019 at 17:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .