codetheweb / MMM-AnyList

Magic Mirror module to display AnyList data
11 stars 4 forks source link

Infinite "loading" #22

Open git-flix opened 3 years ago

git-flix commented 3 years ago

Hi!

I'm trying to display my "Alexa To Do"-List on my MagicMirror via AnyList.

First I was going through the installation steps (pull, install, bla) as usual. Then I created an AnyList-Account, hook it up with my Alexa and synced my lists. So far everything worked out.

Right now I'm trying to sync my lists with my mirror and I ran into a problem. Everything is set up but the list isn't loading. Instead its displaying an infinite "loading" text underneath the header.

My module-code: IMG_20210607_134125_resized_20210607_0154366582

My app-settings: Screenshot_20210607_1334932_com purplecover anylist

Updating the app had no effect. Hope you can help me. Thanks :)

codetheweb commented 3 years ago

One possibility that I can think of immediately is that your list name has a space at the end (invisible in the app but necessary for the API to work).

Could you provide the logs of your server (terminal) and client (developer tools -> console)?

git-flix commented 3 years ago

Thanks for your quick answer!

About your first idea: I created a new list and tried that, didn't work either. Also tried to add a space in the config.json.

I'm providing the information below, hope that's everything:

__picture of the problem__

Screenshot 2021-06-09 074043


__console log__

> magicmirror@2.15.0 start /home/pi/MagicMirror
> DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
[09.06.2021 07:47.18.334] [LOG]   Starting MagicMirror: v2.15.0
[09.06.2021 07:47.18.352] [LOG]   Loading config ...
[09.06.2021 07:47.18.379] [LOG]   Loading module helpers ...
[09.06.2021 07:47.18.387] [LOG]   No helper found for module: clock.
[09.06.2021 07:47.18.391] [LOG]   No helper found for module: weather.
[09.06.2021 07:47.19.431] [LOG]   Initializing new module helper ...
[09.06.2021 07:47.19.435] [LOG]   Module helper loaded: MMM-AnyList
[09.06.2021 07:47.21.299] [LOG]   Initializing new module helper ...
[09.06.2021 07:47.21.303] [LOG]   Module helper loaded: MMM-CalendarExt2
[09.06.2021 07:47.21.305] [LOG]   All module helpers loaded.
[09.06.2021 07:47.21.635] [LOG]   Starting server on port 8080 ...
[09.06.2021 07:47.21.670] [LOG]   Server started ...
[09.06.2021 07:47.21.674] [LOG]   Connecting socket for: MMM-AnyList
[09.06.2021 07:47.21.677] [LOG]   Starting node helper: MMM-AnyList
[09.06.2021 07:47.21.683] [LOG]   Connecting socket for: MMM-CalendarExt2
[09.06.2021 07:47.21.686] [LOG]   Sockets connected & modules started ...
[09.06.2021 07:47.22.493] [ERROR] Whoops! There was an uncaught exception...
[09.06.2021 07:47.22.516] [ERROR] Error: listen EADDRINUSE: address already in use 192.168.0.225:8080
    at Server.setupListenHandle [as _listen2] (net.js:1313:16)
    at listenInCluster (net.js:1361:12)
    at GetAddrInfoReqWrap.doListen [as callback] (net.js:1498:7)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:68:8) {
  code: 'EADDRINUSE',
  errno: 'EADDRINUSE',
  syscall: 'listen',
  address: '192.168.0.225',
  port: 8080
}
[09.06.2021 07:47.22.522] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
[09.06.2021 07:47.22.524] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
[09.06.2021 07:47.22.601] [LOG]   Launching application.

__config.json__

var config = {
        address: "localhost",   // Address to listen on, can be:
                                                        // - "localhost", "127.0.0.1", "::1" to listen on loopback interface
                                                        // - another specific IPv4/6 to listen on a specific interface
                                                        // - "0.0.0.0", "::" to listen on any interface
                                                        // Default, when address config is left out or empty, is "localhost"
        port: 8080,
        basePath: "/",  // The URL path where MagicMirror is hosted. If you are using a Reverse proxy
                                        // you must set the sub path here. basePath must end with a /
        ipWhitelist: ["192.168.0.1", "::ffff:192.168.0.1", "::1", "192.168.0.159"],     // Set [] to allow all IP addresses
                                                                                                                        // or add a specific IPv4 of 192.168.1.5 :
                                                                                                                        // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
                                                                                                                        // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
                                                                                                                        // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],

        useHttps: false,                // Support HTTPS or not, default "false" will use HTTP
        httpsPrivateKey: "",    // HTTPS private key path, only require when useHttps is true
        httpsCertificate: "",   // HTTPS Certificate path, only require when useHttps is true

        language: "de",
        locale: "de-DE",
        logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
        timeFormat: 24,
        units: "metric",
        // serverOnly:  true/false/"local" ,
        // local for armv6l processors, default
        //   starts serveronly and then starts chrome browser
        // false, default for all NON-armv6l devices
        // true, force serveronly mode, because you want to.. no UI on this device

        modules: [
//              {
//                      module: "alert",
//              },

//              {
//                      module: "updatenotification",
//                      position: "top_bar"
//              },

                {
                        module: "clock",
                        position: "top_left",
                        timeFormat: "24",
                        displaySeconds: false,
                        showWeek: true,
                        dateFormat: "dddd,DD MMMM, YYYY"
                },

                {
                        module: "weather",
                        position: "top_right",
                        header: "Wettervorhersage",
                        config: {
                                weatherProvider: "openweathermap",
                                type: "forecast",
                                lang: "de",
                                showRainAmount: true,
                                location: "XXX",
                                locationID: "",
                                apiKey: "XXX"
                        }
                },

                {
                        module: "MMM-AnyList",
                        position: "top_right",
                        header: "To Do",
                        config: {
                                email: "XXX",
                                passwort: "XXX",
                                list: "Alexa to-Do List",
                                },
                },

                {
                        module: 'MMM-CalendarExt2',
                        config: {
                                calendars : [
                      {
                                url: "XXX",
                                scanInterval: 1000*60*30, //Millisekunden
                                maxItems: 50,
                                className: "fe",
                      },
                        {
                                url: "XXX",
                                scanInterval: 1000*60*30,
                                maxItems: 50,
                                className: "sve",
                        },
                                            ],
                                views: [
                        {
                        mode: "upcoming",
                        title: "",
                        position: "top_left",
                        locale: "DE-de",
                        slotCount: "5",
                        },

                      {
                        mode: "week",
//                      title: "Woche",
                        type: "row",
                        position: "bottom_bar",
                        fromNow: "0",
                        slotCount: "1",
                        className: "remove_empty_slot",
                        filterPassedEvent: true,
                        hideOverflow: "false",
                        slotMaxHight: "150px",
                        locale: "de-DE",
                      },
                                         ],
                    scenes: [
                      {
                        name: "DEFAULT",
                      },
                                 ],
                  },
                },
        ]
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = config;}

___pm2 log____

Describing process with id 0 - name mm
┌───────────────────┬─────────────────────────────────┐
│ status            │ online                          │
│ name              │ mm                              │
│ namespace         │ default                         │
│ version           │ N/A                             │
│ restarts          │ 0                               │
│ uptime            │ 7m                              │
│ script path       │ /home/pi/mm.sh                  │
│ script args       │ N/A                             │
│ error log path    │ /home/pi/.pm2/logs/mm-error.log │
│ out log path      │ /home/pi/.pm2/logs/mm-out.log   │
│ pid path          │ /home/pi/.pm2/pids/mm-0.pid     │
│ interpreter       │ bash                            │
│ interpreter args  │ N/A                             │
│ script id         │ 0                               │
│ exec cwd          │ /home/pi                        │
│ exec mode         │ fork_mode                       │
│ node.js version   │ N/A                             │
│ node env          │ N/A                             │
│ watch & reload    │ ✘                               │
│ unstable restarts │ 0                               │
│ created at        │ 2021-05-14T15:43:57.602Z        │
└───────────────────┴─────────────────────────────────┘
 Divergent env variables from local env
┌──────────────────┬────────────────┐
│ PWD              │ /home/pi       │
│ XDG_SESSION_TYPE │ x11            │
│ TERM             │ xterm-256color │
│ XDG_SESSION_ID   │ 1              │
└──────────────────┴────────────────┘

 Add your own code metrics: http://bit.ly/code-metrics
 Use `pm2 logs mm [--lines 1000]` to display logs
 Use `pm2 env 0` to display environment variables
 Use `pm2 monit` to monitor CPU and Memory usage mm

git-flix commented 3 years ago

I set up my entire mirror from blank today. Reinstalled Pi, MM2, everything. Also set up a new test-list. Still doesnt work. I'm confused...

codetheweb commented 3 years ago

Thanks, the only log missing is the one in developer tools inside Chromium.

Also, it looks like you might have multiple MM instances running (the address already in use error).