MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Google Tasks 'client_secret' of 'this.credentials.installed' as it is undefined.

    Scheduled Pinned Locked Moved Solved Troubleshooting
    13 Posts 2 Posters 2.5k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      torafadora
      last edited by sdetweil

      I am struggling with Google Tasks Module, I’ve been doing it for a few ours. I am able to ping the api in terminal but not in the module itself

      {
                  module: 'MMM-GoogleTasks',
                  header: "Google Tasks",
                  position: "top_left",
                  config: {
                      credentialsPath: "C:/Users/CLT4/MagicMirror/modules/MMM-GoogleTasks/credentials.json",
                      tokenPath: "C:/Users/CLT4/MagicMirror/modules/MMM-GoogleTasks/token.json",
                      accounts: [
                          {
                              name: "me",
                              includedLists: ["MDEwNTc1NjI1MjY1ODA3NzEwNTM6MDow"]
                          },
                      ]
      
                  }
      

      [2025-02-22 17:24:52.101] [ERROR] [MMM-GoogleTasks] - Error retrieving Google Tasks: TypeError: Cannot destructure property ‘client_secret’ of ‘this.credentials.installed’ as it is undefined.
      any help would be awesome

      S 1 Reply Last reply Reply Quote 0
      • T Offline
        torafadora @sdetweil
        last edited by

        @sdetweil I got it working with that one, why can’t it work with the original, this one is too plain

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @torafadora
          last edited by

          @torafadora the .installed comes from a different app type selection on the google credentials page

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          T 2 Replies Last reply Reply Quote 0
          • T Offline
            torafadora @sdetweil
            last edited by

            @sdetweil So what would I need to do? I have my credentials.json and token.json. I thought it would pull the secret from the credentials.json.

            S 1 Reply Last reply Reply Quote 0
            • T Offline
              torafadora @sdetweil
              last edited by

              @sdetweil What do I need to do? I already have the token.json that was generated from the credentials.json, wouldn’t the secret come from the credentials.json?

              1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @torafadora
                last edited by

                @torafadora change the app type, and download a new credentials.json

                look inside, its text. if it has an installed key then its the correct type

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                T 1 Reply Last reply Reply Quote 0
                • T Offline
                  torafadora @sdetweil
                  last edited by sdetweil

                  @sdetweil
                  I made a new desktop application download the credentials.json ran the authenticate.mjs to generate the token.json file. But I am getting the same error as before.
                  [ERROR] [MMM-GoogleTasks] - Error retrieving Google Tasks: TypeError: Cannot destructure property ‘client_secret’ of ‘this.credentials.installed’ as it is undefined.

                  here is the client_secret.json-

                  {
                    "installed": {
                      "client_id": "x",
                      "project_id": "xxx",
                      "auth_uri": "https://accounts.google.com/o/oauth2/auth",
                      "token_uri": "https://oauth2.googleapis.com/token",
                      "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
                      "client_secret": "xxx",
                      "redirect_uris": ["http://localhost"]
                    }
                  }
                  
                  [
                    {
                      "account": "me",
                      "token": {
                        "access_token": "xxx",
                        "refresh_token": "xxx",
                        "scope": "https://www.googleapis.com/auth/tasks.readonly",
                        "token_type": "Bearer",
                        "refresh_token_expires_in": 604799,
                        "expiry_date": 1740275388678
                      }
                    }
                  ]
                  
                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @torafadora
                    last edited by

                    @torafadora which goggletasks are you using?

                    i dont find those config parms in jgauth

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    T 2 Replies Last reply Reply Quote 0
                    • T Offline
                      torafadora @sdetweil
                      last edited by

                      @sdetweil https://github.com/spydersoft-consulting/MMM-GoogleTasks

                      This is the project I am working from. I don’t understand what you are trying to say.

                      S 1 Reply Last reply Reply Quote 0
                      • T Offline
                        torafadora @sdetweil
                        last edited by

                        @sdetweil Don’t need to put this in but I have worked with the google console with another module I built from scratch for reading and automatically classifying emails and that works no problem. I also know that my credentials, token and client_secret are correct because I am able to get a json response from a URL.

                        1 Reply Last reply Reply Quote 0
                        • S Offline
                          sdetweil @torafadora
                          last edited by

                          @torafadora i was looking at

                          https://github.com/jgauth/MMM-GoogleTasks

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          T 1 Reply Last reply Reply Quote 0
                          • T Offline
                            torafadora @sdetweil
                            last edited by

                            @sdetweil I got it working with that one, why can’t it work with the original, this one is too plain

                            S 1 Reply Last reply Reply Quote 0
                            • S Offline
                              sdetweil @torafadora
                              last edited by

                              @torafadora i dont know,

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              S 1 Reply Last reply Reply Quote 0
                              • S Offline
                                sdetweil @sdetweil
                                last edited by sdetweil

                                @torafadora

                                maybe change the paths to

                                ‘modules/MMM-GoogleTasks/…filename’

                                as the module is executed w MagicMirror running in the MagicMirror folder

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                1 Reply Last reply Reply Quote 0
                                • S sdetweil has marked this topic as solved on

                                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                With your input, this post could be even better 💗

                                Register Login
                                • 1 / 1
                                • First post
                                  Last post
                                Enjoying MagicMirror? Please consider a donation!
                                MagicMirror created by Michael Teeuw.
                                Forum managed by Sam, technical setup by Karsten.
                                This forum is using NodeBB as its core | Contributors
                                Contact | Privacy Policy