I've set up a Windows .bat script to run a backup of a particular directory every day. It consistently works for some time (a day, several days, a week... seems inconsistent) and then stops. If I refresh the token, then it runs again, until it doesn't again. I've seen loads of posts about this issue and have tried every suggestion I can, but many of them assume things will happen, that don't for me (or options available in Google, that appear not to be for me). I can't figure out how to "Publish" my app... it's already set as Internal, and I had thought that was all I needed to do. Not even sure it's relevant at all. Finally caving in and asking for help here.
Run the command 'rclone version' and share the full output of the command.
- os/version: Microsoft Windows 10 Home 21H1 (64 bit)
- os/kernel: 10.0.19043.1645 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.17.8
- go/linking: dynamic
- go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
Google Drive
set datepath=20%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%
set y=%DATE:~10,4%
set m=%DATE:~4,2%
rclone copy V:\SC_Data_Files SCBackups:20%y%/%m%/%datepath%.SC_Data_Files --exclude *.scid --exclude *.dly --exclude *.depth
are you a GSuite user? (PS: if you are a GSuite user, you could also select "Internal" instead of "External" above, but this has not been tested/documented so far).
if not, as i understand it, need need to make the app external, that is what i do.
If you already configured an "Oauth Consent Screen", then skip to the next step; if not, click on "CONFIGURE CONSENT SCREEN" button (near the top right corner of the right panel), then select "External"
Yeah I don't know either. I'm logged into the cloud console, as my normal GSuite admin user. I'm the sole owner/user on the account. I have all the normal console stuff in there, but no way to "publish" the app that I can see. It's been driving me crazy for weeks (since I started using RClone).
Yeah I want to believe I'm just making a mistake somehow, but I've been over this again and again and I just can't see anything. I'm absolutely logged in as my admin user, I have ALL the expected admin accesses and controls so... I dunno.
Are you suggesting I contact RClone support? Or Google? Cuz I've never had good luck contacting Google for support of any kind lol
So on a lark, I made the project External rather than Internal, which immediately presented me the Publish button. I've now published my app, so let's see if the token sticks around or not. I thought if it was Internal, then I didn't have to worry about it since I'm the only user but... maybe not.
I attempted to set up a "use a service account file" as suggested to another user with seemingly the same issue. I followed all of Google's instructions and everything seemed to work, but I can't tell if it did anything.
Just now I manually refreshed the token, and ran the job again. The token literally expired during the job, about 3-4 minutes after starting it. I was running it at a command prompt so I watched it happen.
token expired and there's no refresh token - manually refresh with "rclone config reconnect SCBackups:"
I'm getting close to giving up on RClone and I really don't want to. Does anyone have any further suggestions on how I can get the token to stick around, or automatically refresh itself?
If you are using a service account, there aren't any tokens to refresh so something isn't right in your setup. Without seeing a rclone.conf and screenshots, it's hard to tell.
You don't seem to be having a rclone issue as it's more a Google issue and something specific to your account (bug/something) or a process that isn't quite right.
I have a test app on my personal Google account that is external in production:
If there was a rclone issue with the way tokens were being refreshed, the forums would be flooded with it as Google Drive is very popular and used quite a bit.
So either it's a process issue which I'm not sure what or you have a Google bug.
Yeah I'm entirely willing to acknowledge that this could be something on my side, but I have no idea what... it's why I finally broke down and posted to get help here.
I've tried my app as external and in production, no change.
Also to be clear, I can manually refresh without any issue, every time. The problem is it won't remember the token for any length of time (though expiring after only a few minutes last night, was a first!)
I'm totally new to RClone so I don't know what to even show, but if you tell me what specifically to show and how to get it, I'll gladly post anything that might help. I appreciate your continued efforts to help out.