• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Error with GooglePhotos API

Scheduled Pinned Locked Moved Unsolved Troubleshooting
21 Posts 3 Posters 7.3k Views 3 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.
  • D Offline
    dum
    last edited by Dec 31, 2022, 6:16 PM

    Hi everybody, I’m new here, as long as I arrived trying to set up a photo frame with google photos.
    I have a Raspberry PI trying to set it up, but when I reach the point to Generate Token, I find following error, any help?:

    pi-photoframe@raspberrypi:~/MagicMirror/modules/MMM-GooglePhotos $ node generate_token.js
    [GPHOTOS:CORE] TypeError: Cannot read properties of undefined (reading '0')
    /home/pi-photoframe/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:133
          throw e
          ^
    
    TypeError: Cannot read properties of undefined (reading '0')
        at new Auth (/home/pi-photoframe/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:35:91)
        at GPhotos.onAuthReady (/home/pi-photoframe/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:130:14)
        at GPhotos.generateToken (/home/pi-photoframe/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:141:10)
        at Object.<anonymous> (/home/pi-photoframe/MagicMirror/modules/MMM-GooglePhotos/generate_token.js:10:9)
        at Module._compile (node:internal/modules/cjs/loader:1165:14)
        at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
        at Module.load (node:internal/modules/cjs/loader:1043:32)
        at Function.Module._load (node:internal/modules/cjs/loader:878:12)
        at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
        at node:internal/main/run_main_module:22:47
    
    S 1 Reply Last reply Dec 31, 2022, 6:25 PM Reply Quote 0
    • S Offline
      sdetweil @dum
      last edited by Dec 31, 2022, 6:25 PM

      @dum that means you selected the wrong app type on google developers console when creating the cerdentials.

      the credentials.json file must start

      {"installed":{"
      

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      D B 2 Replies Last reply Jan 1, 2023, 10:46 AM Reply Quote 0
      • D Offline
        dum @sdetweil
        last edited by Jan 1, 2023, 10:46 AM

        @sdetweil Thanks for your answer.
        I select “TVs and Limited Input devices” as per the manual.
        And the credentials.json file starts with that code you write.
        I think that is not the solution or I may be still be doing something wrong.

        1 Reply Last reply Reply Quote 0
        • B Offline
          bugsounet Banned @sdetweil
          last edited by Jan 2, 2023, 11:28 AM

          @sdetweil said in Error with GooglePhotos API:

          the credentials.json file must start

          {"installed":{"
          

          euh installed is deprecied since one years now …
          it must start with web: { now

          S 1 Reply Last reply Jan 2, 2023, 12:28 PM Reply Quote 0
          • S Offline
            sdetweil @bugsounet
            last edited by Jan 2, 2023, 12:28 PM

            @bugsounet eh? works for me every time…

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            B 1 Reply Last reply Jan 2, 2023, 12:45 PM Reply Quote 0
            • B Offline
              bugsounet Banned @sdetweil
              last edited by bugsounet Jan 2, 2023, 12:51 PM Jan 2, 2023, 12:45 PM

              @sdetweil just create new credentials and see ;)

              For old compatibility:
              d1162e22-eaa4-4b76-95b1-8892de29cca2-image.png

              S 1 Reply Last reply Jan 2, 2023, 1:09 PM Reply Quote 0
              • S Offline
                sdetweil @bugsounet
                last edited by Jan 2, 2023, 1:09 PM

                @bugsounet so it should have worked for either type

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • D Offline
                  dum
                  last edited by Jan 5, 2023, 4:50 PM

                  I’m sorry. what should I do?
                  The credentials.json file is generated automatically from the google developers console… :astonished_face:

                  S 1 Reply Last reply Jan 5, 2023, 4:53 PM Reply Quote 0
                  • S Offline
                    sdetweil @dum
                    last edited by Jan 5, 2023, 4:53 PM

                    @dum @bugsounet suggests you pick a different app type, and download a new credentials file

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    D 1 Reply Last reply Jan 5, 2023, 6:31 PM Reply Quote 0
                    • D Offline
                      dum @sdetweil
                      last edited by Jan 5, 2023, 6:31 PM

                      @sdetweil thanks for the suggestion, I tried “desktop app” with same result.
                      the other app types require more data which I dont know how to fill.

                      S 1 Reply Last reply Jan 5, 2023, 6:42 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      1 / 3
                      • First post
                        4/21
                        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