google / android-emulator-container-scripts

1.82k stars 256 forks source link

Using emulator view: webrtc from State:connect to State: disconnected #300

Open crazier opened 2 years ago

crazier commented 2 years ago

I have deployed this project as the instruction and config the turn server. and when I open the web rtc page, It can connect the emulator using the webrtc method, But it change the status to disconnected quickly about 30 seconds.

image image

and find the "TURN create permission timeout 576841304c72326878556d4b" error

022-03-19T16:33:43.187534954Z video: (video_source_sink_controller.cc:83): Pushing SourceSink restrictions: max_fps=60 max_pixel_count=2147483647 target_pixel_count=null resolutions={1080x1920} 2022-03-19T16:33:43.187753798Z video: (GrpcVideoSource.cpp:244): OnSinkWantsChanged desired pixels: 0, max: 2147483647, fps: 60, align: 1 2022-03-19T16:33:43.187882341Z video: (network.cc:929): Connect failed with 99 2022-03-19T16:33:44.190939974Z video: (bitrate_prober.cc:114): Probe cluster (bitrate:min bytes:min packets): (5000000:9375:5) 2022-03-19T16:33:45.188282074Z video: (probe_bitrate_estimator.cc:159): Probing successful [cluster id: 11] [send: 7046 bytes / 12 ms = 4697333 bps ] [receive: 7698 bytes / 26 ms = 2368615 bps] 2022-03-19T16:33:45.188325963Z video: (probe_bitrate_estimator.cc:159): Probing successful [cluster id: 11] [send: 7974 bytes / 12 ms = 5316 kbps ] [receive: 8626 bytes / 26 ms = 2654153 bps] 2022-03-19T16:33:45.188333302Z video: (probe_bitrate_estimator.cc:159): Probing successful [cluster id: 11] [send: 8902 bytes / 20 ms = 3560800 bps ] [receive: 9554 bytes / 27 ms = 2830814 bps] 2022-03-19T16:33:45.188365545Z video: (probe_bitrate_estimator.cc:159): Probing successful [cluster id: 11] [send: 9830 bytes / 20 ms = 3932 kbps ] [receive: 10482 bytes / 27 ms = 3105777 bps] 2022-03-19T16:33:45.188370227Z video: (network.cc:929): Connect failed with 99 2022-03-19T16:33:47.194496506Z video: (bitrate_allocator.cc:394): Current BWE 2950488 2022-03-19T16:33:47.194567323Z video: (network.cc:929): Connect failed with 99 2022-03-19T16:33:48.190223708Z video: (turn_port.cc:1690): Port[9d02800:0:1:0:relay:Net[eth0:172.18.0.x/16:Ethernet:id=1]]: TURN create permission timeout 576841304c72326878556d4b

this is the entire log

crazier commented 2 years ago

this is the entire emulator video log emulator_video_log.log

crazier commented 2 years ago

### turn server log: 86811: session 002000000000000036: peer 172.18.0.5 lifetime updated: 300 86811: session 002000000000000036: realm user <>: incoming packet CREATE_PERMISSION processed, success 86812: session 002000000000000036: peer 172.18.0.5 lifetime updated: 600 86812: session 002000000000000036: realm user <>: incoming packet CHANNEL_BIND processed, success 86812: session 001000000000000024: peer my_turnserver_ip_replaced lifetime updated: 300 86812: session 001000000000000024: realm user <>: incoming packet CREATE_PERMISSION processed, success 86819: session 002000000000000036: refreshed, realm=, username=<>, lifetime=0 86819: session 002000000000000036: realm user <>: incoming packet REFRESH processed, success 86820: session 001000000000000024: realm user <>: incoming packet BINDING processed, success 86820: session 002000000000000036: closed (2nd stage), user <> realm origin <>, local my_turnserver_ip_replaced:3478, remote 10.12.194.144:49257, reason: allocation timeout 86820: session 002000000000000036: delete: realm=, username=<> 86820: session 002000000000000036: peer 172.18.0.5 deleted 86830: session 001000000000000024: realm user <>: incoming packet BINDING processed, success

IgorIvanter commented 10 months ago

I have the same issue, but for me WebRTC view doesn't work at all, not even in the first 30 seconds. Can I ask what Ubuntu, python and npm versions are you using?

ajaysagar99 commented 6 months ago

@IgorIvanter @crazier were you able to make it work? I'm not able to see the video view

IgorIvanter commented 6 months ago

@IgorIvanter @crazier were you able to make it work? I'm not able to see the video view

Hey man, no, unfortunately I couldn't make it work. Only the PNG view.

ajaysagar99 commented 6 months ago

@IgorIvanter I am on Ubuntu 22 and am using Canary version of the emulator - exactly did the steps here in troubleshooting section and it was working this time - https://source.android.com/docs/automotive/start/avd/cloud_emulator

Do try it out