bogenpirat / MMM-WetterOnline

MagicMirror module to display weather data from WetterOnline
GNU General Public License v3.0
8 stars 3 forks source link

Docker container crashes (doesn't start) #8

Open Mahn249 opened 1 month ago

Mahn249 commented 1 month ago

Hi there! I would love to use your WetterOnline module!

unfortunately, my Docker container crashes when I add the module into my config.js.

    {
       module: 'MMM-WetterOnline',
       disabled: false,
       position: "top_right",
       config: {
            city: "heddert",
//          daysTrend: 3,
            updateIntervalMins: 5,
            width: "400px",
            }
    },

When I disable it, my container runs without problems...

Any suggeestions? Here is the issue-protocol: image

Kind regards!

bogenpirat commented 1 month ago

can you share which version of nodejs your docker image is using? it's failing on this method call to eval which uses optional chaining and from a cursory search, that found its way into node in version 14. it looks like your image's node interpreter doesn't support optional chaining.

Mahn249 commented 1 month ago

Hi!

Does this help ?

Wich version should i pull?

Kind regards!

[image: image.png]

Am Fr., 17. Mai 2024 um 18:10 Uhr schrieb Julian @.***>:

can you share which version of nodejs your docker image is using? it's failing on this https://github.com/bogenpirat/MMM-WetterOnline/blob/master/node_helper.js#L153 method call to eval which uses optional chaining and from a cursory search, that found its way into node in version 14. it looks like your image's node interpreter doesn't support optional chaining.

— Reply to this email directly, view it on GitHub https://github.com/bogenpirat/MMM-WetterOnline/issues/8#issuecomment-2117929312, or unsubscribe https://github.com/notifications/unsubscribe-auth/BIQHLRLALL4TQSHX2UXV3TLZCYTX7AVCNFSM6AAAAABH37FEUOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJXHEZDSMZRGI . You are receiving this because you authored the thread.Message ID: @.***>

bogenpirat commented 1 month ago

nope, that sadly didn't help at all

Mahn249 commented 1 month ago

So it says, it's node version 12.22.1

I tried to update to version 20, but it doesn't work either....

Gesendet von Outlook für Androidhttps://aka.ms/AAb9ysg


From: Julian @.> Sent: Saturday, May 18, 2024 12:18:29 PM To: bogenpirat/MMM-WetterOnline @.> Cc: Mahn249 @.>; Author @.> Subject: Re: [bogenpirat/MMM-WetterOnline] Docker container crashes (doesn't start) (Issue #8)

nope, that sadly didn't help at all

— Reply to this email directly, view it on GitHubhttps://github.com/bogenpirat/MMM-WetterOnline/issues/8#issuecomment-2118762422, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIQHLRJOSAVDZU6ZIBTW7J3ZC4THLAVCNFSM6AAAAABH37FEUOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJYG43DENBSGI. You are receiving this because you authored the thread.Message ID: @.***>

bogenpirat commented 1 month ago

same error?

Mahn249 commented 1 month ago

Yes. Unfortunately... :-/

Gesendet von Outlook für Androidhttps://aka.ms/AAb9ysg


From: Julian @.> Sent: Saturday, May 18, 2024 4:47:39 PM To: bogenpirat/MMM-WetterOnline @.> Cc: Mahn249 @.>; Author @.> Subject: Re: [bogenpirat/MMM-WetterOnline] Docker container crashes (doesn't start) (Issue #8)

same error?

— Reply to this email directly, view it on GitHubhttps://github.com/bogenpirat/MMM-WetterOnline/issues/8#issuecomment-2118846447, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIQHLRK2D4KKH3EQ7X32OJDZC5SYXAVCNFSM6AAAAABH37FEUOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJYHA2DMNBUG4. You are receiving this because you authored the thread.Message ID: @.***>

bogenpirat commented 1 month ago

well, it's a node 14+ feature and it made sense that you saw that error with node 12. it should work fine on node 20 too. it does for me on node 18. maybe you have to run npm i after upgrading node, or maybe your container isn't invoking magicmirror with node 20. hard to tell.

Mahn249 commented 1 month ago

I'll try installing another node version this evening. Kind regards and thanks for your help!

Gesendet von Outlook für Androidhttps://aka.ms/AAb9ysg


From: Julian @.> Sent: Saturday, May 18, 2024 5:18:34 PM To: bogenpirat/MMM-WetterOnline @.> Cc: Mahn249 @.>; Author @.> Subject: Re: [bogenpirat/MMM-WetterOnline] Docker container crashes (doesn't start) (Issue #8)

well, it's a node 14+ feature and it made sense that you saw that error with node 12. it should work fine on node 20 too. it does for me on node 18. maybe you have to run node i after upgrading node, or maybe your container isn't invoking magicmirror with node 20. hard to tell.

— Reply to this email directly, view it on GitHubhttps://github.com/bogenpirat/MMM-WetterOnline/issues/8#issuecomment-2118855329, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BIQHLRI6NMU4V6JA4KWAJVDZC5WMVAVCNFSM6AAAAABH37FEUOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJYHA2TKMZSHE. You are receiving this because you authored the thread.Message ID: @.***>

Mahn249 commented 2 weeks ago

Sooooooo I just dont get MagicMirror within the docker Container to use another Version of node.

Thatswhy i bought a Raspberry Pi 4 and installed the Magicmirror. (OS: Raspi) Node was easy to update to version 22.3.0 and the Mirror doesn't crash anymore.

Unfortunatly the MMM-WetterOnline-module doesn't load with the original config from the readme...

bogenpirat commented 2 weeks ago

mind doing a git pull? we made some changes.

with regards to the config, try something along the lines of this:

        {
            module: "MMM-WetterOnline",
            position: "top_left",
            config: {
                    userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537
                    useHeader: true,
                    header: "weather",
                    city: "berlin",
                    width: "400px",
                    daysTrend: 5,
                    updateIntervalMins: 5
            }
        },
Mahn249 commented 2 weeks ago

Okay. at the moment I'm running 2 magic mirrors, with identical config file. Both versions are running with your latest release, the git pull commands were successful. First runs in docker container on Synology Nas, second is running directly on raspi 4b

Now, the container doesn't crash at start, but it also doesn't show your module. Do I have to use also the default "weather" module for using the WetterOnline-module?

I have to fetch the calendar-data for my monthly calendar via the default calendar module...

Mahn249 commented 2 weeks ago

Screenshot_20240617-223844

bogenpirat commented 2 weeks ago

uh no, just cloning the module into the module folder like it says in the readme on this project's page should be sufficient.

i really can't speak to the containerization here, have you encountered the same issues without that? perhaps your docker image is the problem, given that you seem to have issues with other modules too??