Alias not getting set - urbanairship-cordova 10.1.2 + PhoneGap 9.0.0

I recently rebuilt my PhoneGap (v9.0.0) app and added the urbanairship-cordova (v10.1.2) plugin and registration seems OK and I cannot see any obvious errors but it is failing to update the alias attached to the device ID.

I am running the app as a TestFlight release but it is built as a full production release build.

I can find the device (iPhone 6s) in Device Lookup and send a PN directly to the device which comes through fine but the setNamedUser does not seem to create the alias.

The registration and calls must be working to some extent because if I check the tags in the Device Lookup I see a tag which is the correct tag that I set from within the app? This code has all worked fine before and is still working on my existing app release.

I am unable to debug the release build of the app to see if any errors but when I'm running on a debug build all calls to the UAirship methods return their callbacks ok and I cannot see any obvious errors?

Has anyone else seen this issue? I send my PNs out to aliases to target specific users so I need for the alias to be correctly associated with the device ID which I expect to see in the Device Lookup section of my dashboard...

Any help with this much appreciated as I cannot really release this new build unless the PNs are working...

Thanks

Didn't find what you were looking for?

New post

Comments

5 comments

  • Hello Steve,

    setNamedUser not creating the alias is right as they are not the same. It just creates a Named User, which you can assign to one or more devices (so a one to many relationship). When you are sending to iPhone 6, what are you using to locate it in the Device Lookup?

    Thank you,

    Chilun Liu

    Airship Support

    Comment actions Permalink
    0
  • Hi Chilun,

    Thanks for replying...

    I used setNamedUser because the UrbanAirship.js module says that setAlias is a deprecated function and I have in fact been using this since I started using UrbanAirship in 2015 and it has always worked fine and does in fact set the alias for devices in my current released version of the app. It is only since I've recently rebuilt that the code now does not seem to set the alias.

    I've attached a few screenshots which show a working (previous release) device complete with alias and also a non-working version (new build) where you can see the alias is not set. There are 3 screenshots for each device, for Channel Detail, Channel Tags and Device Info for the iPhone6s (new non-working build) and iPhoneX (previous release working build).

    It does seem to register the device and all device info is correct but the alias is not set. I use the alias from my PHP code to issue the push notifications which arrive on the released version but not on the new build. It even sets up the 'qaardz_news' tag correctly which I use for generic broadcast PNs.

    If I create a target audience in my UA dashboard using the push notification IDs from both devices and then send a test push notification then that does appear on both devices which proves that the device is actually registered for receiving PNs but it is purely an alias issue?

    I hope this make my problem a little clearer but please ask for any more detail you need because I really need to get this working otherwise I may have to rebuild everything to use some other PN service or even individual for each target platform which would be a disaster. I really love the simplicity of the urbanairship-cordova PhoneGap plugin so I'd much prefer to stick with this solution which has worked perfectly for almost 4 years since I released the game.

    Thanks, Steve

    Comment actions Permalink
    0
  • Hello Steve,

    Right okay. Are you able to respond with the Push ID of the message that was successfully sent to the iPhone 6? If you can, I will try to figure out what's going on with this :)

    Here is a link to help you find the Push ID - https://support.airship.com/hc/en-us/articles/213491163-How-to-find-the-Push-ID

    Thank you,

    Chilun Liu

    Airship Support

    Comment actions Permalink
    0
  • Hi,

    I sent a few tests to both devices and they all seemed to work when using the Device IDs for lookup, screenshot attached.

    This is the URL to the latest PN - https://go.urbanairship.com/apps/6nx1KBGlTwarCJc_LCj-lg/reports/pushdetail/98558677-7155-45fe-b818-436cad34d2d2/?

    I also tried looking up devices by alias 'SteveJ' but that never seems to work even though one of the devices does in fact show an alias of SteveJ in the dashboard?

    The only place is set the aliases is with the setNamedUser call in the javascript code of my PhoneGap app and the only place I refer to the aliases is in the PHP code when my app server issues the PNs.

    These are the channel IDs of the devices for your quick reference anyway...

    iPhone6s - Channel ID - 9cc6793b-ffcb-4f5e-ba68-dc3eb01d3dd6

    iPhoneX - Channel ID - 8c0f3dff-86e8-40e1-9c43-377fb2b447b9

    Thanks, Steve

    Comment actions Permalink
    0
  • Hi,

    I also just duplicated that test message and sent it again and they PNs arrived on both devices.

    This is the report - https://go.urbanairship.com/apps/6nx1KBGlTwarCJc_LCj-lg/reports/pushdetail/5eb58ea4-3d4b-4e07-8b89-54f120f3e270/?

    I've attached screenshots of the 2 devices so you can see the PNs in my notifications list...

    Thanks, Steve

    Comment actions Permalink
    0

Please sign in to leave a comment.