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 'getSDP') #163

Closed
4 tasks done
wjlroe opened this issue May 4, 2023 · 10 comments
Closed
4 tasks done

[BUG] TypeError: Cannot read properties of null (reading 'getSDP') #163

wjlroe opened this issue May 4, 2023 · 10 comments
Assignees
Labels
bug Something isn't working jira added

Comments

@wjlroe
Copy link

wjlroe commented May 4, 2023

  • 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 calling getSDP on a null value

Actual behavior:

Periodically, we get this exception raised by twilio-voice:

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

Here is the backtrace:

webpack://[name]/./node_modules/@twilio/voice-sdk/es5/twilio/call.js:275 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 see this error between 1-5 times a day, with a userbase of ~400 users.

This is the same error as #98 but with an updated backtrace that's relevant to the current twilio-voice JS SDK version.

Software versions:

  • Browser(s): Chrome
  • Operating System: ChromeOS
  • twilio.js: 2.4.0
  • Third-party libraries (e.g., Angular, React, etc.): ReactJS 17.0.2
@charliesantos
Copy link
Collaborator

Thanks for submitting @wjlroe . As mentioned in #100, we cannot reproduce this anymore using the steps in #100. While we can simply do a check to not throw an error if getSDP is undefined, it doesn't fix the underlying problem. Do you by any chance able to reproduce using our quickstart? Or can you enable debug mode and grab some logs whenever this issue happens?

@nemes-zoltan
Copy link

nemes-zoltan commented May 17, 2023

@charliesantos some ways our team managed to reproduce is:

"@twilio/voice-sdk": "^2.4.0"

During an incoming call do one of the following:

  • Update Twilio token
  • Bad internet connection
  • Do something that creates small interruption in internet connection something like turning on a VPN
  • Possibly switching wifi connection can also cause this (haven't tested this one)

@charliesantos
Copy link
Collaborator

@nemes-zoltan this is helpful, thank you. I'll create an internal ticket to track this with your repro steps.

@Greg-Rose
Copy link

Is there any update on this?

We're now also running into this issue while trying to follow the recommendation here for updating the device token.

It is recommended to call this API after device.tokenWillExpire event is emitted, and before
or after a call to prevent a potential ~1s audio loss during the update process.

When updating the token on the incoming call event (before accepting the call), the TypeError: Cannot read properties of null (reading 'getSDP') error gets raised.

This is happening on "@twilio/voice-sdk": "^2.4.0".

@charliesantos
Copy link
Collaborator

@Greg-Rose no updates yet but this is in our radar. Are your repro steps same as what was mentioned here?

@Greg-Rose
Copy link

@Greg-Rose no updates yet but this is in our radar. Are your repro steps same as what was mentioned here?

Yes, the repro steps are the same.

@aburkowsky9
Copy link

aburkowsky9 commented Jul 27, 2023

I get this error every time I update the device token using device.updateToken() after using call.ignore() or call.reject() indefinitely until the browser session is either refreshed, closed, or device is destroyed and reinstantiated.

@Shivamp629
Copy link

Shivamp629 commented Aug 1, 2023

+1, we are also seeing these errors. The status of the calls result in "no-answer".

TypeError: Cannot read properties of null (reading 'getSDP')
at i._onConnected @ https://example.com/static/js/main.5c190d50.js:2:816388
at i.emit @ https://example.com/static/js/main.5c190d50.js:2:1220922
at f._handleTransportMessage @ https://example.com/static/js/main.5c190d50.js:2:894284
at i.emit @ https://example.com/static/js/main.5c190d50.js:2:1220865
at a._onSocketMessage @ https://example.com/static/js/main.5c190d50.js:2:956277

@charliesantos
Copy link
Collaborator

Thanks @Shivamp629 @aburkowsky9 for reaching out. This has been put higher in priority and will be part of the next round of bug fixes.

@charliesantos
Copy link
Collaborator

fixed in 2.7.3

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

7 participants