Comments (11)
@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.
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:
once the user has closed down the application we call line.register()
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.
@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.
Thanks,
you can reproduce the same problem using the sample kitchen sink app website:
https://webex.github.io/webex-js-sdk/samples/calling/
- Put in your access token
- 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.
- Click register
- 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
from webex-js-sdk.
@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.
@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.
Thanks for the update
from webex-js-sdk.
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/
- Put in your access token
- 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.
- Click register
- 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
We will need to expose this as part of webex object i think , @jbenyovs
from webex-js-sdk.
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.
@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.
Thank you
from webex-js-sdk.
Related Issues (20)
- media:stopped payload is 'remote' instead of remoteAudio/remoteVideo HOT 1
- StopScreenshare is event is not invoked when Screenshare is stopped on other side HOT 1
- SDK initialization is taking time HOT 1
- Fix - Add better documentation and examples
- lyra.space.join(space) does not work as documented HOT 1
- Support for cross-region boards HOT 8
- Custom request intercepter
- Event on auth expiry / failure HOT 1
- ReferenceError: window is not defined HOT 5
- TypeError: Cannot set property navigator of #<Object> which has only a getter HOT 2
- Webex Calling SDK CORS Issue HOT 5
- Webex SDK 3.0.0 not compatible with any version of NodeJS HOT 11
- "version" is a required argument in @webex-media-helpers HOT 5
- Is there flag to know if a person can be muted remotely or not? HOT 1
- Webex Meeting - remote audio is silent when remote media is automatically added HOT 3
- PTZ Support in 3.0 sdk HOT 5
- Web 3.0 sdk: Screenshare from electron app HOT 6
- Full Proxy Support HOT 1
- Action pull-request.yml possibly vulnerable to RCE
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webex-js-sdk.