• RAE
  • Streaming Video Issues with RAE - Default app

The RAE - Default app dose not always stream video.

Sometimes if I sit on the page long enough (the local page) it will load up the video, but it can take 3-5 mins. Once it loads it up it will work until I refresh and then its lost until I restart the robothub cli. I usually just see a "Waiting for a stream…."

Is anyone else having these issues? I am running version 1.1.0.

Thanks.

    This is a snip of the logs I am getting from robothub-ctl

    282 23:31:21 W user/agent : recordings directory does not exist

    282 23:31:21 I user/agent/hub-connection : received see_you

    282 23:31:22 I stream-handler : I am alive ...

    282 23:31:22 I stream-handler/streaming : Streaming stats:

    282 23:31:22 I stream-handler/streaming : ... [appId=ed5c6785-1539-40db-8963-fb266427957e]

    282 23:31:22 I stream-handler/streaming : ... ... [streamId=27af563e-1617-4440-bb18-9d0e1f1f50a7] FPS: 30

    282 23:31:22 I stream-handler/streaming : ... ... [streamId=34ad34f0-7964-43be-88f4-1338c9168699] FPS: 30

    282 23:31:23 E stream-handler/streaming : request connection timed out (10s)

    282 23:31:23 E stream-handler : Cannot request stream

    {

    "error": {

    "message": "Cannot request stream!",
    
    "name": "Error",
    
    "stack": "Error: Cannot request stream!\\n    at acquireSdp (file:///usr/libexec/robothub/robothub-stream-handler.mjs:53902:15)"

    }

    }

    282 23:31:43 E user/agent/streaming : requestCloudWebRtcStream() failed

    {

    "error": {

    "message": "timeout! (30000 ms)",
    
    "name": "TimeoutError",
    
    "stack": "TimeoutError: timeout! (30000 ms)\\n    at Timeout._onTimeout (file:///usr/libexec/robothub/robothub-agent.mjs:43633:14)\\n    at listOnTimeout (node:internal/timers:569:17)\\n    at process.processTimers (node:internal/timers:512:7)"

    }

    }

      Davidr99 this says that the video stream connection timed out before opening

      we dont stream video directly but use WebRTC, which depending on network setup, goes directly or trough intermediary server

      in this case, what you observe is that the initial connection opening phase is taking too long ( collecting possible connection options ) and it times out

      So to give a little more information I use OpnSense router. I just tested this on a different router to see if it would work and it dose. So I am guessing something is blocking a UDP packet, but I am just not seeing anything being blocked.

        Davidr99 we had one customer who uses similar FW/router and they needed to explicitly allow

        TCP/UDP 3478 for these two IPs
        5.161.83.56, 128.140.86.248

        I did make that change and still having no luck.

        So I have tried many things I even changed my router from OpnSense to pfSense to see if that helped, it did not. So I set up my old Asus Router, at another location they had an Asus router and it worked, but even with that change no luck. If anyone has any other suggestions that would be great. I did some packet captures and found that it looks like the packets are all going though, I could not see any rejected packets and the STUN looked to be working correctly.

        I will say that at times if I wait long enough on the page (10 mins) it will start working.

        Thanks.

          Davidr99 Appreciate your effort to understand and resolve the issue. The thing is that the blocking can be happening upstream (ISP).

          I did some packet captures and found that it looks like the packets are all going though, I could not see any rejected packets and the STUN looked to be working correctly.

          Can you share with us those? Where are you capturing these packets? On RAE or on the router?

          Based on what you judge STUN is working correctly?

          As for why it works if you wait long enough -> that comes down to our less-than-fortunate implementation (which we aim to change, but not easy to do). Where we wait until all possible connection options are collected. This is not needed for the local network and rather than presenting timeout (as we do now) we could just use whatever options we were able to collect in the time.

          Thus waiting long enough means that the collection process eventually finishes and you get your candidates transferred over to the frontend.

          7 months later

          So I kind of walked away from this for a little bit and came back still having the same issues. I did find when it worked it is using UDP broadcasts. I do not see any blocks on the router, but I can say that using an off the self router dose work, so I was wondering if anyone has figured out a fix for this?

          Here is a packet capture from my router:

          So after a long battle I found the issue. It was looking up the us-east.turn.robothub.cloud and eu-central.turn.robothub.cloud to their IPv6 addresses, and trying to use IPv6. My ISP dose not use IPv6 so this causes it to timeout.

          Hi @Davidr99
          Thanks for the info. We will put it in the docs in case someone experiences a similar issue.