WebRTC facingMode environment not working in Android Chrome

Having trouble figuring out why this works perfectly in Safari iOS and not Android Chrome throwing the exception NotReadableError: Could not start video source.
I am closing previous track with this.videoProducer.track.stop().

var constraints = {
    audio: false,
    video: {
        "width": {
            "ideal": 1280
        },
        "height": {
            "ideal": 720
        },
        "facingMode": {
            "exact": "environment"
        },
    },
}

const userMedia = await navigator.mediaDevices.getUserMedia(constraints) // Will throw - NotReadableError: Could not start video source

I also tried the constraints without width and height.

{
  "audio": false,
  "video": {
    "facingMode": {
      "exact": "environment"
    }
  }
}

Any ideas on how to debug further or try things out will be appreciated.

Have you tried to enumerate video devices and just pick another one by device ID?
I can be up to phone vendor to mark video input devices as front/back or maybe Chrome just doesn’t support that in the first place, no idea.

I did actually and will try it again but the interesting part in the Android device I test is that there are 3 devices returned where 2 are back camera!

Yes, that is what I meant, it probably doesn’t know if those are facing front or back. But maybe it also depends on the specific phone model, I can imagine Google to put something for this to work properly on Pixel devices.

I agree and this must be a phone device combination to Google Chrome issue since same phone device testing with Firefox browser actually works which is so interesting.

Looks like a good reason for upstream bug report in Chromium and post a link here if you decide to create one.

Not a problem at all, could you please direct me to the correct forum?

Not a forum, rather https://bugs.chromium.org/p/chromium/issues/list

Out of curiosity, tried you code (just enveloped it in a minimal html page with video element), and it worked without a scratch both in Chrome and Firefox for Android. Android 7.1.2, Chrome 87.0.4280.101, Firefox 84.1.1

By the way, I have an old HP notebook with Windows 8.1 and some obscure problem with a built-in microphone, and sometimes Chrome issues very similar error, only for the audio device (‘Could not start audio source’). In Firefox it is either working at the same time or not - it depends. The error is cured only by the computer restart. So you problem can very easily be hardware.

I have a Galaxy A20s Android 10 with Chrome 87.0.4280.101 and Firefox 84.1.2.

I assume you comparing the audio issue and your machine hardware issue with my phone hardware which yes could be a phone issue, I will need to test it with another device.

"video": {
    "facingMode": "user" or "environment"
} 

would you use it that way? On some devices, the face recognition sensor comes as a camera.