Comments (12)
Sadly, today the error returned, so it seems the token expires after 1 week.
from gphotos-uploader-cli.
Similar issue on my side after updating as well
from gphotos-uploader-cli.
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.
Well split my setup into 2 separate gphoto accounts today, will see what happens
from gphotos-uploader-cli.
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.
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.
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.
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.
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.
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.
@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.
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)
- Several SecretBackendTypes not working for MacOS HOT 2
- Unable to run latest version HOT 5
- Add option to specify web port for authentication HOT 1
- Photos "uploaded" but not showing up in google photos HOT 1
- Add a cli switch to specify the name of the album HOT 1
- Run headless by making it load from created credential json file HOT 8
- Uploads are showing date of upload as filename. HOT 5
- allow custom RedirectURLHostname HOT 2
- didn't find all files, please add ability to load file paths from txt. HOT 6
- Show Google Photos API error description to make easier the troubleshooting HOT 9
- Abort upload if v3 directories are found
- 4.2.0 doesn't show version HOT 2
- "option CreateAlbums is invalid, '⏎" on fresh installation HOT 2
- Error message for expired token could be clearer
- Missing steps in OAuth setup / authentication
- Pre resize/encode video to lower resolution and quality before upload HOT 2
- After upgrading from 3.5.2 to 4.5.0 it does not detect already uploaded images HOT 2
- unlimited storage HOT 2
- cannot upload a video that's more than 20gb HOT 1
- Is there any way to divide the job as smaller parts? Because Google api limits 10000 each day HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gphotos-uploader-cli.