Read the statement by Michael Teeuw here.
How to separate the server Magic Mirror app runs on with the Webcam server?
-
I have this issue after downloading the fswebcam package (https://www.raspberrypi.org/documentation/usage/webcams/). Whenever I turn on my Raspberry Pi, my webcam turns on as well (which is what I want). However upon running the MagicMirror app, there will always be this error code that looks like this:
Whoops! There was an uncaught exception... { Error: listen EADDRINUSE 127.0.0.1:8080 at Object.exports._errnoException (util.js:1050:11) at exports._exceptionWithHostPort (util.js:1073:20) at Server.setupListenHandle [as _listen2] (net.js:1263:14) at listenInCluster (net.js:1304:12) at doListen (net.js:1428:7) at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:62:16) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:78:10) code: 'EADDRINUSE', errno: 'EADDRINUSE', syscall: 'listen', address: '127.0.0.1', port: 8080 } MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues Launching application.
And the screen loads a live stream of my webcam video. I understand that the issue is with the server being shared by the two apps that cause the issue, however when I change the server port of the MagicMirror app in the config.js file to a different server, the fswebcam server runs on the same server of the MagicMirror. It’s like the fswebcam server is coded to always use the same server as my MagicMirror app.
Hopefully, someone can share with me on how to change the code for the fswebcam such that an individual server for the webcam can be created and I can have the two apps running simultaneously.