hermanho / MMM-GooglePhotos

Display your photos on MagicMirror from Google Photos.
MIT License
162 stars 62 forks source link

Google photos not loading #144

Closed Reddax closed 1 year ago

Reddax commented 2 years ago

My google photos have suddenly stopped loading, this is the log;

[17.05.2022 16:03.42.849] [ERROR] (node:47) UnhandledPromiseRejectionWarning: Error: invalid_grant

at createError (/magicmirror2/modules/MMM-GooglePhotos/node_modules/google-auth-library/node_modules/axios/lib/core/createError.js:16:15)
at settle (/magicmirror2/modules/MMM-GooglePhotos/node_modules/google-auth-library/node_modules/axios/lib/core/settle.js:18:12)
at IncomingMessage.handleStreamEnd (/magicmirror2/modules/MMM-GooglePhotos/node_modules/google-auth-library/node_modules/axios/lib/adapters/http.js:202:11)
at IncomingMessage.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1241:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
[17.05.2022 16:03.42.849] [ERROR] (node:47) 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)

[17.05.2022 16:03.42.849] [ERROR] (node:47) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
FuRy2K commented 2 years ago

I'm seeing similar errors being thrown just starting today.

[19.05.2022 21:33.44.290] [ERROR] (node:1) 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: 4)
[19.05.2022 21:33.44.384] [LOG]   [CALEXT2] calendar:School >> Scanned: 70, Selected: 70
[19.05.2022 21:33.44.495] [LOG]   [CALEXT2] calendar:US Holiday >> Scanned: 43, Selected: 43
[19.05.2022 21:33.44.522] [LOG]   [CALEXT2] calendar:Family >> Scanned: 37, Selected: 37
[19.05.2022 21:33.44.593] [LOG]   [CALEXT2] calendar:Food >> Scanned: 0, Selected: 0
[19.05.2022 21:33.44.689] [LOG]   [CALEXT2] calendar:Chris >> Scanned: 29, Selected: 29
[19.05.2022 21:33.45.177] [LOG]   [CALEXT2] calendar:Kristin >> Scanned: 18, Selected: 18
[19.05.2022 21:34.44.246] [ERROR] (node:1) UnhandledPromiseRejectionWarning: Error: Request failed with status code 429
    at createError (/opt/magic_mirror/modules/MMM-GooglePhotos/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/opt/magic_mirror/modules/MMM-GooglePhotos/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/opt/magic_mirror/modules/MMM-GooglePhotos/node_modules/axios/lib/adapters/http.js:322:11)
    at IncomingMessage.emit (events.js:326:22)
    at endReadableNT (_stream_readable.js:1241:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
hermanho commented 1 year ago

The token generation is changed in latest version. Please pull the source code and try it. When the problem is still there, please open a new issue.