Skip to content
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] TypeError: Cannot read properties of null (reading 'sdp') #100

Closed
4 tasks done
wjlroe opened this issue Jul 11, 2022 · 12 comments
Closed
4 tasks done

[BUG] TypeError: Cannot read properties of null (reading 'sdp') #100

wjlroe opened this issue Jul 11, 2022 · 12 comments
Labels
bug Something isn't working jira added

Comments

@wjlroe
Copy link

wjlroe commented Jul 11, 2022

  • I have verified that the issue occurs with the latest twilio.js release and is not marked as a known issue in the CHANGELOG.md.
  • I reviewed the Common Issues and open GitHub issues and verified that this report represents a potentially new issue.
  • I verified that the Quickstart application works in my environment.
  • I am not sharing any Personally Identifiable Information (PII)
    or sensitive account information (API keys, credentials, etc.) when reporting this issue.

Expected behavior:

Not raising exceptions due to calling sdp on a null value.

Actual behavior:

Periodically, we get this exception raised by the voice-sdk:

TypeError: Cannot read properties of null (reading 'sdp')

Here is the backtrace:

webpack://[name]/./node_modules/@twilio/voice-sdk/es5/twilio/rtc/rtcpc.js:120:in sdp
webpack://[name]/./node_modules/@twilio/voice-sdk/es5/twilio/call.js:250:in getSDP
webpack://[name]/./node_modules/events/events.js:158:in ReflectApply
webpack://[name]/./node_modules/@twilio/voice-sdk/es5/twilio/pstream.js:179:in emit
webpack://[name]/./node_modules/events/events.js:153:in ReflectApply
webpack://[name]/./node_modules/@twilio/voice-sdk/es5/twilio/wstransport.js:173:in emit

We have seen this error twice in the last month, with a user base of ~400 users.

Software versions:

  • Browser(s): Chrome
  • Operating System: ChromeOS
  • twilio.js: 2.1.1
  • Third-party libraries (e.g., Angular, React, etc.): ReactJS 17.0.39
@wjlroe wjlroe added the bug Something isn't working label Jul 11, 2022
@djeer
Copy link

djeer commented Aug 3, 2022

I'm not the topic-starter, yet...
We're having huge spike of such errors in the last two days.

  • Our customers reported call interruptions, that's why we started investigation
  • We run E2E tests in CI pipelines and three "headless chrome" events on the screenshot caused exactly three calls test pipeline failures at 15:06 02 Aug 2022 UTC and 11:51, 11:58 03 Aug 2022 UTC
  • There are no errors in the Twilio console logs
  • There are no active incidents related to calls

image

@djeer
Copy link

djeer commented Aug 3, 2022

Here is our stack trace if it might help

image

@ilanskogan
Copy link

ilanskogan commented Sep 29, 2022

getting this too, any updates?
@djeer I also got a complain from a client which started to have dropped calls, I saw he was getting this error too.
We also got a screen recording of such a call from him and you can see there how the sdk threw "reconnecting" event and then the call dropped, maybe that can help.

@charliesantos
Copy link
Collaborator

Hello everyone. Apologies for the delay. We're not able to reproduce this internally, unfortunately.
Do you have client logs and callsid by any chance?

@iamplo
Copy link

iamplo commented Dec 21, 2022

Seeing this as well. We can reproduce under the following conditions:

  1. Receive incoming call to client browser (Chrome).
  2. Reject the pending call using call.reject().
  3. Refresh token using device.updateToken(newtoken).
  4. Observe the error thrown
  5. The same error is thrown and continues to throw at each updateToken interval.
Uncaught TypeError: Cannot read properties of null (reading 'getSDP')
    at t.<anonymous> (call.ts:1081:36)
    at t.emit (events.js:158:7)
    at t._handleTransportMessage (pstream.js:179:8)
    at t.emit (events.js:153:5)
    at WebSocket.<anonymous> (wstransport.ts:453:10)
(anonymous) @ call.ts:1081
(anonymous) @ events.js:158
(anonymous) @ pstream.js:179
(anonymous) @ events.js:153
(anonymous) @ wstransport.ts:453

SPA React 17.0.1
@twilio/voice-sdk 2.1.2
Browser: Chrome Version 107.0.5304.121 (Official Build) (x86_64)
MacOS: Ventura 13.0.1

@charliesantos
Copy link
Collaborator

Thanks for the repro steps @iamplo . I submitted an internal ticket to track this issue.

@gwing33
Copy link

gwing33 commented Mar 7, 2023

We also run into this, we get about ~1k errors a day due to this, 52k total over the last 4 months.

image

@ppascualv
Copy link

I had the same issue following @iamplo steps with the last version, is there any fix coming?

@charliesantos
Copy link
Collaborator

Thanks for the ping. It's currently in our roadmap but no accurate date yet.

@charliesantos
Copy link
Collaborator

Should be fixed in 2.4.0

@wjlroe
Copy link
Author

wjlroe commented May 4, 2023

This error is still occurring with twilio-voice JS SDK version 2.4.0, same stack trace.

@charliesantos
Copy link
Collaborator

Thanks @wjlroe . I see you submitted #163 . It might be a different repro steps than what @iamplo mentioned in the above comments. Let's address your issue in #163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working jira added
Projects
None yet
Development

No branches or pull requests

8 participants