New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calendar module: TypeError: fetch failed #3329
Comments
could you do
to see if there is a stack trace in there |
Nothing showing, no |
[02.01.2024 14:59.23.139] [ERROR] Calendar Error. Could not fetch calendar: https://my.cal.url TypeError: fetch failed |
why didn't the catch on the fetch catch this?
|
Same issue here |
@Themaster312 try this test code replace lines 58-84 with this in calendarfetcher.js
|
The Found this mentioned as workaround but not sure if it is really related. |
@Pollard-J is this the issue you were looking for? |
@sdetweil The issue i had with my calendar was all to do with the Node needing to be updated. which you helped me with. thats all fixed now. I did just update my MM and it broke it (it wouldn't launch). I updated the pm2 and its fixed it. |
@Pollard-J thanks for the update. did u upgrade with my script? or manually ?? |
did u upgrade with my script? or manually (git pull && ... ) ?? |
but that seems to be on request() and userAgent() methods, not fetch().. he did a good upgrade w my script. (from v23 to 26) also upgraded node from 16 to 20. he has a repeatable failure.. we could get him back to 23 by checking out the tag, and another npm install |
so I have no idea to this anymore, only a few users are affected and we don't know why ... One last thing: Is mm started with If they are using electron ( It would be interesting to see if this problem persists when installing the latest electron version. |
these are npm run start... using electron.. but he jumped a bunch of releases.. 23-26. I think the node_helpers are running under command line node.. as electron. loadUrl() hasn't been started yet. as you note electron has its own.. |
Hi, I have 2 users with same problem sample: [04.01.2024 22:51.37.799] [ERROR] Calendar Error. Could not fetch calendar: https://calendar.google.com/calendar/ical/xxxxgmail.com/private-xxxxxxxxx/basic.ics TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11576:11) {
cause: SocketError: other side closed
at TLSSocket.onSocketEnd (node:internal/deps/undici/undici:9790:26)
at TLSSocket.emit (node:events:526:35)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: ‘UND_ERR_SOCKET’,
socket: {
localAddress: ‘2a01:e0a:24:1790:2ca6:1585:d270:49fb’,
localPort: 58746,
remoteAddress: undefined,
remotePort: undefined,
remoteFamily: undefined,
timeout: undefined,
bytesWritten: 754,
bytesRead: 96273
}
}
} |
that's different. other side closed. but it's using the ipv6 address. have them turn off the v6 address. dont need it at home |
yes but callback is not sended too |
what callback,? you mean the .then() Promise resolve? |
Solved it for now. Please implement a better solution. |
@GaryCooper23 thanks for the feedback. the problem is not in our code. but in the node js engine. we will have to wait for a fix. but you don't need ip 6 on your local network, as you only have a few devices. |
Maybe the problems are caused by the node version ( There were fixes for The latest electron release It would be helpful for us if someone with this problem could test if it still persists when using electron |
ok will see |
one feedback that 28.1.1 solved problem |
I also have the problem that the calendar module no longer loads anything. I have installed Even if the address where the calendar is located is not accessible, no error appears in the log. On the MagicMirror the calendar module is loading all the time. |
@z-master42 install the old parser
restart MagicMirror |
|
Platform:
pi@magicmirror:~ $ uname -a Linux magicmirror 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux pi@magicmirror:~ $ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye
Node Version: v20.10.0
MagicMirror² Version: v2.26.0
Description: My calendar module does not appear to update at all since the first time it loaded. No events created since the calendar has been added to the module are showing.
Steps to Reproduce:
Expected Results: I would expect to see the new event I created, especially as I can see events occurring later than my new event.
Actual Results: There is no change to the events shown on the mirror. No new events created are showing. Tried with several new events that are expected to show. The calendar module is still showing events in 3 days time but will not show my newly created event that is scheduled for tomorrow.
Errors noted:
pi@magicmirror:~/.pm2/logs $ tail --lines=1000 MagicMirror-error.log | grep calendar [02.01.2024 10:29.43.758] [ERROR] Calendar Error. Could not fetch calendar: https://myurl TypeError: fetch failed [02.01.2024 10:31.53.769] [ERROR] Calendar Error. Could not fetch calendar: https://myurl TypeError: fetch failed
Configuration:
Additional Notes: pm2 restart or a full reboot do not resolve
The text was updated successfully, but these errors were encountered: