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.

Object Detection React App not showing up in browser

See original GitHub issue

I am trying to run the ‘Real-Time Custom Object Detection with TensorFlow.js (for Web)’ but it does not show in the browser. The localhost page opens but its blank.

Here’s the message i got.

Compiled successfully!

You can now view tensorflowjs-object-detection in the browser.

  Local:            http://localhost:3000/
  On Your Network:  http://192.222.0.11:3000/

Note that the development build is not optimized.
To create a production build, use yarn build.

yarn build

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
saadpastacommented, Jul 18, 2019
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
  const webCamPromise = navigator.mediaDevices
    .getUserMedia({
      audio: false,
      video: {
        facingMode: 'user'
      }
    })
    .then(stream => {
      window.stream = stream
      this.videoRef.current.srcObject = stream
      return new Promise((resolve, _) => {
        this.videoRef.current.onloadedmetadata = () => {
          resolve()
        }
      })
    }).catch(err =>
      console.log(err.message)
    )

add .catch

0reactions
bourdakos1commented, Aug 28, 2019

If this isn’t resolved, please re-open the issue here: https://github.com/cloud-annotations/object-detection-react

Read more comments on GitHub >

github_iconTop Results From Across the Web

Object Detection React App not showing up in browser #92
I am trying to run the 'Real-Time Custom Object Detection with TensorFlow.js (for Web)' but it does not show in the browser.
Read more >
Browser Detection in ReactJS - javascript - Stack Overflow
Originally from - How to detect Safari, Chrome, IE, Firefox and ... so I ended up using a useEffect on load to be...
Read more >
Building an Object Detection App with Tensorflow.JS and ...
JS and React. JS. In 15 minutes you'll be able to have your app up and running and detecting objects using a pre-trained...
Read more >
How to use tensorflow.js in react.js — Object Detection
Step 1: Start by importing the required package · Step 2: Loading the models · Step 3: Building the UI · Step 4:...
Read more >
Componentizing our React app - Learn web development | MDN
In this article we will show you a sensible way to break our app up into components. Prerequisites: Familiarity with the core HTML,...
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