hermanho / MMM-GooglePhotos

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

Google Token not refreshing #101

Closed mtroxx closed 3 years ago

mtroxx commented 3 years ago

I shut MagicMirror off for about a week. Then when I turned it on and no slide show.
My first idea was to just regenerate the token, node generate_token.js returns this:

pi@raspberrypi:~/MagicMirror/modules/MMM-GooglePhotos $ sudo node generate_token.js [GPHOTOS:AUTH] Token is expired. (node:1822) UnhandledPromiseRejectionWarning: Error: invalid_grant at createError (/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/google-auth-library/node_modules/axios/lib/core/createError.js:16:15) at settle (/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/google-auth-library/node_modules/axios/lib/core/settle.js:18:12) at IncomingMessage.handleStreamEnd (/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/google-auth-library/node_modules/axios/lib/adapters/http.js:202:11) at IncomingMessage.emit (events.js:203:15) at endReadableNT (_stream_readable.js:1145:12) at process._tickCallback (internal/process/next_tick.js:63:19) (node:1822) 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(). (rejection id: 2) (node:1822) [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 you delete the token.json before running the generate_token.js? If not, please try that.

mtroxx commented 3 years ago

That worked, thank you. :)