Giter Site home page Giter Site logo

webrtc-troubleshooter's Introduction

webrtc-troubleshooter

Build Status Coverage Status

This provides diagnostic tests for basic WebRTC functionality. See the test-page directory for usage.

Getting Started

Develop

To develop diagnostic tests this repo has a utility ./test-page/index.html that pulls in the tests and runs them in the browser. For WebRTC connections, most of the tests force the use of relay since the tests make peer connections to the same host.

  • npm start will run webpack with the --watch flag and serve the test-page using stupid server.
    • This is super helpful when you are writing new tests. You will still need to refrash the browser to pick up any new changes, but at least webpack will rebuild the app when you save a file :)

test-page/index.html for console output of 6 tests to ensure webrtc is properly functioning

Here is a stringified version of google's STUN servers for quick reference. Granted, you will still need an active TURN server for some of these tests to pass, but this will get the tests started.

[{"type":"stun","urls":"stun:stun.l.google.com:19302"}]

Testing

The tests now use Jest!

Test names must match the *.spec.ts or *.spec.js naming convention. This is configured in jest.config.js

  • npm test will run both linting, all the unit-test, and report coverage in text form in the command line.
  • npm run test:watch will run only the unit-tests and watch the files for changes (it also skips code coverage reporting).

webrtc-troubleshooter's People

Contributors

ckbrewer33 avatar djhouseknecht avatar greenkeeperio-bot avatar inindevevangelists avatar jbelmont avatar jensengar avatar xdumaine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webrtc-troubleshooter's Issues

Send Bandwidth estimates values are incorrect

With a build current master 11.01 I can get
stats:
mbpsAvg: 296.5672520721126
mbpsMax: 526.5039539468798
packetLoss: 0
rampUpTimeMs: 414
resolution: "1280x720"
rttAverage: 29.47263896103894
rttMax: 78

but I only have a 2Mbps uplink, so this must be incorrect.

Missing license

Could you please provide some license information?

Cheers!

Video Bandwidth always timeout

So I've been testing, all tests isworking but when the step is going to Video Bandwidth, step failure.

{
  "options": {
    "iceConfig": {
      "iceServers": [
        {
          "urls": "stun:global.stun.twilio.com:3478?transport=udp"
        },
        {
          "username": "b18e2c7189580662eae445df45649d5a85195b45b5ad674cdd03e144cc5eafb1",
          "urls": "turn:global.turn.twilio.com:3478?transport=udp",
          "credential": "jnkhHjlELk9C9lbtOnAqON6FUSHze485CyPkpa4WMzo="
        },
        {
          "urls": "stun:global.stun.twilio.com:3478?transport=udp"
        },
        {
          "username": "b18e2c7189580662eae445df45649d5a85195b45b5ad674cdd03e144cc5eafb1",
          "urls": "turn:global.turn.twilio.com:3478?transport=udp",
          "credential": "jnkhHjlELk9C9lbtOnAqON6FUSHze485CyPkpa4WMzo="
        },
        {
          "username": "b18e2c7189580662eae445df45649d5a85195b45b5ad674cdd03e144cc5eafb1",
          "urls": "turn:global.turn.twilio.com:3478?transport=tcp",
          "credential": "jnkhHjlELk9C9lbtOnAqON6FUSHze485CyPkpa4WMzo="
        },
        {
          "username": "b18e2c7189580662eae445df45649d5a85195b45b5ad674cdd03e144cc5eafb1",
          "urls": "turn:global.turn.twilio.com:443?transport=tcp",
          "credential": "jnkhHjlELk9C9lbtOnAqON6FUSHze485CyPkpa4WMzo="
        }
      ],
      "iceTransports": "relay"
    },
    "mediaOptions": {
      "audio": true,
      "video": true
    },
    "maxVideoBitrateKbps": 144
  },
  "logger": {
    "memory": {
      
    }
  },
  "running": false,
  "defaultTimeout": 45000,
  "deferred": {
    
  },
  "promise": {
    
  },
  "name": "Video Bandwidth Test",
  "maxVideoBitrateKbps": 2000,
  "durationMs": 40000,
  "statStepMs": 100,
  "bweStats": {
    "startTime": 1619858236161,
    "sum": 103184798,
    "count": 387,
    "max": 554647,
    "rampUpThreshold": 1500000,
    "rampUpTime": null
  },
  "lastBytesSent": 1026046,
  "bweStats2": {
    "startTime": 1619858236266,
    "sum": 9972819.220309,
    "count": 386,
    "max": 63852.941176470595,
    "rampUpThreshold": null,
    "rampUpTime": null
  },
  "rttStats": {
    "startTime": 1619858236057,
    "sum": 59258.76300000002,
    "count": 769,
    "max": 261,
    "rampUpThreshold": 0,
    "rampUpTime": 1619858236057
  },
  "videoStats": [
    640,
    480
  ],
  "constraints": {
    "audio": false,
    "video": {
      "width": {
        "min": 640,
        "ideal": 1280,
        "max": 1920
      },
      "height": {
        "min": 480,
        "ideal": 720,
        "max": 1080
      }
    }
  },
  "log": [
    "info: {\"status\":\"pending\",\"constraints\":{\"audio\":false,\"video\":{\"width\":{\"min\":640,\"ideal\":1280,\"max\":1920},\"height\":{\"min\":480,\"ideal\":720,\"max\":1080}}}}",
    "info: {\"status\":\"success\",\"camera\":\"Integrated Camera (5986:1135)\"}",
    "info: {\"status\":\"success\",\"message\":\"establishing connection\"}",
    "info: Video resolution: 640x480",
    "info: Send bandwidth estimate average: 25.836319223598448 mpbs",
    "info: Send bandwidth estimate max: 63.852941176470594 mbps",
    "info: Send bandwidth ramp-up time: Infinity ms",
    "info: RTT average: 77.0595097529259 ms",
    "info: RTT max: 261 ms",
    "info: Packets sent: undefined",
    "info: Lost packets: undefined"
  ],
  "stats": {
    "resolution": "640x480",
    "mbpsAvg": 25.836319223598448,
    "mbpsMax": 63.852941176470594,
    "rampUpTimeMs": null,
    "rttAverage": 77.0595097529259,
    "rttMax": 261,
    "packetLoss": 0.018370607028753993
  },
  "timeoutHandle": 1289,
  "startTime": "2021-05-01T08:37:15.956Z",
  "localStream": {
    
  },
  "nextTimeout": 2572,
  "packetsSent": 1252,
  "lastTimestamp": 1619858275879,
  "packetsLost": 23
}

image

Connectivity test throws Error "No valid ICE candidates were found to establish a peer connection" on slow bandwidth

With latest version 11.0.4 we are getting ICE servers error on slow bandwidth e.g 100kbps to 400kbps and also getting the stats object as empty. Also the bandwidth estimate values are not consistent during various tests performed.

Here are some tests I have performed with various bandwidths

100kbps Up/Down

Error: No valid ICE candidates were found to establish a peer connection

Empty stats object

200kbps Up and 150kbps Down

Error: No valid ICE candidates were found to establish a peer connection

Empty stats object

300kbps Up/Down

Error: No valid ICE candidates were found to establish a peer connection

Empty stats object

400kbps Up/Down

Error: No valid ICE candidates were found to establish a peer connection

Empty stats object

500kbps Up/Down

1st test:
mbpsAvg: 14.935494741166647
mbpsMax: 26.24816089950849
packetLoss: 0

2nd test:
mbpsAvg: 16.070512817692187
mbpsMax: 26.181628958548472
packetLoss: 0.021739130434782608


3rd test
mbpsAvg: 17.9162999196205
mbpsMax: 24.787708353168377
packetLoss: 0


4th test: 
mbpsAvg: 34.97820883552191
mbpsMax: 47.35254922994183
packetLoss: 0.11052631578947368


5th test:
mbpsAvg: 16.810944688738243
mbpsMax: 28.55123426881235
packetLoss: 0.0861244019138756


600kbps Up/Down

1st test:
mbpsAvg: 14.79925181575713
mbpsMax: 27.707154860407133

2nd test:
Error: No valid ICE candidates were found to establish a peer connection
Empty stats object

3rd test:
Error: No valid ICE candidates were found to establish a peer connection
Empty stats object

4th test:
mbpsAvg: 28.241207890937705
mbpsMax: 39.30890809113864


5th test:
Error: No valid ICE candidates were found to establish a peer connection
Empty stats object

6th test:
Error: No valid ICE candidates were found to establish a peer connection
Empty stats object

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.