-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to upload to g-drive due to 401 unauthorized #5
Comments
I think it's a bug, I have the same problem. |
{ |
This shell script is not easy to maintain as it uses several global variables among functions, and many infinite loop. There are several bugs inside, some abnormal operation may trigger new issues. This issue is caused by user deletion of directories in google drive, the script fails to upload to the deleted directory and runs into a dead loop, so it fails all the time. Please add me as a committer, I've fixed on my own camera, hope there is no side-effect to other features. |
Thank you for your code. |
Glad to commit |
It worked fine a few days ago, however, no files are uploaded to g-drive these days when I check google drive.
The bash scripts are running after reboot, I checked the upload script log, found many items as following:
WARNING: Fri Nov 27 02:10:58 PST 2020 : Can not send metadata of the file. Something happen. Trying to send metadata of the file again
And the log comes from code:
if grep -q "401 Unauthorized" ${gdrive_dir}tmp/lastFileMetadataInfo; then echo "WARNING: $(date) : Can not send metadata of the file. Token was expired. Trying to refresh token and send metadata again" renew_token else echo "WARNING: $(date) : Can not send metadata of the file. Something happen. Trying to send metadata of the file again" echo $(cat ${gdrive_dir}tmp/lastFileMetadataInfo) sleep 5 fi
So, why the unauthorized happened? does it need to re-do the whole google API authentication process after a reboot?
The text was updated successfully, but these errors were encountered: