deg0nz/MMM-PublicTransportBerlin

Cannot read properties of undefined

OliverHi opened this issue · 6 comments

Hi I am running this great module on my magic mirror but recently it stopped working spamming this error in the logs
Error while fetching departures (for module Instance MY_STATION): TypeError: Cannot read properties of undefined (reading 'fetchDepartures')
where I replaced my station name with MY_STATION.

Is this a known error? Otherwise please let me know how I can provide additional info if needed

The module still works fine for me 🙂. Which MagicMirror version do you have? Are you using the latest version of the module?
Please show us your configuration of the module.

I am running version v2.20.0 of MagicMirror currently. The problem started with d2b835d of this module and is still happening with the newest 2b71f13. Now with a different property, getStationName this time. My configuration was unchanged (from the former working version) and looks like this:

{
                        module: "MMM-PublicTransportBerlin",
                        position: "bottom_left",
                        config: {
                                name: "S Westend",
                                stationId: "900000026207",
                                travelTimeToStation: 5,
                                showColoredLineSymbols: true,
                                useBrightScheme: true
                        }
                },

Interesting. Your configuration works for me with MagicMirror v2.20.0.
What npm (npm -v) and node version (node -v) do you have?

Commit d2b835d should not affect the functionality of the module at all, since stylelint is only used during development and not directly in the module.

I am using npm 7.21.1 and node v16.9.1 on a Pi zero using the Midori browser. The interesting part for me is that this exact setup worked some time ago.
I just changed the address in the config from localhost to 0.0.0.0 to be able to check from my PC and ... well it worked there. I checked on the physical mirror too and now its working there (again) too. I am not sure if that is by chance or a result of this change

Okay, nice that it's working again for now. Maybe there was a problem with the hafas endpoint.

Since I cannot reproduce the error myself, I recommend that you update node, npm and also MagicMirror and see if it occurs again.

rejas commented

Closing this issue, since it seems to be resolved