twilio / twilio-video-diagnostics-react-app

A diagnostics tool that tests a participant's ability to have a quality video call. Built with the twilio-video.js SDK, RTC Diagnostics SDK, and React.js.
Apache License 2.0
40 stars 24 forks source link

Device change error? #27

Closed mloeff closed 2 years ago

mloeff commented 2 years ago

Hi - We've implemented the diagnostics app into our Twilio video app - and it mostly works great! But, some people that are trying to use diagnostics are running into messages I haven't been able to reproduce so far - error has appeared on both Android and iOS. We were thinking it might be a conflict with the video app and the diagnostic app and have tried opening diagnostics in the same tab, but that seems to make the diagnostics app not function at all. Any thoughts on how we can try to fix this problem? Thanks

image

olipyskoty commented 2 years ago

Hi @mloeff thanks for the question and for testing out our app!

There is currently no mobile web support for this app, but I am working on it as we speak, and it should be available soon 🎉

Interestingly, I was working on mobile support for the <CameraTest /> component yesterday and I was also getting an error on iOS Safari immediately after I granted the browser permission to access my camera. I was able to fix the issue by adding playsInline autoPlay to the <video> element here. Seems to be a requirement for Safari. I haven't been able to test on Android, so I am not sure if this will completely solve your issue (or at all). Your suspicions may be right, and it might have something to do with using the video app at the same time. I'll have to look into this a little more.

Do you happen to know when your users are receiving this Device change error? Are they receiving it after they give their browser permission to access their camera? Or are they seeing this error as soon as they reach the "Check your Video" screen? Also if you could find out which version of iOS Safari and which Android browsers your users are experiencing this issue with, that would be helpful as well.

As I mentioned, I am currently working on this myself, and I'll let you know if I run into the same issue that you are having. Thank you!

mloeff commented 2 years ago

Hi @olipyskoty - thanks so much for your response. I'm sorry it took so long for me to get back to you - I was waiting on some follow-up from the client.

The client says it's happening on the very first screen after "Let's get started". Details I could get from the client (they stated that iOS/Safari had a problem as well, but I'm still trying to get more information from them).

Chrome application version 97.0.4692.98 Operating System Android 12; SM-G998U Build/SP1A.210812.016

olipyskoty commented 2 years ago

Hi @mloeff, I am so sorry for the delay!

Mobile support is finally available for this application. Please pull in the changes from the main branch to test out these new changes.

Also, as we were building out the mobile support, I realized that the "Device change: unable to connect" error is an edge case that seems to be related to device permissions. That error occurs when the following happens:

  1. User is prompted by the browser to give it permission to access the user's camera and microphone
  2. User grants permission to the browser
  3. At some point, user revokes permission for the browser to access their camera and/or microphone (can be one or both)
  4. "Device change: unable to connect" error is thrown

To make sure this does not occur, users should grant permission to their browser so that their camera and microphone can be accessed throughout the duration of the application. Note, some browsers need permission to access every single device that is to be used. That means, if a user is on the Camera or Microphone test, and they are switching between devices, their browser may ask for permission each time they switch. The user will need to grant permission each time. Can be kind of frustrating, but unfortunately this is browser specific 😢 .

Hopefully that clears things up, but please let me know if you run into anything else! Thank you!

mloeff commented 2 years ago

Hi @olipyskoty - that's great news! I'll have to try it out - we had made a few updates to the code to allow people to package up the results report and email it to us. Many users found it a step too far to manual copy and paste, so we thought if they could do it easily, they were more likely to submit it. Thanks again! -Michael

olipyskoty commented 2 years ago

Hey @mloeff I'll be closing this issue for now, but please let us know if you run into any more trouble or issues. Thank you!

ypatel118 commented 1 year ago

Hi @olipyskoty ,

First of all kudos for making this amazing app, it's been liked by a lot of people from my team.

And so we recently decided to integrate it into our own Twilio based video app, however, I'm facing this same issue when I do audio playback for audio output test - "Device Change Error" - in Android devices(I have tried with multiple devices). I haven't checked in IOS devices yet.

First I thought it's an issue in my integration so I double checked it and everything was fine. Furthermore, I found your hosted app - https://video-diagnostics.twilio.com/ - and I'm facing same issue in that as well in Android devices(I have tried with multiple devices). I haven't checked in IOS devices yet.

Is there any fix or is there something I am missing?

ypatel118 commented 11 months ago

@olipyskoty Please check my above comment.

ypatel118 commented 11 months ago

cc - @timmydoza