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

RTCPeerConnection.createOffer only implements the old non-Promise API #128

Open
BkPHcgQL3V opened this issue Nov 30, 2020 · 2 comments
Open

Comments

@BkPHcgQL3V
Copy link

In the context of webtorrent-hybrid, I'm seeing stack traces such as the following:

/myapp/node_modules/electron-webrtc/src/RTCPeerConnection.js:189
          cb(offer)
          ^
TypeError: cb is not a function
    at /myapp/node_modules/electron-webrtc/src/RTCPeerConnection.js:189:11
    at Daemon.<anonymous> (/myapp/node_modules/electron-webrtc/src/RTCPeerConnection.js:277:11)
    at Object.onceWrapper (node:events:483:26)
    at Daemon.emit (node:events:376:20)
    at ChildProcess.<anonymous> (/myapp/node_modules/electron-eval/lib/index.js:195:27)
    at ChildProcess.emit (node:events:376:20)
    at DestroyableTransform.<anonymous> (/myapp/node_modules/electron-eval/lib/index.js:228:29)
    at DestroyableTransform.emit (node:events:376:20)
    at addChunk (/myapp/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:291:12)
    at readableAddChunk (/myapp/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:278:11)

See the definition of RTCPeerConnection.createOffer in this project.

Note that the MDN spec shows the three-argument version as deprecated.

Not visible in the stack trace, but createOffer is called by Peer._createOffer in simple-peer.

This is almost certainly the root cause of #52, though I'm not sure why this is manifesting in only some environments and not others when running webtorrent-hybrid.

CC @feross @yciabaud.

@BkPHcgQL3V
Copy link
Author

Potentially fixed by #91. Looks like this project is dead, I suggest replacing it in dependencies with a maintained one.

@realkotob
Copy link

@BkPHcgQL3V Were you able to find a maintained alternative?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants