MagicMirror² v2.5.0 is available! For more information about this release, check out this topic.

MMM-gtasks errors: Error while trying to retrieve access token



  • Re: MMM-gtasks - Google tasks for your mirror

    Problem loading tasks.
    Try running the mirror with node serveronly for extra info
    Follow the guide in the readme.md
    Have you downloaded your 'client_sectet.json'?
    Have you ran initialy with node serveronly and followed the link provided?
    

    I think my problems relates to my client_secret.json. In the installation guide it says “Download your client_secret.json file by following the guide linked below” except I couldn’t find any guide so just winged it. I assume what I did was incorrect as this is what I got:

    Ready to go! Please point your browser to: http://localhost:8080
    Whoops! There was an uncaught exception...
    TypeError: Cannot read property 'client_secret' of undefined
        at authorize (/home/pi/MagicMirror/modules/MMM-gtasks/GoogleTasks.js:34:51)
        at processClientSecrets (/home/pi/MagicMirror/modules/MMM-gtasks/GoogleTasks.js:112:19)
        at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:447:3)
    

    UPDATE:

    This what I get now:

    Error while trying to retrieve access token { Error: invalid_grant
    at Request._callback (/home/pi/MagicMirror/modules/MMM-gtasks/node_modules/google-auth-library/lib/transporters.js:81:15)
    at Request.self.callback (/home/pi/MagicMirror/modules/MMM-gtasks/node_modules/request/request.js:186:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request. (/home/pi/MagicMirror/modules/MMM-gtasks/node_modules/request/request.js:1163:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at IncomingMessage. (/home/pi/MagicMirror/modules/MMM-gtasks/node_modules/request/request.js:1085:12)
    at IncomingMessage.g (events.js:292:16)
    at emitNone (events.js:91:20) code: 400 }
    Token stored to ./modules/MMM-gtasks/gtasks_token.json

    Now, the screen appears but no error from my Tasks, just says Loading and seems stalled.

    Any help gratefully received. Assume you are explaining to Homer Simpson 🙂



  • Anybody?



  • Hey @Esinem,

    In GoogleTasks.js:100 it has the following URL: https://developers.google.com/google-apps/tasks/quickstart/nodejs#step_1_turn_on_the_api_name

    Recommend you follow Step 1, that should yield your client_secret.json.

    Let us know how you fare.



  • @ninjabreadman Thanks a ton! Unfortunately, the instructions were referred to but not included in the installation instructions as far as I could see.



  • @ninjabreadman Hmm, unfortunately, no change 😞 I ran node serveronly but I couldn’t see any errors. Debug is true in config.js

    pi@raspberrypi:~ $ cd /home/pi/MagicMirror
    pi@raspberrypi:~/MagicMirror $ node serveronly
    Starting MagicMirror: v2.1.3
    Loading config …
    Loading module helpers …
    No helper found for module: alert.
    Initializing new module helper …
    Module helper loaded: updatenotification
    No helper found for module: clock.
    Initializing new module helper …
    Module helper loaded: calendar
    No helper found for module: compliments.
    No helper found for module: currentweather.
    Initializing new module helper …
    Module helper loaded: MMM-gtasks
    No helper found for module: weatherforecast.
    Initializing new module helper …
    Module helper loaded: newsfeed
    All module helpers loaded.
    Starting server on port 8080 …
    Server started …
    Connecting socket for: updatenotification
    Connecting socket for: calendar
    Starting node helper for: calendar
    Connecting socket for: MMM-gtasks
    Starting node helper for: MMM-gtasks
    Connecting socket for: newsfeed
    Starting module: newsfeed
    Sockets connected & modules started …

    Ready to go! Please point your browser to: http://localhost:8080