Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.08k stars 1.2k forks source link

@azure/notification-hubs: Calling createRegistration with browserRegistrationDescription returns error "Element auth is not expected" #29081

Closed woutervanvliet closed 7 months ago

woutervanvliet commented 7 months ago

Full error returned:

RestError: operations failed with: Failed to parse RegistrationDescription Error in line 1 position 569. 'Element' 'Auth' from namespace 'http://schemas.microsoft.com/netservices/2010/10/servicebus/connect' is not expected. Expecting element 'P256DH'.. TrackingId:00b16041-21cb-4202-a77a-0195af412348,TimeStamp:3/27/2024 8:37:40 AM +00:00

Apparently the problem is the order of elements; when I change registrationSerializer.js to include P256DH before Auth the registration is saved without problems.

https://github.com/Azure/azure-sdk-for-js/blob/b4ef861fecc4e7ad7c7535fd16d6fb86cdd64026/sdk/notificationhubs/notification-hubs/src/serializers/registrationSerializer.ts#L808

mpodwysocki commented 7 months ago

Fixed as part of 1.2 release.