Input/output error with personal google creds

What is the problem you are having with rclone?

rclone mount randomly stops working after a few days

ls -l
ls: reading directory '.': Input/output error
total 0

this consistently happens at intervals with my personal google credentials

when i delete the remote and the mount folder, then add it again, it works with the same systemd service file for a few days, then craps out

What is your rclone version (output from rclone version)

rclone v1.56.2

  • os/version: ubuntu 20.04 (64 bit)
  • os/kernel: 5.4.0-89-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.16.8
  • go/linking: static
  • go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

[Unit]
Description=RClone Service
Wants=network-online.target
After=network-online.target

[Service]
Type=notify
Environment=RCLONE_CONFIG=/home/jellyfin/.config/rclone/rclone.conf
KillMode=none
RestartSec=5
ExecStart=/usr/bin/rclone mount ashipaflix: /home/jellyfin/media \
--allow-other \
--allow-non-empty \
--use-mmap \
--poll-interval=10s \
--drive-pacer-min-sleep 10ms \
--drive-pacer-burst 200 \
--tpslimit 10
ExecStop=/bin/fusermount -uz /home/jellyfin/media
Restart=on-failure
User=jellyfin
Group=jellyfin

[Install]
WantedBy=multi-user.target


The rclone config contents with secrets removed.

ashipaflix]
type = drive
client_id = 472723REDACTED-chonvn054likelh1qf5c66at05nui9u2.apps.googleusercontent.com
client_secret = .....................................................
scope = drive
token = {"access_token":"REDACTED_YPo_bP1A-lxSn8hqAhFq7zOZbdn9L1q0dWx7uXuVQAMIPR4H7PJlJf6X3WjP0mPJSkqwu2iREVFc7j0tTn-MojjqhlgL2KmQ9EVPRHde>
team_drive = 0AHUwjEhGA0vLUk9PVA
root_folder_id =


A log from the command with the -vv flag

rclone mount -vv ashipaflix: /home/jellyfin/media
2021/10/27 09:27:52 DEBUG : rclone: Version "v1.56.2" starting with parameters ["rclone" "mount" "-vv" "ashipaflix:" "/home/jellyfin/media"]
2021/10/27 09:27:52 DEBUG : Creating backend with remote "ashipaflix:"
2021/10/27 09:27:52 DEBUG : Using config file from "/home/jellyfin/.config/rclone/rclone.conf"
2021/10/27 09:27:52 INFO  : Google drive root '': Failed to get StartPageToken: googleapi: Error 401: Invalid Credentials, authError
2021/10/27 09:27:52 DEBUG : Google drive root '': Mounting on "/home/jellyfin/media"
2021/10/27 09:27:52 DEBUG : : Root: 
2021/10/27 09:27:52 DEBUG : : >Root: node=/, err=<nil>

Is your OAuth consent screen internal or external? How did you make your creds?

external.

can't create internal consent screen because i have a regular Google account. It seems only google workspace users can make internal ones

I made the creds in the console the regular way i guess.

Today after posting this i have tried publishing the app, and its technically in 'verification'

i have no idea if that will make a difference

If you have it external on a personal account, I think you have to verify it for it to work.

Your token not verified times out after a few days as you can see.

I think you can make it testing and make a test user and that may work but I'm not sure. I only use GSuite for my creds and not a personal account.

My personal test account looks like this:

This was my setup too, and i added a test user which was the same account that i use for the mount

what i've now done is click on publish.

What is really confusing is that i have tried using the default rclone ID and Secrets in the past, and i think i ended up with the same error

Yeah, I don't use a non GSuite account other than a test here or there.

is there some way to automate refreshing the credentials automatically?

Other than using a proper GSuite account, I don't believe so as you have to oAuth2 and if you could automate a refresh, it would break the process I'd imagine.

wish i could tell the exact duration of each refresh so i could set reminders for myself

I believe it's every 7 days.

hi,

a service account does not use tokens, could that be a solution for the OP?

To the best of my knowledge, you can't do delegation which allows impersonation in a non GSuite environment.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.