BVG client is failing to fetch data
smellouk opened this issue Β· comments
Hi π,
I'm using this MagicMirror module, this last is using hafas-client which is failing to fetch data, I think it's related to the client.
The error is:
[ERROR] Error initializing fetcher: TypeError: Cannot read property 'getStationName' of undefined
[11.01.2022 07:12.13.397] [ERROR] Error initializing fetcher: FetchError: request to https://bvg-apps.hafas.de/bin/mgate.exe? failed, reason: getaddrinfo EAI_AGAIN bvg-apps.hafas.de bvg-apps.hafas.de:443
[11.01.2022 07:12.13.480] [ERROR] { FetchError: request to https://bvg-apps.hafas.de/bin/mgate.exe? failed, reason: getaddrinfo EAI_AGAIN bvg-apps.hafas.de bvg-apps.hafas.de:443
at ClientRequest.<anonymous> (/home/pi/MagicMirror/modules/MMM-PublicTransportBerlin/node_modules/node-fetch/lib/index.js:1483:11)
at ClientRequest.emit (events.js:198:13)
at TLSSocket.socketErrorListener (_http_client.js:401:9)
at TLSSocket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
message:
'request to https://bvg-apps.hafas.de/bin/mgate.exe? failed, reason: getaddrinfo EAI_AGAIN bvg-apps.hafas.de bvg-apps.hafas.de:443',
type: 'system',
errno: 'EAI_AGAIN',
code: 'EAI_AGAIN' }
Hey,
[ERROR] Error initializing fetcher: TypeError: Cannot read property 'getStationName' of undefined
This error seems to be either unrelated, or caused by the actual cause. I suspect that somewhere in the Magic Mirror module code, the hafas-client
fetch error is not fully handled.
[11.01.2022 07:12.13.397] [ERROR] Error initializing fetcher: FetchError: request to https://bvg-apps.hafas.de/bin/mgate.exe? failed, reason: getaddrinfo EAI_AGAIN bvg-apps.hafas.de bvg-apps.hafas.de:443
EAI_AGAIN means the DNS server replied that it cannot currently fulfill the request. Can you confirm that this issue didn't occur due to a flaky internet connection? If yes, it probably happened because the APIs DNS server blocked your IP address because of too much traffic.
deg0nz/MMM-PublicTransportBerlin#67 will probably help with this, but I should also check if hafas-client
does a DNS lookup on every request.
@derhuerst thank you π, I will restart my modem and try again.
Closing the issue.