mganeko / mediasoup_sample

Multiple participants sample for WebRTC SFU mediasoup with node.js
MIT License
39 stars 14 forks source link

Not working due to Rtcpeerconnection of undefined. #7

Open vishaljain790 opened 6 years ago

vishaljain790 commented 6 years ago

_2018-08-23T07:13:47.874323+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=glacial-mesa-51801.herokuapp.com request_id=f4fbca96-eca9-4f5e-9ad8-e947e9518220 fwd="175.111.131.179" dyno= connect= service= status=503 bytes= protocol=https 2018-08-23T07:16:20.246950+00:00 heroku[run.9819]: State changed from up to complete 2018-08-23T07:16:20.227548+00:00 heroku[run.9819]: Process exited with status 0 2018-08-23T07:16:31.952638+00:00 app[api]: Starting process with command bash by user vishaljain790@gmail.com 2018-08-23T07:16:39.868799+00:00 heroku[run.7193]: Awaiting client 2018-08-23T07:16:39.888509+00:00 heroku[run.7193]: Starting process with command bash 2018-08-23T07:16:40.222233+00:00 heroku[run.7193]: State changed from starting to up 2018-08-23T07:18:26.662227+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=glacial-mesa-51801.herokuapp.com request_id=ecc3d280-3197-454b-8521-76eaf7446518 fwd="175.111.131.179" dyno= connect= service= status=503 bytes= protocol=https 2018-08-23T07:18:27.060421+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=glacial-mesa-51801.herokuapp.com request_id=630a5c19-642c-4266-bd6e-2beab8e4776b fwd="175.111.131.179" dyno= connect= service= status=503 bytes= protocol=https 2018-08-23T07:20:43.000000+00:00 app[api]: Build started by user vishaljain790@gmail.com 2018-08-23T07:21:19.887398+00:00 heroku[web.1]: State changed from crashed to starting 2018-08-23T07:21:19.651895+00:00 app[api]: Deploy a88b7963 by user vishaljain790@gmail.com 2018-08-23T07:21:19.651895+00:00 app[api]: Release v6 created by user vishaljain790@gmail.com 2018-08-23T07:21:27.687069+00:00 heroku[web.1]: Starting process with command npm start 2018-08-23T07:21:29.848072+00:00 app[web.1]: [heroku-exec] Starting 2018-08-23T07:21:30.230469+00:00 app[web.1]: 2018-08-23T07:21:30.230507+00:00 app[web.1]: > mediasoup_sample@1.0.0 start /app 2018-08-23T07:21:30.230508+00:00 app[web.1]: > node mediasoup_sample_socketio.js 2018-08-23T07:21:30.230509+00:00 app[web.1]: 2018-08-23T07:21:30.454007+00:00 app[web.1]: /app/mediasoup_sample_socketio.js:21 2018-08-23T07:21:30.454010+00:00 app[web.1]: const RTCPeerConnection = mediasoup.webrtc.RTCPeerConnection; 2018-08-23T07:21:30.454012+00:00 app[web.1]: ^ 2018-08-23T07:21:30.454013+00:00 app[web.1]: 2018-08-23T07:21:30.454015+00:00 app[web.1]: ```

**

TypeError: Cannot read property 'RTCPeerConnection' of undefined**

2018-08-23T07:21:30.454016+00:00 app[web.1]: at Object. (/app/mediasoup_sample_socketio.js:21:44) 2018-08-23T07:21:30.454017+00:00 app[web.1]: at Module._compile (module.js:652:30) 2018-08-23T07:21:30.454020+00:00 app[web.1]: at Module.load (module.js:565:32) 2018-08-23T07:21:30.454018+00:00 app[web.1]: at Object.Module._extensions..js (module.js:663:10) 2018-08-23T07:21:30.454021+00:00 app[web.1]: at tryModuleLoad (module.js:505:12) 2018-08-23T07:21:30.454023+00:00 app[web.1]: at Function.Module.runMain (module.js:693:10) 2018-08-23T07:21:30.454024+00:00 app[web.1]: at startup (bootstrap_node.js:191:16) 2018-08-23T07:21:30.454022+00:00 app[web.1]: at Function.Module._load (module.js:497:3) 2018-08-23T07:21:30.461198+00:00 app[web.1]: npm ERR! Exit status 1 2018-08-23T07:21:30.459642+00:00 app[web.1]: npm ERR! code ELIFECYCLE 2018-08-23T07:21:30.454026+00:00 app[web.1]: at bootstrap_node.js:612:3 2018-08-23T07:21:30.459938+00:00 app[web.1]: npm ERR! errno 1 2018-08-23T07:21:30.461386+00:00 app[web.1]: npm ERR! 2018-08-23T07:21:30.461520+00:00 app[web.1]: npm ERR! Failed at the mediasoup_sample@1.0.0 start script. 2018-08-23T07:21:30.461094+00:00 app[web.1]: npm ERR! mediasoup_sample@1.0.0 start: node mediasoup_sample_socketio.js 2018-08-23T07:21:30.461648+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2018-08-23T07:21:30.468258+00:00 app[web.1]: 2018-08-23T07:21:30.468394+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2018-08-23T07:21:30.468486+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-08-23T07_21_30_462Z-debug.log 2018-08-23T07:21:30.531976+00:00 heroku[web.1]: State changed from starting to crashed 2018-08-23T07:21:30.517250+00:00 heroku[web.1]: Process exited with status 1 2018-08-23T07:21:36.000000+00:00 app[api]: Build succeeded 2018-08-23T07:21:56.181906+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=glacial-mesa-51801.herokuapp.com request_id=708f3478-bc23-4a0f-8602-10d6f302a006 fwd="175.111.131.179" dyno= connect= service= status=503 bytes= protocol=https 2018-08-23T07:21:57.308101+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=glacial-mesa-51801.herokuapp.com request_id=dc7d09e4-9653-41ac-b325-fae2a6677398 fwd="175.111.131.179" dyno= connect= service= status=503 bytes= protocol=https

Getting this while uploading on heroku server.

_

remorr25 commented 5 years ago

const RTCPeerConnection = mediasoup.webrtc.RTCPeerConnection; ^

TypeError: Cannot read property 'RTCPeerConnection' of undefined

Getting undefine issue on "mediasoup@2.2.3".

mganeko commented 5 years ago

I am afraid that you are using mediasoup V2. Please try another example by footniko.

https://github.com/footniko/mediasoup-sample

mganeko commented 5 years ago

For mediasoup v2, please try https://github.com/mganeko/mediasoup_sample_v2