jclarke0000 / MMM-MyNotes

MagicMirror Module to display notes in a GMail account
2 stars 0 forks source link

Any ideas why I would get this error? #1

Open benderstwin opened 5 years ago

benderstwin commented 5 years ago

Whoops! There was an uncaught exception...
TypeError: Cannot read property 'toString' of undefined
    at toBase64 (/home/pi/MagicMirror/modules/MMM-MyNotes/node_modules/base64url/dist/base64url.js:16:27)
    at Function.decode (/home/pi/MagicMirror/modules/MMM-MyNotes/node_modules/base64url/dist/base64url.js:13:23)
    at /home/pi/MagicMirror/modules/MMM-MyNotes/node_helper.js:119:39
    at OAuth2Client._postRequest (/home/pi/MagicMirror/modules/MMM-MyNotes/node_modules/google-auth-library/lib/auth/oauth2client.js:402:3)
    at postRequestCb (/home/pi/MagicMirror/modules/MMM-MyNotes/node_modules/google-auth-library/lib/auth/oauth2client.js:362:12)
    at Request._callback (/home/pi/MagicMirror/modules/MMM-MyNotes/node_modules/google-auth-library/lib/transporters.js:106:7)
    at Request.self.callback (/home/pi/MagicMirror/modules/MMM-MyNotes/node_modules/request/request.js:185:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (/home/pi/MagicMirror/modules/MMM-MyNotes/node_modules/request/request.js:1161:10)
MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
Shutting down server..```

See the API hits in the google console, no errors.
shai-shaininger commented 5 years ago

at file "node_helper.js" approx line 119 change: noteText: base64url.decode(msgResponse.payload.body.data) to this: noteText: msgResponse.snippet.substring(0,10)

this will show you upto 10 characters of the email.body (that is label Notes)