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

v1.3.1 ERROR TypeError: Cannot read properties of undefined (reading 'id') #1310

Open
1 task done
davgia opened this issue Dec 26, 2024 · 0 comments
Open
1 task done
Labels
bug unconfirmed not yet verified as an issue

Comments

@davgia
Copy link

davgia commented Dec 26, 2024

Please, check for existing issues to avoid duplicates.

  • No similar issues found.

What happened?

I am using peerjs version 1.3.1 from an Angular 8 project (https://github.com/davgia/telestroke-web-frontend). I receive the following error when trying to manage streams:

ERROR TypeError: Cannot read properties of undefined (reading 'id')
    at push../node_modules/peerjs/dist/peerjs.min.js.parcelRequire.HCdX.o._addStreamToMediaConnection (peerjs.min.js:54:8692)
    at e.ontrack (peerjs.min.js:54:4039)
    at RTCPeerConnection.i (peerjs.min.js:6:940)
    at ZoneDelegate.invokeTask (zone.js:423:1)
    at Object.onInvokeTask (core.js:26247:1)
    at ZoneDelegate.invokeTask (zone.js:422:1)
    at Zone.runTask (zone.js:195:1)
    at ZoneTask.invoke (zone.js:498:1)
    at invokeTask (zone.js:1693:1)
    at RTCPeerConnection.globalZoneAwareCallback (zone.js:1719:1)

My guess is that this error is thrown after this print, but I don't know exactly where:

https://github.com/davgia/telestroke-web-frontend/blob/73e0c5a13dd8240c0f6a6e652babf14b49a5211f/src/app/services/peer.service.ts#L188

How can we reproduce the issue?

It's a bit difficult to reproduce because there are multiple components in my project, a bunch of microservices, an angular web frontend and an android application.

If necessary I will try to create a new lightweight project.

What do you expected to happen?

My project is 4 years old but I am sure it was working fine. I haven't changed anything so my guess is that some api have been deprecated in webrtc. I had to update my android project too due to some deprecations (mainly addStream and removeStream method have been deprecated in favour of addTrack and removeTrack; but it's Android, I don't know if it's the same for webrtc web).

Environment setup

  • OS: linux (Docker Desktop on Windows 11)
  • Platform: Angular 8.2
  • Browser: Chrome 131.0.6778.205

Is this a regression?

I don't know, it was working 4 years ago. I think something has changed outside peerjs. So no, I don't think so.

Anything else?

My project is 4 years old, I am trying to update it but it's difficult. I cannot give additional support right now.

@davgia davgia added bug unconfirmed not yet verified as an issue labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unconfirmed not yet verified as an issue
Projects
None yet
Development

No branches or pull requests

1 participant