question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DOMException: Requested device not found

See original GitHub issue

Here is the code I have used in my react component.

import Quagga from 'quagga'

  componentDidMount() {
    Quagga.init({           
      inputStream : {
          name : "Live",
          type : "LiveStream",
          target: document.querySelector('#barcode-scanner'), 
           constraints: {
              width: 520,
              height: 400,                  
              facingMode: "user"  //"environment" for back camera, "user" front camera
              }               
      },                         
      decoder : {
          readers : ["code_128_reader","code_39_reader"]
      }

  }, function(err) {
      if (err) {
        console.log(err)
        return
      }
      Quagga.start()
      Quagga.onDetected(function(result) {                              
        var last_code = result.codeResult.code;                   
        console.log("last_code "); 
     })
    })
  }

Which gives me following error

DOMException: Requested device not found

Please help!!!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

2reactions
NickPeacommented, Nov 24, 2020

Had the same issue.

Simply restarted my laptop and now it works again.

2reactions
ericbladecommented, Oct 9, 2018

It’s telling you you don’t have a device that fits the constraints that you’ve given, width, height, and/or facingMode.

What device/browser/camera?

Read more comments on GitHub >

github_iconTop Results From Across the Web

DOMException: Requested device not found GetUserMedia
This happens when you dont have any device to capture video or capture audio. try checking if your webcam and your microphone are...
Read more >
getUserMedia--DOMException: Requested device not found
My computer has no microphone,so I got an error from 'err'(DOMException: Requested device not found). how can I handle this error if I...
Read more >
error with camera: requested device not found - YouTube
How to Fix Camera Not Found Error - error with camera: requested device not found.
Read more >
Connect to WebCam using JavaScript
DOMException : Requested device not found. Enable HTTPS for local development using vue-cli-service vue-cli-service serve --https.
Read more >
Camera: Setup & troubleshooting - Applicant Help Center
NotFoundError: Requested device not found ... If you're seeing this error, your camera and/or microphone cannot be found by your browser. This ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found