Closed ghost closed 2 years ago
I've not seen this error before.
The oauth flow has changed (because the one we were using is now obsolete) and you do need a new client ID. The procedute to make the client id and secret has changed and is documented here https://gilesknap.github.io/gphotos-sync/main/tutorials/oauth2.html
Are those the steps that you used?
Thank you so much for the quick response. Yes, those instructions align with my personal notes when I set this up and updated my documentation this past January of 2022.
Perhaps I need to recreate the service account. I suppose I can delete everything except the actual project itself and recreate everything related to authentication. Is that what you recommend? I may go ahead and create a debug flow and sniff the applicable traffic on my router and inspect the raw traffic afterwards to identify where the issue occurs in the authentication flow post setup.
What's weird is the actual authentication flow succeeds (I did have to curl the final local redirect address from the docker shell, but nonetheless, the authentication flow still proceeded, appearing successful at that).
I did have to curl the final local redirect address from the docker shell
I wonder if that works?
The recommendation is to do all the initial Authenticaion locally on a machine with a browser and then copy the .ghotos-token over to your headless host.
Could you try that?
After performing the authentication flow from within Windows, I was able to successfully transfer the token generated within the specified storage directory to the preferred location (unRAID Share) and execute the script successfully.
Create directory: C:\Users\
Placed client_secret.json (renamed from original download via Google Cloud Console) in the directory created in the previous step.
After installing python 3.10 through Chocolatey (choco install python -Y), from C:\Python310\Scripts:
I specified a test storage directory after creating the directory to ensure no command execution issue.
.\gphotos-sync.exe C:\test
Success!
NOTE: Although previous service accounts and Oauth credentials did show as valid, I removed all associated credentials and created a new service account in addition to new credentials. I wanted to ensure no obsolete authentication methods / flows were being carried over from original credentials.
I believe until the next round of API / Authentication changes, we are good to go. Thank you for assistance and this script.
Awesome, thanks for reporting.
Hello, after successfully completing the Oauth2 configuration, when attempting to run a sync operation, the following errors populate the log file:
Prior to my token expiration around June 18th, the script, which I have running in a Docker container on unRAID via template, was working perfectly.
Troubleshooting steps:
I generated a new client secret, verified Google Cloud service account status, and downloaded an updated JSON template file. I then renamed the JSON to the appropriate value for the Docker container and copied the file to the mapped GooglePhotosSync Docker Container config directory. I've confirmed the Google Photos API is active for the corresponding account and permissions are set accordingly for the service account. As a final test, I have created a brand new client ID under Google Cloud Console but was unsuccessful in running the synchronization command with the test client ID. Please help! Thank you in advance.