-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Updating token after signaling connection has gone offline causes Invalid State error #33
Comments
I am facing the same issue. It does not seem to affect app performance, only causes very ugly errors during development. It thought I'd made a mistake in my code somewhere, even though I call @ryan-rowland do you have any tips on how to avoid this error? @aryo have you found the way to fix this or at least suppress the error? I am also not able to catch it with |
I am running into the same issue. We have been suppressing the error for now, but it is very annoying. |
Thanks for bringing this to our attention, and thanks @cmcaboy for pinging us again on this. I've created an internal ticket so that we can take a closer look at this. |
Any timeline by when this fix will be released ? |
I faced the same issue when testing repeated calls/hangups. When call |
@charliesantos we are also running into this issue here is a list of ways we managed to reproduce it:
Manual approach:
Users machine goes into sleep state:
Users internet connection drops:
I tested and adding twilio-voice.js/lib/twilio/device.ts Line 1137 in 0bf28a2
Another problem is that since For now a way to get around this issue for us was to check for |
Thanks @nemes-zoltan . This is helpful. |
Is it not simple enough internally to check device state before attempting to re-register? I think most of your consumers do this in their apps to avoid this error. Id imagine its fairly simple to do the same check within the SDK. |
@aburkowsky9 that's correct. This is currently within our radar and should be part of a future round of bug fixes. |
any updates for this? |
I recently upgraded from v1 to v2 of the SDK (2.8.0) and this error happens for us as well. It's easily reproducible in dev as others have stated by setting the token ttl to something short. |
@charliesantos when is it possible to get a fix for this issue? |
Hi @vasanthnathan, the fix is already on master branch. See changelog https://github.com/twilio/twilio-voice.js/blob/master/CHANGELOG.md#2100-in-progress It will get released in Jan. Thanks for bearing with us. |
fixed in 2.10.0 |
or sensitive account information (API keys, credentials, etc.) when reporting this issue.
Code to reproduce the issue:
device._shouldRegister
to be true internallyregister
because_shouldRegister
is true, and causes an Invalid State exception due to callingregister
while state is already registered.Expected behavior:
Should not throw exception
Actual behavior:
Throws exception
InvalidStateError: Attempt to register when device is in state "registered". Must be "unregistered".
Software versions:
The text was updated successfully, but these errors were encountered: