kevinatown / MMM-Screencast

A module to cast to the magic mirror
MIT License
166 stars 34 forks source link

Can not start Screencast #68

Open steventhi opened 4 years ago

steventhi commented 4 years ago

Hello, sorry for my bad englisch, here is the config, what do I wrong that the Screencast dont work?

> > magicmirror@2.11.0 start /home/pi/MagicMirror
> > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
> 
> [2020-05-26 13:15:58.517] [LOG]    Starting MagicMirror: v2.11.0
> [2020-05-26 13:15:58.524] [LOG]    Loading config ...
> [2020-05-26 13:15:58.528] [LOG]    Loading module helpers ...
> [2020-05-26 13:15:58.566] [LOG]    Initializing new module helper ...
> [2020-05-26 13:15:58.567] [LOG]    Module helper loaded: updatenotification
> [2020-05-26 13:15:58.568] [LOG]    No helper found for module: clock.
> [2020-05-26 13:15:58.913] [LOG]    Initializing new module helper ...
> [2020-05-26 13:15:58.914] [LOG]    Module helper loaded: calendar
> [2020-05-26 13:15:58.915] [LOG]    No helper found for module: compliments.
> [2020-05-26 13:15:58.979] [LOG]    Initializing new module helper ...
> [2020-05-26 13:15:58.980] [LOG]    Module helper loaded: MMM-Remote-Control
> [2020-05-26 13:15:58.981] [LOG]    Initializing new module helper ...
> [2020-05-26 13:15:58.982] [LOG]    Module helper loaded: MMM-Remote-Control-Repository
> [2020-05-26 13:15:58.982] [LOG]    No helper found for module: MMM-OpenmapWeather.
> [2020-05-26 13:15:58.983] [LOG]    No helper found for module: weatherforecast.
> [2020-05-26 13:15:59.297] [LOG]    Initializing new module helper ...
> [2020-05-26 13:15:59.297] [LOG]    Module helper loaded: MMM-AlexaControl
> [2020-05-26 13:15:59.319] [LOG]    Initializing new module helper ...
> [2020-05-26 13:15:59.319] [LOG]    Module helper loaded: newsfeed
> [2020-05-26 13:15:59.320] [LOG]    No helper found for module: MMM-pages.
> [2020-05-26 13:15:59.320] [LOG]    No helper found for module: MMM-page-indicator.
> [2020-05-26 13:15:59.586] [LOG]    Initializing new module helper ...
> [2020-05-26 13:15:59.587] [LOG]    Module helper loaded: MMM-Screencast
> [2020-05-26 13:15:59.587] [LOG]    All module helpers loaded.
> [2020-05-26 13:15:59.710] [LOG]    Starting server on port 8080 ... 
> [2020-05-26 13:15:59.715] [INFO]   You're using a full whitelist configuration to allow for all IPs
> [2020-05-26 13:15:59.732] [LOG]    Server started ...
> [2020-05-26 13:15:59.733] [LOG]    Connecting socket for: updatenotification
> [2020-05-26 13:15:59.734] [LOG]    Connecting socket for: calendar
> [2020-05-26 13:15:59.734] [LOG]    Starting node helper for: calendar
> [2020-05-26 13:15:59.735] [LOG]    Connecting socket for: MMM-Remote-Control
> [2020-05-26 13:15:59.735] [LOG]    Starting node helper for: MMM-Remote-Control
> [2020-05-26 13:15:59.741] [LOG]    Connecting socket for: MMM-Remote-Control-Repository
> [2020-05-26 13:15:59.742] [LOG]    Connecting socket for: MMM-AlexaControl
> [2020-05-26 13:15:59.742] [LOG]    MMM-AlexaControl helper, started...
> [2020-05-26 13:15:59.743] [LOG]    Connecting socket for: newsfeed
> [2020-05-26 13:15:59.743] [LOG]    Starting module: newsfeed
> [2020-05-26 13:15:59.743] [LOG]    Connecting socket for: MMM-Screencast
> [2020-05-26 13:15:59.744] [LOG]    Sockets connected & modules started ...
> [2020-05-26 13:15:59.750] [LOG]    Whoops! There was an uncaught exception...
> [2020-05-26 13:15:59.758] [LOG]    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
> [2020-05-26 13:15:59.758] [LOG]    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
> [2020-05-26 13:15:59.915] [LOG]    Launching application.
pi@raspberrypi:~ $ cd MagicMirror/config
pi@raspberrypi:~/MagicMirror/config $ display=:0 npm start >> log.log
[2020-05-26 13:15:59.751] [ERROR]  Error: listen EADDRINUSE: address already in use 0.0.0.0:8080
    at Server.setupListenHandle [as _listen2] (net.js:1226:14)
    at listenInCluster (net.js:1274:12)
    at doListen (net.js:1413:7)
    at processTicksAndRejections (internal/process/task_queues.js:84:9) {
  code: 'EADDRINUSE',
  errno: 'EADDRINUSE',
  syscall: 'listen',
  address: '0.0.0.0',
  port: 8080
}
[2020-05-26 13:16:00.304] [ERROR]  ERROR! Could not find main module js file for MMM-API

Thank you very much

kevinatown commented 4 years ago

Hey @steventhi So there seems to be a few potential issues going on here...

In the first log there seems to be an issue reported in #65 where MMM-AlexaControl and MMM-Screencast have an issue in compatibility. My initial guess was that they are using similar ports, but im not sure I would have to investigate what MMM-AlexaControl is doing to see if theres something else going on.. Also it seems that you are using port 8080 for MMM-Screencast 8080 is a commonly used port in development so I'd recommend adding a different port to the config.

As for the second log, there seems to be 2 issues present:

  1. The port 8080 is in use (so as i stated above something else is using this port)
  2. Could not find main module js file for MMM-API looks like MMM-API was not installed correctly?

Maybe begin by changing MMM-Screencast's config's port and commenting out or reinstalling the config for MMM-API?

I will try to find time to look into the MMM-AlexaControl and see what's/if the issue is. Let me know how this goes!