Read the statement by Michael Teeuw here.
MMM-GoogleBirthdaysProvider
-
Hello i used this module long time ago and it works. Now i want to install this on a new Raspi.
They wont start[ERROR] MMM-GoogleBirthdaysProvider: API Helper error: API Error: Error: invalid_grant [2025-01-31 18:16:10.000] [ERROR] (node:12013) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading 'data') at /home/magicmirror/MagicMirror/modules/MMM-GoogleBirthdaysProvider/google-api-helper.js:41:45 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) (Use `electron --trace-warnings ...` to show where the warning was created) [2025-01-31 18:16:10.000] [ERROR] (node:12013) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
then i install it new. But when i want to generate a Token and i click on the Link an before the last Step:
"MMM-GoogleBirthdaysProvider wants to access your Google Account " and i click on forward
it comes this :Connection failed
Firefox cannot connect to the server at localhost.
-
@Sebi76-0 it sounds like you use Firefox on another machine,
Most of these Auth implementations are required to be done on the same machine, you can’t run them over ssh -
Re: MMM-GoogleBirthdaysProvider
No i don’t on a another Machine, i local on my Raspi4.
mmm-googlebirthdaysprovider@0.2.0 token:generate
node ./google-api-credentials/generate-auth-token.jsAuthorize the app by visiting this url: https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcontacts.readonly&response_type=code&client_id=xxxxxxxx-4hmsenjojbirtdvt47f00a0btomqlhbe.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost
Enter the code from that page here: -
@Sebi76-0 OK, the end of that url shows http://localhost
with no port number, implying port 80I don’t see the module doc talk setting callback uris on the Google page, oauthClient setup
Typically the code requesting the oauth callback has to say where it’s ‘server’ is listening. (And you have to hard code it in the Google setup) I don’t see that setup in his code either
-
npm run token:generate
I only followed what you see there
-
@Sebi76-0 I understand, but I think he left out some steps
There is an issue open on the module github page since 2023 about this