Skip to content
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 error. Could not fetch calendar #29

Open
jaymess opened this issue Dec 17, 2022 · 1 comment
Open

Calendar error. Could not fetch calendar #29

jaymess opened this issue Dec 17, 2022 · 1 comment

Comments

@jaymess
Copy link

jaymess commented Dec 17, 2022

Hey there! Thanks for this module! Hoping for some help with an API key issue after setting up for the 1st time.
Things seemed to have gone fine until restarting mm with personal calendar info in config.js

[ERROR] Calendar Error. Could not fetch calendar: [calendar URL] GaxiosError: Not Found
at Gaxios._request (/home/mmadmin/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/mmadmin/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%2Fu%2F0%3Fcid%3DYjUzNmFhYWI1ZmRhZWM4NWNlZDY4NGNlMTVjYTJjM2VkNDMzMDAyOTk4MmFiMDVkNjU2NDMyMzY4NDdkZjA1MEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t/events?timeMin=2022-12-17T11%3A44%3A31.750Z&maxResults=7&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,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"',
'cache-control': 'no-cache, no-store, max-age=0, must-revalidate',
connection: 'close',
'content-encoding': 'gzip',
'content-type': 'application/json; charset=UTF-8',
date: 'Sat, 17 Dec 2022 11:44:37 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',

That's a lot with the googleapis link opening up to a more simple message that there isn't a valid API key :(

{
"error": {
"code": 403,
"message": "The request is missing a valid API key.",
"errors": [
{
"message": "The request is missing a valid API key.",
"domain": "global",
"reason": "forbidden"
}
],
"status": "PERMISSION_DENIED"
}
}

Not sure what to do with that. Any help is appreciated!

@randomBrainstormer
Copy link
Owner

Hi @jaymess, have you tried running the setup steps again? Make sure that your credentials.json file is in the same directory as the module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants