0m4r / MMM-euro2024

a Magic Mirror Module to display Euro 2020 fixtures and standings
2 stars 2 forks source link

Data are not fetched #4

Closed 1Cedric1 closed 3 months ago

1Cedric1 commented 3 months ago

Dear @0m4r thank you for your great module!

after installing it at getting a API key, the module seems not to fetch the results :

Capture d’écran 2024-06-20 à 07 56 55

In the confirmation mail from API-key for football-data.org, where I can check the key, it really looks like that no retrieve of the data have been performed.

Capture d’écran 2024-06-20 à 07 56 24

Are you encoutering the same problem ?

Thanks for your interest and you help.

Kind regards,

Cédric

0m4r commented 3 months ago

hi @1Cedric1 to make sure the API key is set properly can you share your module configuration?

1Cedric1 commented 3 months ago

hello @0m4r yes, of course.

    {
      disabled: false,
      module: "MMM-euro2024",
      position: "center",
      header: "Euro 2024",
      config: {
        updateInterval: 60 * 1000,
        token: "f17...a9",
      }
    },

regarding the module itself, i just installed it yesterday, without changing anything in the files.

Capture d’écran 2024-06-20 à 10 36 01

0m4r commented 3 months ago

uhm... not sure, the config looks correct. can you try, from the module folder, to run "npm install" and start the magic mirror again? Also, can you provide any logs?

**IMPORTANT @1Cedric1 I have edited your post to redact the token value.... please avoid sharing it publicly next time!**

1Cedric1 commented 3 months ago

Thank you very much for your help @0m4r

I have updated the folder: Capture d’écran 2024-06-20 à 13 48 40

regarding the logs, yes I could provide you some, but I do not really know where to find them. An idea maybe?

for the key, you're right, it should not be communicated, but could you maybe try to get the datas with my key? maybe that is the problem...

0m4r commented 3 months ago

to collect the log you can do this (from the MagicMirror folder):

npm run server then access the MM from your browser (HTTP://localhost:8080).

In the terminal you should see some logs coming in, see if you can identify any error or message that looks like a problem :)

1Cedric1 commented 3 months ago

OK, thank you. This is what I get

@.***:~/MagicMirror $ npm run server

@.*** server node ./serveronly

[20.06.2024 14:14.50.734] [LOG] Starting MagicMirror: v2.23.0 [20.06.2024 14:14.50.742] [LOG] Loading config ... [20.06.2024 14:14.50.747] [DEBUG] config template file not exists, no envsubst [20.06.2024 14:14.50.755] [LOG] Loading module helpers ... [20.06.2024 14:14.50.919] [LOG] Initializing new module helper ... [20.06.2024 14:14.50.920] [LOG] Module helper loaded: MMM-Remote-Control [20.06.2024 14:14.50.921] [LOG] No helper found for module: alert. [20.06.2024 14:14.50.922] [LOG] No helper found for module: MMM-Carousel. [20.06.2024 14:14.50.926] [LOG] Initializing new module helper ... [20.06.2024 14:14.50.928] [LOG] Module helper loaded: MMM-euro2024 [20.06.2024 14:14.50.930] [LOG] No helper found for module: clock. [20.06.2024 14:14.50.933] [LOG] Initializing new module helper ... [20.06.2024 14:14.50.935] [LOG] Module helper loaded: MMM-BurnIn [20.06.2024 14:14.50.936] [LOG] No helper found for module: MMM-SwissStationboard. [20.06.2024 14:14.51.071] [LOG] Initializing new module helper ... [20.06.2024 14:14.51.074] [LOG] Module helper loaded: MMM-Weather [20.06.2024 14:14.51.078] [LOG] No helper found for module: MMM-WeatherChart. [20.06.2024 14:14.51.508] [LOG] Initializing new module helper ... [20.06.2024 14:14.51.509] [LOG] Module helper loaded: MMM-GooglePhotos [20.06.2024 14:14.51.815] [LOG] Initializing new module helper ... [20.06.2024 14:14.51.815] [LOG] Module helper loaded: MMM-CalendarExt2 [20.06.2024 14:14.51.856] [LOG] Initializing new module helper ... [20.06.2024 14:14.51.858] [LOG] Module helper loaded: MMM-NewsFeed [20.06.2024 14:14.51.859] [LOG] All module helpers loaded. [20.06.2024 14:14.51.905] [LOG] Starting server on port 8080 ... [20.06.2024 14:14.51.923] [WARN] You're using a full whitelist configuration to allow for all IPs [20.06.2024 14:14.51.963] [ERROR] Whoops! There was an uncaught exception... [20.06.2024 14:14.51.984] [ERROR] Error: listen EADDRINUSE: address already in use 0.0.0.0:8080 at Server.setupListenHandle [as _listen2] (node:net:1432:16) at listenInCluster (node:net:1480:12) at doListen (node:net:1629:7) at process.processTicksAndRejections (node:internal/process/task_queues:83:21) { code: 'EADDRINUSE', errno: -98, syscall: 'listen', address: '0.0.0.0', port: 8080 } [20.06.2024 14:14.51.986] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? [20.06.2024 14:14.51.987] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues @.***:~/MagicMirror $

It does not seem to look so bad, and all the other modules work without problem.

Could you maybe try on your side with my key if you have time ?

0m4r commented 3 months ago

[20.06.2024 14:14.51.984] [ERROR] Error: listen EADDRINUSE: address already in use 0.0.0.0:8080

Do you have another server running on the 8080 port?

Could you maybe try on your side with my key if you have time ?

Please, request a new one yourself and try with it :)

1Cedric1 commented 3 months ago

OK, thank you I will try with a new key.

currently, I am accessing my rasberry from my PC through via VNC and my phone for MMM-Remote-Control. Maybe that's why it could be already in use.

1Cedric1 commented 3 months ago

Dear 0mar,

I maybe could find something, by using the pm2 logs function. MMM-euro2024 is appearing 3 times.

@.***:~ $ cd MagicMirror

@.***:~/MagicMirror $ pm2 logs

In-memory PM2 is out-of-date, do:

$ pm2 update

In memory PM2 version: 5.1.2

Local PM2 version: 5.2.0

[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)

/home/pi/.pm2/pm2.log last 15 lines:

PM2 | 2024-06-20T16:45:05: PM2 log: PM2 version : 5.1.2

PM2 | 2024-06-20T16:45:05: PM2 log: Node.js version : 18.7.0

PM2 | 2024-06-20T16:45:05: PM2 log: Current arch : arm

PM2 | 2024-06-20T16:45:05: PM2 log: PM2 home : /home/pi/.pm2

PM2 | 2024-06-20T16:45:05: PM2 log: PM2 PID file : /home/pi/.pm2/pm2.pid

PM2 | 2024-06-20T16:45:05: PM2 log: RPC socket file : /home/pi/.pm2/rpc.sock

PM2 | 2024-06-20T16:45:05: PM2 log: BUS socket file : /home/pi/.pm2/pub.sock

PM2 | 2024-06-20T16:45:05: PM2 log: Application log path : /home/pi/.pm2/logs

PM2 | 2024-06-20T16:45:05: PM2 log: Worker Interval : 30000

PM2 | 2024-06-20T16:45:05: PM2 log: Process dump file : /home/pi/.pm2/dump.pm2

PM2 | 2024-06-20T16:45:05: PM2 log: Concurrent actions : 2

PM2 | 2024-06-20T16:45:05: PM2 log: SIGTERM timeout : 1600

PM2 | 2024-06-20T16:45:05: PM2 log:

PM2 | 2024-06-20T16:45:05: PM2 log: App [mm:0] starting in -fork mode-

PM2 | 2024-06-20T16:45:05: PM2 log: App [mm:0] online

/home/pi/.pm2/logs/mm-error.log last 15 lines:

0|mm | failed to load swrast driver

0|mm | [20.06.2024 16:46.36.850] [ERROR] (node:1310) UnhandledPromiseRejectionWarning: ReferenceError: fetch is not defined

0|mm | at Class.fetchVersion (/home/pi/MagicMirror/modules/ MMM-euro2024/node_helper.js:90:22)

0|mm | at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-euro2024/node_helper.js:238:12)

0|mm | at Socket. (/home/pi/MagicMirror/js/node_helper.js:107:11)

0|mm | at Socket.emit (node:events:513:28)

0|mm | at Socket.emitUntyped (/home/pi/MagicMirror/node_modules/ socket.io/dist/typed-events.js:69:22)

0|mm | at /home/pi/MagicMirror/node_modules/ socket.io/dist/socket.js:703:39

0|mm | at process.processTicksAndRejections (node:internal/process/task_queues:78:11)

0|mm | (Use electron --trace-warnings ... to show where the warning was created)

0|mm | [20.06.2024 16:46.36.851] [ERROR] (node:1310) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)

0|mm | [20.06.2024 16:46.36.852] [ERROR] (node:1310) UnhandledPromiseRejectionWarning: TypeError: e.text is not a function

0|mm | at Class.fetchAll (/home/pi/MagicMirror/modules/ MMM-euro2024/node_helper.js:171:48)

0|mm | at process.processTicksAndRejections (node:internal/process/task_queues:96:5)

0|mm | [20.06.2024 16:46.36.852] [ERROR] (node:1310) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)

/home/pi/.pm2/logs/mm-out.log last 15 lines:

0|mm | [20.06.2024 16:46.36.843] [DEBUG] MMM-euro2024 fetchVersion https://raw.githubusercontent.com/0m4r/MMM-euro2024/main/package.json

On Thu, 20 Jun 2024 at 14:22, Omar Adobati < @.***> wrote:

[20.06.2024 14:14.51.984] [ERROR] Error: listen EADDRINUSE: address already in use 0.0.0.0:8080 Do you have another server running on the 8080 port? Could you maybe try on your side with my key if you DuckDuckGo removed one tracker. More https://duckduckgo.com/-hGysyZFupsqvAi0nzhKiHW-qw9F2bovIVkul6hTDmswPhfKduir7Zn6cy1rYsi8bEIizaQM-JFFiAGPy7tYIMPARBLrPt_dkts4FrMy0GdK0lB8NKzUxWtROeiwIUmqw4CAgskIEEX9e0OIEGfckWbgwATJLF7iRBZuHg7ml_eLmvkKf6x_KicobamMd9qJQdvZnh69PTq6APmJGZOH1Jhuk2m8-2FmOAd2xCH146OeJCDuYeS5PxcDbCycBFcX24wrt3xHMlunaYS3LZ5mZOuoiSDMAz258Ah2gRhjstMaZQwaXjkOu4D-TJQlymSSh50MmD5KUd41iYKWNVXsxQpQEMzdBS1qbSUFXp3CO34hRTQv4XeCVF4f1hElXZfHbEzCKT0XunNThZxJpm-joxgekmhKz6leCcv1-2Rvz9cnSA47IdxRIbTKPsDbJ-4Gt0VrDUblEGB83GC4G-7E0LBiyLXxY-_f0rSFK_TN9RfsSFyamixVclrsIY4iZz0AE Report Spam https://duckduckgo.com/-hGysyZFupsqvAi0nzhKiHW-qw9F2bovIVkul6hTDmswPhfKduir7Zn6cy1rYsi8bEIizaQM-JFFiAGPy7tYIMPARBLrPt_dkts4FrMy0GdK0lB8NKzUxWtROeiwIUmqw4CAgskIEEX9e0OIEGfckWbgwATJLF7iRBZuHg7ml_eLmvkKf6x_KicobamMd9qJQdvZnh69PTq6APmJGZOH1Jhuk2m8-2FmOAd2xCH146OeJCDuYeS5PxcDbCycBFcX24wrt3xHMlunaYS3LZ5mZOuoiSDMAz258Ah2gRhjstMaZQwaXjkOu4D-TJQlymSSh50MmD5KUd41iYKWNVXsxQpQEMzdBS1qbSUFXp3CO34hRTQv4XeCVF4f1hElXZfHbEzCKT0XunNThZxJpm-joxgekmhKz6leCcv1-2Rvz9cnSA47IdxRIbTKPsDbJ-4Gt0VrDUblEGB83GC4G-7E0LBiyLXxY-_f0rSFK_TN9RfsSFyamixVclrsIY4iZz0AE

[20.06.2024 14:14.51.984] [ERROR] Error: listen EADDRINUSE: address already in use 0.0.0.0:8080

Do you have another server running on the 8080 port?

Could you maybe try on your side with my key if you have time ?

Please, request a new one yourself and try with it :)

— Reply to this email directly, view it on GitHub https://github.com/0m4r/MMM-euro2024/issues/4#issuecomment-2180538683, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOV2OXQSVRFPYXT6UGVQQWLZILCRPAVCNFSM6AAAAABJTHW6TCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBQGUZTQNRYGM . You are receiving this because you were mentioned.Message ID: @.***>

--

Diese Mitteilung ist nur für den adressierten Empfänger bestimmt. Sie kann persönliche und vertrauliche Informationen enthalten. Nehmen Sie zur Kenntnis, dass Sie sich strafbar machen, wenn Sie nicht der vorgesehenen Empfänger sind und diese Informationen trotzdem kopieren oder weiterleiten. Wenn Sie diese Informationen irrtümlich erhalten haben, benachrichtigen Sie bitte umgehend den Absender und löschen Sie die Informationen.

Ce message ne doit être utilisé que par les gens à qui il a été adressé. Il peut contenir des informations confidentielles et personnelles. Si vous n'êtes pas le destinataire prévu, il vous est, par la présente, notifié que toute dissémination, distribution ou copie de cette communication est strictement interdite. Si vous l'avez reçue par erreur, vous êtes prié de nous l'annoncer immédiatement et de la supprimer.

This message is intended only for the use of the individuals to whom it is adressed and may contain information that is privileged and confidential. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately and delete it.

0m4r commented 3 months ago

UnhandledPromiseRejectionWarning: ReferenceError: fetch is not defined I should have asked before, what versions of node and npm are you using? It should be at least 18+.

if you cannot update, you can do this: from the MAgicMirror module folder run

npm install node-fetch and restart :)

1Cedric1 commented 3 months ago

Dear @0m4r, I retried on a brand new magic mirror and this time, it worked well! So, you may close this issue. Thanks a lot for your previous help. All the best to you.