Git Product home page Git Product logo

Comments (12)

Devenda avatar Devenda commented on May 30, 2024 1

Sadly, today the error returned, so it seems the token expires after 1 week.

from gphotos-uploader-cli.

NorthernMan54 avatar NorthernMan54 commented on May 30, 2024 1

Similar issue on my side after updating as well

from gphotos-uploader-cli.

Devenda avatar Devenda commented on May 30, 2024

Same issue here.
In my case running push with a different passphrase and completing the auth fixes the issue until next time.

Given that the Google API pages looked quite different than mentioned in the guide, maybe some setting need to be changed on the Google side of things?

from gphotos-uploader-cli.

NorthernMan54 avatar NorthernMan54 commented on May 30, 2024

Well split my setup into 2 separate gphoto accounts today, will see what happens

from gphotos-uploader-cli.

pacoorozco avatar pacoorozco commented on May 30, 2024

Hi!
I'm running the CLI on Linux and it's working well. It can refresh the OAuth token without any problem.

Let's try to troubleshoot the problem. Can you run gphotos-uploader-cli version?

I released recently a new version to adapt the CLI to the new OAuth flow I Google.

from gphotos-uploader-cli.

Devenda avatar Devenda commented on May 30, 2024

I was on 3.3.1.

I just installed 3.4.0 and everything works great again.
I'll let you know if it stops working again!

(btw: does the new auth command need to be run when updating too? Because everything seems to run fine without doing so).

from gphotos-uploader-cli.

pacoorozco avatar pacoorozco commented on May 30, 2024

Please, the ones that the error is happening, can you update your comment with the output of the failing CLI with the debug flag enabled?

from gphotos-uploader-cli.

NorthernMan54 avatar NorthernMan54 commented on May 30, 2024

Sorry, this is a bit messy, as I’m logging this thru syslog

‘’’
May 10 06:15:34 walter gphoto-upload-cli: #33[0;1;36m[info] #33[0mReading configuration from '/home/xxxxxx/.gphotos-uploader-cli/config.hjson'
May 10 06:15:34 walter gphoto-upload-cli: #33[0;1;32m[debug] #33[0mCurrent configuration: {"APIAppCredentials":{"ClientID":"175591024665-3tj99kqv2926a5db5fdifjqg3qjf528f.apps.googleusercontent.com","ClientSecret":"REMOVED"},"Account":"xxxxxxxx @gmail.com","SecretsBackendType":"file","Jobs":[{"SourceFolder":"/home/xxxxxx/Desktop/gphoto","CreateAlbums":"folderName","DeleteAfterUpload":true,"IncludePatterns":[],"ExcludePatterns":[]}]}
May 10 06:15:34 walter gphoto-upload-cli: #33[0;1;36m[info] #33[0mAuthenticating using token for '[email protected]'
May 10 06:15:35 walter gphoto-upload-cli: #33[0;1;31m[fatal] #33[0moauth2: cannot fetch token: 400 Bad Request
May 10 06:15:35 walter gphoto-upload-cli: Response: {
May 10 06:15:35 walter gphoto-upload-cli: "error": "invalid_grant",
May 10 06:15:35 walter gphoto-upload-cli: "error_description": "Token has been expired or revoked."
May 10 06:15:35 walter gphoto-upload-cli: }
‘’’

from gphotos-uploader-cli.

Devenda avatar Devenda commented on May 30, 2024

It seems to only log the config:

[info]   Reading configuration from '/root/.gphotos-uploader-cli/config.hjson'
[debug]  Current configuration: {"APIAppCredentials":{"ClientID":"291868308856-5ddrjvv9c45gsht7ce7u7apmv6f3fn6o.apps.googleusercontent.com","ClientSecret":"REMOVED"},"Account":"[email protected]","SecretsBackendType":"auto","Jobs":[{"SourceFolder":"/Data/Photos","CreateAlbums":"Off","DeleteAfterUpload":false,"IncludePatterns":["**/*.jpg","**/*.JPG","**/*.png"],"ExcludePatterns":[]}]}
[info]   Authenticating using token for '[email protected]'
Enter the passphrase to open the token store:
[fatal]  oauth2: cannot fetch token: 400 Bad Request
Response: {
  "error": "invalid_grant",
  "error_description": "Token has been expired or revoked."
}

from gphotos-uploader-cli.

pacoorozco avatar pacoorozco commented on May 30, 2024

Hi all

After debugging a lot I've found the problem. Google put some restrictions to the access and refresh tokens that we use to authenticate our CLI.

You can read them here:

A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.

So I don't see any other way to fix it different from running gphotos-uploader-cli auth each time that the refresh token is expired. 😪

from gphotos-uploader-cli.

Devenda avatar Devenda commented on May 30, 2024

@pacoorozco This means that it is no longer possible to run headless?
What about setting it to an other status than 'testing'?

from gphotos-uploader-cli.

pacoorozco avatar pacoorozco commented on May 30, 2024

This gphotos-uploader-cli needs an application running in the Google Cloud Platform under your user. It consumes quota from this application, which is created when you create the credentials the first time you run the CLI.

So, I don't think it's possible to pass the Google verification process and offer this app for all the users from your Google account. Read more here

from gphotos-uploader-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.