Calendar Error. Could not fetch calendar: GaxiosError: Not Found
Opened this issue · 2 comments
I've completed successfully the
node authorize.js
I've been able to see some of my calendar events, also configured the MagicMirror/config.config.js by adding the module
{ module: 'MMM-GoogleCalendar', header: "My Google Private Cal", position: "top_left", config: { calendars: [ { symbol: "calendar-week", calendarID: "Y2xhdadfasdfasdfXd2aXUudGVjaA" }, // add another calendar HERE if needed ], }
I've got the calendar id from my calendar share button.
But I'm getting this error, someone happened the same or know where to troubleshoot?
[04.05.2023 11:42.29.175] [ERROR] Calendar Error. Could not fetch calendar: Y2xhdadfasdfasdfXd2aXUudGVjaA GaxiosError: Not Found
at Gaxios._request (/home/pi/MagicMirror/modules/MMM-GoogleCalendar/node_modules/gaxios/build/src/gaxios.js:130:23)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async OAuth2Client.requestAsync (/home/pi/MagicMirror/modules/MMM-GoogleCalendar/node_modules/google-auth-library/build/src/auth/oauth2client.js:382:18) {
response: {
config: {
url: 'https://www.googleapis.com/calendar/v3/calendars/Y2xhdadfasdfasdfXd2aXUudGVjaA/events?timeMin=2023-05-04T16%3A42%3A28.108Z&maxResults=10&singleEvents=true&orderBy=startTime',
method: 'GET',
userAgentDirectives: [Array],
paramsSerializer: [Function (anonymous)],
headers: [Object],
params: [Object],
validateStatus: [Function (anonymous)],
retry: true,
responseType: 'json',
retryConfig: [Object]
},
data: { error: [Object] },
headers: {
'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000',
'cache-control': 'no-cache, no-store, max-age=0, must-revalidate',
connection: 'close',
'content-encoding': 'gzip',
'content-type': 'application/json; charset=UTF-8',
date: 'Thu, 04 May 2023 16:42:29 GMT',
expires: 'Mon, 01 Jan 1990 00:00:00 GMT',
pragma: 'no-cache',
server: 'ESF',
'transfer-encoding': 'chunked',
vary: 'Origin, X-Origin, Referer',
'x-content-type-options': 'nosniff',
'x-frame-options': 'SAMEORIGIN',
'x-xss-protection': '0'
},
status: 404,
statusText: 'Not Found',
request: {
responseURL: 'https://www.googleapis.com/calendar/v3/calendars/Y2xhdadfasdfasdfXd2aXUudGVjaA/events?timeMin=2023-05-04T16%3A42%3A28.108Z&maxResults=10&singleEvents=true&orderBy=startTime'
}
},
config: {
url: 'https://www.googleapis.com/calendar/v3/calendars/Y2xhdadfasdfasdfXd2aXUudGVjaA/events?timeMin=2023-05-04T16%3A42%3A28.108Z&maxResults=10&singleEvents=true&orderBy=startTime',
method: 'GET',
userAgentDirectives: [ [Object] ],
paramsSerializer: [Function (anonymous)],
headers: {
'x-goog-api-client': 'gdcl/6.0.3 gl-node/16.13.0 auth/8.5.2',
'Accept-Encoding': 'gzip',
'User-Agent': 'google-api-nodejs-client/6.0.3 (gzip)',
Authorization: 'Bearer ya29.ASDFASDFLAKDJSFaerdsfp0PEhvDlmmFH0A-65_Xs326NwTYBFmEqasdfadsfK04LsH4xjfkCF_kGkMjasdfasdfadfNVkNo0DY1uXbopo7cUY2N1vnFoOqEfm4WEeXenDJ7YDoIwg3V5vMaCgYKAaQasdfasdfasdfGiPOkcC3FH3F16Dg0166',
Accept: 'application/json'
},
params: {
timeMin: '2023-05-04T16:42:28.108Z',
maxResults: 10,
singleEvents: true,
orderBy: 'startTime'
},
validateStatus: [Function (anonymous)],
retry: true,
responseType: 'json',
retryConfig: {
currentRetryAttempt: 0,
retry: 3,
httpMethodsToRetry: [Array],
noResponseRetries: 2,
statusCodesToRetry: [Array]
}
},
code: 404,
errors: [ { domain: 'global', reason: 'notFound', message: 'Not Found' } ]
}
Hi! according to the error is failing ot fetch the calendar with that specific ID. Did you check if the ID was correct?
Try opening your Google calendar in the browser and check the canlendar's settings page. Basically, just visit https://calendar.google.com/ and look for the settings (should be on the upper right section, an icon similar to a gear). Once you're in the settings page, look on the left for your calendar settings and click on the calendar you want to display in MMM-GoogleCalendar, you're calendar ID will be somewhere in the "integrate your calendar" section. Compare if is the same ID you have in your settings.
Hi, could you get it to work?
I'm having the same issue....
OAth setup completed , authorize.js run/completed (it shows a few of the calendar entrys after, but not the calendar address/ID.
I get the error:
[ERROR] MMM-GoogleCalendar Error. Could not fetch calendar: https://calendar.google.com/calendar/embed?src=christian.lunden@gmail.com&ctz=Europe%2FBerlin GaxiosError: Not Found
at Gaxios._request (/home/clunden/MagicMirror/modules/MMM-GoogleCalendar/node_modules/gaxios/build/src/gaxios.js:130:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async OAuth2Client.requestAsync (/home/clunden/MagicMirror/modules/MMM-GoogleCalendar/node_modules/google-auth-library/build/src/auth/oauth2client.js:382:18) {
response: {
config: {
url: 'https://www.googleapis.com/calendar/v3/calendars/https%3A%2F%2Fcalendar.google.com%2Fcalendar%2Fembed%3Fsrc%3DXXXXXXXXXXXXXXXXXXXXXXXX%26ctz%3DEurope%252FBerlin/events?timeMin=2024-01-22T19%3A20%3A51.753Z&maxResults=10&singleEvents=true&orderBy=startTime',
method: 'GET',
userAgentDirectives: [Array],
paramsSerializer: [Function (anonymous)],
headers: [Object],
params: [Object],
validateStatus: [Function (anonymous)],
retry: true,
responseType: 'json',
retryConfig: [Object]
},
data: { error: [Object] },
headers: {
'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000',
'cache-control': 'no-cache, no-store, max-age=0, must-revalidate',
connection: 'close',
'content-encoding': 'gzip',
'content-type': 'application/json; charset=UTF-8',
date: 'Mon, 22 Jan 2024 19:20:54 GMT',
expires: 'Mon, 01 Jan 1990 00:00:00 GMT',
pragma: 'no-cache',
server: 'ESF',
'transfer-encoding': 'chunked',
vary: 'Origin, X-Origin, Referer',
'x-content-type-options': 'nosniff',
'x-frame-options': 'SAMEORIGIN',
'x-xss-protection': '0'
},
status: 404,
statusText: 'Not Found',
request: {
responseURL: 'https://www.googleapis.com/calendar/v3/calendars/https%3A%2F%2Fcalendar.google.com%2Fcalendar%2Fembed%3Fsrc%3DXXXXXXXXXXXXXXXX%26ctz%3DEurope%252FBerlin/events?timeMin=2024-01-22T19%3A20%3A51.753Z&maxResults=10&singleEvents=true&orderBy=startTime'
}
},
config: {
url: 'https://www.googleapis.com/calendar/v3/calendars/https%3A%2F%2Fcalendar.google.com%2Fcalendar%2Fembed%3Fsrc%3DXXXXXXXXXXXXXXX%26ctz%3DEurope%252FBerlin/events?timeMin=2024-01-22T19%3A20%3A51.753Z&maxResults=10&singleEvents=true&orderBy=startTime',
method: 'GET',
userAgentDirectives: [ [Object] ],
paramsSerializer: [Function (anonymous)],
headers: {
'x-goog-api-client': 'gdcl/6.0.3 gl-node/18.17.1 auth/8.5.2',
'Accept-Encoding': 'gzip',
'User-Agent': 'google-api-nodejs-client/6.0.3 (gzip)',
Authorization: 'Bearer ya29.a0AfB_byA_l24SdQzRTmYgAPeudZDxxer0FQE8AW9WL9UMzS5s3ePlb_QtR2gL8LTPa0GZ4flFfQWfReKHiBNl1C8bqerLH7JULjbr212GlsfdeDkoVCOAcbXOAO-8IIkPGOyx9hYxUSD8woKe5kI8KniZ7soXBIaXgQogrQaCgYKARkSARMSFQHGX2MiFf0s1iRgqrQvDiYA1qR6Tw0173',
Accept: 'application/json'
},
params: {
timeMin: '2024-01-22T19:20:51.753Z',
maxResults: 10,
singleEvents: true,
orderBy: 'startTime'
},
validateStatus: [Function (anonymous)],
retry: true,
responseType: 'json',
retryConfig: {
currentRetryAttempt: 0,
retry: 3,
httpMethodsToRetry: [Array],
noResponseRetries: 2,
statusCodesToRetry: [Array]
}
},
code: 404,
errors: [ { domain: 'global', reason: 'notFound', message: 'Not Found' } ]
}
(I changed the link address/Source here, but copy-Pasting it to a browser works. It shows the calendar)
Any new insights?
Any ideas would be much appreciated