ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.29k stars 632 forks source link

Cannot read property 'getVideoTracks' of null #2972

Open anujjpandeykent opened 3 years ago

anujjpandeykent commented 3 years ago

Short description

Random crash due to getVideoTrack null

Environment

Steps to reproduce

  1. Random unexpected

Expected behavior

User request to connect with web rtc adapter, with camera and mic and it should get connected start streaming.

Actual behavior

Unexpectedly nothing is happening there only black screen when try to connect.

Logs

TypeError: Cannot read property 'getVideoTracks' of null at WebRTCAdaptor.closeStream(/main.js:10808:22) at VideoChatComponent.push../src/app/customer/video-chat/video-chat.component.ts.VideoChatComponent.endCall(/main.js:5183:22) at ? (/main.js:5170:22) at SockJS.onmessage(/vendor.js:244919:33) at SockJS.push../node_modules/sockjs-client/lib/event/eventtarget.js.EventTarget.dispatchEvent(/vendor.js:239894:20) at ? (/vendor.js:240686:16) at Array.forEach() at SockJS.push../node_modules/sockjs-client/lib/main.js.SockJS._transportMessage(/vendor.js:240684:17) at WebSocketTransport.push../node_modules/sockjs-client/lib/event/emitter.js.EventEmitter.emit(/vendor.js:239790:18) at WebSocketTransport.ws.onmessage as __zone_symbol__ON_PROPERTYmessage at WebSocket.wrapFn(/polyfills.js:3786:39) at WebSocket.sentryWrapped(/vendor.js:125256:23) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask(/polyfills.js:2877:31) at Object.onInvokeTask(/vendor.js:58227:33) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask(/polyfills.js:2876:60) at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask(/polyfills.js:2649:47) at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask as invoke at invokeTask(/polyfills.js:4198:14) at WebSocket.globalZoneAwareCallback(/polyfills.js:4224:17)

mekya commented 3 years ago

hi @anujjpandeykent ,

Could you please try the latest version 2.3 Release Candidate? Because we've added null-check in the method.

Community edition is available to download on Github https://github.com/ant-media/Ant-Media-Server/releases

Enterprise edition is available to download on your antmedia.io account under Subscriptions > Downloads

anujjpandeykent commented 3 years ago

Gettubg errir of ssl while we enabling ssl, normally it was not coming with older version, we also tried with fresh installation still getting the issue:

ubuntu@antmedia-origin:/usr/local/antmedia$ sudo ./enable_ssl.sh -f camcall.crt -p camcall.key -d media-origin.camcall.io domain: media-origin.camcall.io

Importing keystore /usr/local/antmedia/media-origin.camcall.io/fullchain_and_key.p12 to /usr/local/antmedia/media-origin.camcall.io/keystore.jks... Existing entry alias tomcat exists, overwrite? [no]: ^CThere is a problem in installing SSL to Ant Media Server. Please take a look at the logs above and try to fix. If you do not have any idea, contact@antmedia.io ubuntu@antmedia-origin:/usr/local/antmedia$ keytool -delete -noprompt -alias "tomcat" -keystore/usr/local/antmedia/media-origin.camcall.io/keystore.jks Illegal option: -keystore/usr/local/antmedia/media-origin.camcall.io/keystore.jks keytool -delete [OPTION]...

Untitled

mekya commented 3 years ago

@muratugureminoglu could you please take a look at?

muratugureminoglu commented 3 years ago

@anujjpandeykent Could you please delete /usr/local/antmedia/media-origin.camcall.io/ file then, rerun enable_ssl.sh ?