GithubHelp home page GithubHelp logo

Comments (11)

jbenyovs avatar jbenyovs commented on July 26, 2024

@rajravat can you please explain a bit more about your authorization flow? How many devices are you registering? Is it possible that unregister() is not part of your regular flow, meaning that you only call that function if you are seeing the error "User has excessive device registrations"?
Note that it is good practice to unregister the device as soon as it is not needed anymore. Every registered device counts against your limit of 750 tokens. The https://idbroker-eu.webex.com/idb/profile#/tokens link is one way of de-registering unused devices, another one is to use this API https://developer.webex.com/docs/api/v1/authorizations .

from webex-js-sdk.

rajravat avatar rajravat commented on July 26, 2024

A single user logs into a desktop application (we are using the Edge WebView2 embedded into the app). This is done via auth code flow as explained on the cisco dev docs, we get an auth code and exchange it for an access token.

We then call Calling.init and pass the credentials through as can be seen in the code below:

image

image

once the user has closed down the application we call line.register()
image

We successfully see the "unregistered device successfully" message in the console.

however, querying the following url, we do not see the device get removed:
https://wdm-k.wbx2.com/wdm/api/v1/devices/

from webex-js-sdk.

jbenyovs avatar jbenyovs commented on July 26, 2024

@rajravat thanks for the reply. In this case we would need to dig deeper to find out why the device is not removed from the list. We would need full Console logs for that and since it might contain personal info, best would be to create a Dev Support ticket for this - https://developer.webex.com/support . Thanks

from webex-js-sdk.

rajravat avatar rajravat commented on July 26, 2024

Thanks,

you can reproduce the same problem using the sample kitchen sink app website:

https://webex.github.io/webex-js-sdk/samples/calling/

  1. Put in your access token
  2. Initialise calling

At this point if you perform a get request on this url (https://wdm-k.wbx2.com/wdm/api/v1/devices/), you will see the device registration it has just created.

  1. Click register
  2. Click unregister (which called line.deregister()

Check the url again (https://wdm-k.wbx2.com/wdm/api/v1/devices/) and you will see it has not removed any devices.

You can then press f5 and perform the same actions again and see that more and more devices just get added to the wdm url without getting removed.

I've noticed in the bot framework api, it has a function to delete all the registrations:

https://github.com/WebexCommunity/webex-node-bot-framework/blob/main/lib/websocket.js
image

from webex-js-sdk.

jbenyovs avatar jbenyovs commented on July 26, 2024

@rajravat thanks for the instructions, I was able to replicate this on the Calling Kitchensink app. We are working on it with the SDK engineering team and will let you know.

from webex-js-sdk.

jbenyovs avatar jbenyovs commented on July 26, 2024

@rajravat short update:
this is working as designed right now.

There are 2 device registrations that occur in the Calling SDK.

WDM registration to create a web device in Webex.
Registration with Webex Calling which creates the registration for the line.
The line.deregister() does not unregister the WDM. WDM device deletion is a different method which we have not exposed on the Calling SDK.
We will investigate our code and check if we can trigger a WDM deletion from the Calling SDK method.

from webex-js-sdk.

rajravat avatar rajravat commented on July 26, 2024

Thanks for the update

from webex-js-sdk.

arun3528 avatar arun3528 commented on July 26, 2024

cc @sreenara , delete on WDM

Thanks,

you can reproduce the same problem using the sample kitchen sink app website:

https://webex.github.io/webex-js-sdk/samples/calling/

  1. Put in your access token
  2. Initialise calling

At this point if you perform a get request on this url (https://wdm-k.wbx2.com/wdm/api/v1/devices/), you will see the device registration it has just created.

  1. Click register
  2. Click unregister (which called line.deregister()

Check the url again (https://wdm-k.wbx2.com/wdm/api/v1/devices/) and you will see it has not removed any devices.

You can then press f5 and perform the same actions again and see that more and more devices just get added to the wdm url without getting removed.

I've noticed in the bot framework api, it has a function to delete all the registrations:

https://github.com/WebexCommunity/webex-node-bot-framework/blob/main/lib/websocket.js image

We will need to expose this as part of webex object i think , @jbenyovs

from webex-js-sdk.

JiandongRuan avatar JiandongRuan commented on July 26, 2024

BTW, the same issue can be reproed on Webex JS SDK Meeting as well. You can repro it using the meeting kitchen app https://webex.github.io/webex-js-sdk/samples/browser-plugin-meetings/

from webex-js-sdk.

jbenyovs avatar jbenyovs commented on July 26, 2024

@rajravat this issue is fixed and is available as part of [email protected]

So, instead of line.deregister() you can start calling the method calling.deregister() which will take care of deregistering all the active lines and also deregistering the WDM devices. If you do that, you will not see the error anymore. Please try out and see if it works for you too.

from webex-js-sdk.

rajravat avatar rajravat commented on July 26, 2024

Thank you

from webex-js-sdk.

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.