google / android-emulator-container-scripts

1.84k stars 259 forks source link

WebRTC view not work but the png view working #253

Open maithanhtan opened 3 years ago

maithanhtan commented 3 years ago

Hi Team, I am trying to find why my webrtc view not working: It show connected when login with white screen. Afew second later it show Disconnected state with dark screen. From browser console log I did not find anything abnormal image

Can you please help to guide how to troubleshoot this case.

FYI: the png view is working so i think the emulator if work. there something wrong for the webrtc view only

Thank you

pokowaka commented 3 years ago

This is most likely a networking issue. Could you share the docker logs. Only the lines starting with: "video:" are of importance.

ashikkaiser commented 3 years ago

emulator_1 | video: (network.cc:929): Connect failed with 99 emulator_1 | video: (video_stream_encoder.cc:1317): Number of frames: captured 204, dropped (due to congestion window pushback) 0, dropped (due to encoder blocked) 0, interval_ms 60000

pokowaka commented 3 years ago

The 'Connect failed with 99' is a red herring. The page: chrome://webrtc-internals/ in chrome will show debug information about WebRTC connections that are being established.

built-by-as commented 3 years ago

I am having the same issue. chrome://webrtc-internals does not give much information, it just says the connection failed

chgans commented 2 years ago

Same issue, latest master branch w/ Firefox 93.0 64 bits on Linux

chgans commented 2 years ago

error in firefox console is:

WebRTC: ICE failed, add a STUN server and see about:webrtc for more details

Screenshot_20211103_181928

the client and the server are remote and connected through a VPN. Maybe that is the issue

chgans commented 2 years ago

The problem is that the remote candidate is the internal docker IP address (eg 10.x.y.z) instead of the machine's IP. I tried to setup a TURN server as per https://source.android.com/devices/automotive/start/avd/cloud_emulator#troubleshooting, but the web page is still trying to connect to the docker IP address, not the server public address

chgans commented 2 years ago

After fixing a typo, it is now working using coturn! :)

Eslam-mohammed-anwar commented 1 year ago

@chgans Which typo , i may face the same issue here

ajaysagar99 commented 8 months ago

@chgans @Eslam-mohammed-anwar what typo was this? @pokowaka can you kindly help