Code Monkey home page Code Monkey logo

Comments (27)

tony-gutierrez avatar tony-gutierrez commented on August 16, 2024 1

So I think I have narrowed this down. Basically if an apns registration is created without tags, you can never add tags (even though the api tells you that you just did). Also, WHERE ARE YOUR EFFING DOCS?

from azure-sdk-for-js.

ramya-rao-a avatar ramya-rao-a commented on August 16, 2024 1

Hello all,

Thanks for your patience.

There are a few different queries here, I'll try and address them all.

from azure-sdk-for-js.

tony-gutierrez avatar tony-gutierrez commented on August 16, 2024

Also there is no documentation for any or the above mentioned functions anywhere on the web!

This is the best I could find in googles cache: http://webcache.googleusercontent.com/search?q=cache:mES4PLLFqsUJ:azure.github.io/azure-sdk-for-node/azure-sb/latest/GcmService.html+&cd=1&hl=en&ct=clnk&gl=us

from azure-sdk-for-js.

tony-gutierrez avatar tony-gutierrez commented on August 16, 2024

Congrats on getting the docs back online in a short 3 months. Any ideas about the tag bug?

from azure-sdk-for-js.

amarzavery avatar amarzavery commented on August 16, 2024

@ankurkul - Can you take a look at this issue?

from azure-sdk-for-js.

ankurkul avatar ankurkul commented on August 16, 2024

@tony-gutierrez : Thanks for reporting the issue and apologies for delayed response. We have identified the issue as a bug in our nodejs SDK. The root cause lies in the fact that we serialize/de-serialize registration objects into XML descriptions and do not honor correct ordering during updateRegistration calls. We will be fixing it soon and update this thread.

from azure-sdk-for-js.

praries880 avatar praries880 commented on August 16, 2024

Thank you for opening this issue! We are routing it to the appropriate team for follow up.

from azure-sdk-for-js.

yungezz avatar yungezz commented on August 16, 2024

hi @qiaozha could you pls help to check if this still an issue in new js sdk?

from azure-sdk-for-js.

qiaozha avatar qiaozha commented on August 16, 2024

hi @qiaozha could you pls help to check if this still an issue in new js sdk?

Hi Catherine, I've checked the js sdk repo, but can't find the listRegistrationsByTags operation. I've also checked the swagger specs repo, and can't find the path definition in listRegistrationsByToken operation either. I think it was replaced by other operations or being deprecated.

from azure-sdk-for-js.

yungezz avatar yungezz commented on August 16, 2024

hi @tony-gutierrez is this issue still valid for you? as @qiaozha mentioned, the operation couldn't be found today.

from azure-sdk-for-js.

tony-gutierrez avatar tony-gutierrez commented on August 16, 2024

As far as I know, there is no new sdk for notification hub.

There is a new service bus sdk, but it doesn't include notification hub functionality like the old service bus sdk did.

So basically, if you use both, there's no point in trying to use the new service bus sdk because you will lose support for notification hub. It's not a good situation. That is probably why your can't find it.

from azure-sdk-for-js.

qiaozha avatar qiaozha commented on August 16, 2024

Actually, there is a independent package notificationhubs in JS SDK https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/notificationhubs/arm-notificationhubs , I searched it, the path definition in listRegistrationsByToken operation is not in there as well.

from azure-sdk-for-js.

tony-gutierrez avatar tony-gutierrez commented on August 16, 2024

That's just the management sdk, not the usage sdk.

from azure-sdk-for-js.

atcustomercentral avatar atcustomercentral commented on August 16, 2024

Hi @tony-gutierrez, I am interested in the same problem. Did you ended up continuing using the old azure-sdk-for-node, did you found a solution that let you use the new azure-sdk-for-js or did you ended up building your own REST client?

Hi @qiaozha, any luck finding a solution on your side? Did you guys just drop support for managing registrations to push notification services with node?

from azure-sdk-for-js.

tony-gutierrez avatar tony-gutierrez commented on August 16, 2024

We are still using the old SDK for both Service Bus, and Notification Hub. It has been a while since I have checked, but I don't think any progress has been made on a new notification hub SDK to complement the new service bus sdk.

from azure-sdk-for-js.

atcustomercentral avatar atcustomercentral commented on August 16, 2024

Thanks! I do not think it is a priority for the Azure team, unfortunately.

from azure-sdk-for-js.

qiaozha avatar qiaozha commented on August 16, 2024

@ramya-rao-a @xirzec Can you help confirm that Service Bus, and Notification Hub data-plane sdks haven't been moved to js sdk repo?

from azure-sdk-for-js.

xirzec avatar xirzec commented on August 16, 2024

@richardpark-msft are you familiar with Notification Hub?

from azure-sdk-for-js.

richardpark-msft avatar richardpark-msft commented on August 16, 2024

@qiaozha I don't see any mention of notification hub in our track 2 repo today. I went looking for the older one to see if there's a breadcrumb to trace:

(for reference, this is the SDK that I believe we're all talking about)
https://github.com/Azure/azure-sdk-for-node/blob/master/lib/services/serviceBus/lib/notificationhubservice.js

It doesn't look like we could just copy it over as it uses some libraries that we don't use in our SDK (underscore) and it looks like it's also using an older version of the service bus library and would have to be moved to the newer AMQP-based version.

@ramya-rao-a are you aware of any history for this? I'm not sure if this library has been superceded by something else, for instance.

from azure-sdk-for-js.

atcustomercentral avatar atcustomercentral commented on August 16, 2024

@richardpark-msft thanks for looking into this. The SDK you linked is the one we are currently using, specifically the APNS and GCM part in our case. We would be happy to know if there is any plan to move this into the new SDK and to cover the complete set of endpoint available in the REST API.

from azure-sdk-for-js.

RodgeFu avatar RodgeFu commented on August 16, 2024

Add "Client" label so that this can be properly tracked by dataplane SDK. thanks.

from azure-sdk-for-js.

 avatar commented on August 16, 2024

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @tjsomasundaram.

from azure-sdk-for-js.

 avatar commented on August 16, 2024

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @tjsomasundaram.

from azure-sdk-for-js.

ramya-rao-a avatar ramya-rao-a commented on August 16, 2024

Is there a new SDK for Azure Notifications Hub

An update on my previous answer for this question:

We have decided to invest time in creating a new library for Azure Notification Hub in this repository just like we did for Service Bus following the above linked guidelines instead of simply copying over the Notification Hub parts from azure-sb into a separate package. Please subscribe to #13841 for updates

Thanks for your patience everyone.

@mpodwysocki Can you help with the question on updateRegistration and listRegistrationsByToken calls here?

from azure-sdk-for-js.

mpodwysocki avatar mpodwysocki commented on August 16, 2024

@tony-gutierrez Cannot reproduce using the following code where you can add tags successfully to a registration without tags, and then add the tags at a later point. I can then print out the registrations by the given device token to see that the tags are persisted.

  const APNS_REGISTRATION_ID = '<my device token>';

  // Create initial registration
  service.apns.createNativeRegistration(APNS_REGISTRATION_ID, null, (err, response) => {
    if (err) {
      console.log(err);
      return;
    }

    console.log('Registration success');
    console.log(JSON.stringify(response, null, 2));

    const registration = response;
    const registrationId = registration.RegistrationId;
    const deviceToken = registration.DeviceToken;
    const tags = ['language_en', 'country_US'];

    // Add some tags
    service.apns.createOrUpdateNativeRegistration(registrationId, deviceToken, tags, (e, res) => {
      if (e) {
        console.log(e);
        return;
      }

      console.log('Registration update success');
      console.log(JSON.stringify(res, null, 2));

      // List our registrations
      service.apns.listRegistrationsByToken(APNS_REGISTRATION_ID, (e, r) => {
        if (e) {
          console.log(e);
          return;
        }

        console.log('Registration list success');
        console.log(JSON.stringify(r, null, 2));
      });
    });
  });

Having a valid APNS device token, I got back the following in the results which has the first instance without tags, and then the second, I'm adding tags to the existing registration. As you can see from the tags element in the JSON response below, there are tags persisted even after calling the listRegistrationsByToken operation.

Registration success
{
  "ETag": "1",
  "ExpirationTime": "9999-12-31T23:59:59.999",
  "RegistrationId": "<redacted>",
  "DeviceToken": "<redacted>",
  "_": {
    "ContentRootElement": "AppleRegistrationDescription",
    "id": "<redacted>",
    "title": "<redacted>",
    "published": "2021-03-22T21:31:31Z",
    "updated": "2021-03-22T21:31:31Z",
    "link": ""
  }
}
Registration update success
{
  "ETag": "2",
  "ExpirationTime": "9999-12-31T23:59:59.999",
  "RegistrationId": "<redacted>",
  "Tags": "language_en,country_US",
  "DeviceToken": "<redacted>",
  "_": {
    "ContentRootElement": "AppleRegistrationDescription",
    "id": "<redacted>",
    "title": "<redacted>",
    "published": "2021-03-22T21:31:31Z",
    "updated": "2021-03-22T21:31:31Z",
    "link": ""
  }
}
Registration list success
[
  {
    "ETag": "2",
    "ExpirationTime": "9999-12-31T23:59:59.999Z",
    "RegistrationId": "<redacted>",
    "Tags": "country_US,language_en",
    "DeviceToken": "<redacted>",
    "_": {
      "ContentRootElement": "AppleRegistrationDescription",
      "id": "<redacted>",
      "title": "<redacted>",
      "published": "2021-03-22T21:39:15Z",
      "updated": "2021-03-22T21:39:15Z",
      "link": ""
    }
  }
]

from azure-sdk-for-js.

tony-gutierrez avatar tony-gutierrez commented on August 16, 2024

It's been a long time, and perhaps the issue was corrected already by the guy who diagnosed it as serialization problems. The only difference I can see from your example is that we were using template registration at the time, not native. We worked around it by adding a trash tag at creation.

from azure-sdk-for-js.

ramya-rao-a avatar ramya-rao-a commented on August 16, 2024

Thanks for looping back @tony-gutierrez
Closing this issue as there is no further action item.

from azure-sdk-for-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.