hermanho / MMM-GooglePhotos

Display your photos on MagicMirror from Google Photos.
MIT License
170 stars 65 forks source link

Error: Request failed with status code 403 #104

Closed KrazedPyro closed 3 years ago

KrazedPyro commented 3 years ago

I have looked into every fix i could find but nothing has worked. i have reinstalled both MagicMirror and MMM-GooglePhotos, i have deleted and downloaded the "credentials.json" file, deleted and regenerated the "token.json" but i keep getting the error code 403.

[01.04.2021 13:20.02.519] [ERROR] (node:1734) UnhandledPromiseRejectionWarning: Error: Request failed with status code 403 at createError (/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/axios/lib/core/createError.js:16:15) at settle (/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/axios/lib/adapters/http.js:260:11) at IncomingMessage.emit (events.js:327:22) at endReadableNT (_stream_readable.js:1220:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) [01.04.2021 13:20.02.527] [ERROR] (node:1734) 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) [01.04.2021 13:20.02.530] [ERROR] (node:1734) [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.

aneaville commented 3 years ago

Did this error happen when trying to generate the token? Or does it happen after launching magic mirror?

KrazedPyro commented 3 years ago

This happens when launching magic mirror. The token generation was successful. I don’t have it in front of me right now but After I sent this i restarted the magic mirror installation process with the MMM-GooglePhotos module and I received 3 or 4 errors during the installation. I’ll try this again this weekend to capture the errors and send them to you

Sent from my iPhone

On Apr 1, 2021, at 2:43 PM, aneaville @.***> wrote:

 Did this error happen when trying to generate the token? Or does it happen after launching magic mirror?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

rdehler commented 3 years ago

Upon debugging more with the 403 error, I saw this in the logs:

Photos Library API has not been used in project XXX before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/photoslibrary.googleapis.com/overview?project={XXX my unique Id} then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry

You have to enable the photos library API it looks like.

KrazedPyro commented 3 years ago

Awesome. I’ll give this a shot later today

Sent from my iPhone

On Apr 28, 2021, at 11:00 AM, Ray Dehler @.***> wrote:

 Upon debugging more with the 403 error, I saw this in the logs:

Photos Library API has not been used in project 160384734698 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/photoslibrary.googleapis.com/overview?project={XXX my unique Id} then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry

You have to enable the photos library API it looks like.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.