Fedora 40 Deja-Dup timeout error after 1 hour of backing up

Hello,

I have a Fedora 40 workstation that uses Deja-dup installed from Fedora rpm via dnf to backup data to my Google drive with ample storage space. When backing up small increments, all seems fine. But when a large amount of data needs to be backed up, deja-dup consistently exits after almost precisely one hour with the error messages below.

If I restart the backup, it will continue for an hour and then quit with the same messages. I was able to get a large backup to complete by manually restarting it every hour. The message about oauth2: “invalid client” “unauthorized”, the “expires_in”:3599 and the consistent 1 hour interrupt time makes me think this is an authentication refresh issue. But I have no idea how to troubleshoot further. Any advice on how to address this would be greatly appreciated. If it’s of any additional troubleshooting value I have this same google account connected in settings>on-line accounts, though I don’t use that connection often.

Thanks,

Kevin

Giving up after 5 attempts. BackendException: rclone returned rc = 1: 2024/12/05 13:10:10 DEBUG : Setting --log-level "DEBUG" from environment variable RCLONE_LOG_LEVEL="DEBUG"
<7>DEBUG : rclone: Version "1.64.2" starting with parameters ["rclone" "copyto" "/tmp/duplicity-ts94kq98-tempdir/mktemp-jelxt2wa-28" "dejadupdrive:backup-directory/duplicity-inc.20241121T...Z.vol26.difftar.gpg"]
<7>DEBUG : rclone: systemd logging support activated
<7>DEBUG : Creating backend with remote "/tmp/duplicity-ts94kq98-tempdir/mktemp-jelxt2wa-28"
<7>DEBUG : Using config file from "/home/$USER/.config/rclone/rclone.conf"
<7>DEBUG : fs cache: adding new entry for parent of "/tmp/duplicity-ts94kq98-tempdir/mktemp-jelxt2wa-28", "/tmp/duplicity-ts94kq98-tempdir"
<7>DEBUG : Creating backend with remote "dejadupdrive:backup-directory/"
<7>DEBUG : Setting type="drive" for "dejadupdrive" from environment variable RCLONE_CONFIG_DEJADUPDRIVE_TYPE
<7>DEBUG : Setting client_id="...2.apps.googleusercontent.com" for "dejadupdrive" from environment variable RCLONE_CONFIG_DEJADUPDRIVE_CLIENT_ID
<7>DEBUG : Setting token="{\"access_token\":\"ya… ...7\",\"expires_in\":3599,\"scope\":\"https://www.googleapis.com/auth/drive.file\",\"token_type\":\"Bearer\",\"refresh_token\":\"1//0… ...Z\"}" for "dejadupdrive" from environment variable RCLONE_CONFIG_DEJADUPDRIVE_TOKEN
<7>DEBUG : Setting scope="drive.file" for "dejadupdrive" from environment variable RCLONE_CONFIG_DEJADUPDRIVE_SCOPE
<7>DEBUG : Setting use_trash="false" for "dejadupdrive" from environment variable RCLONE_CONFIG_DEJADUPDRIVE_USE_TRASH
<7>DEBUG : dejadupdrive: detected overridden config - adding "{Nftip}" suffix to name
<7>DEBUG : Setting scope="drive.file" for "dejadupdrive" from environment variable RCLONE_CONFIG_DEJADUPDRIVE_SCOPE
<7>DEBUG : Setting use_trash="false" for "dejadupdrive" from environment variable RCLONE_CONFIG_DEJADUPDRIVE_USE_TRASH
<7>DEBUG : Setting client_id="91...2.apps.googleusercontent.com" for "dejadupdrive" from environment variable RCLONE_CONFIG_DEJADUPDRIVE_CLIENT_ID
<7>DEBUG : Setting token="{\"access_token\":\"y… ...7\",\"expires_in\":3599,\"scope\":\"https://www.googleapis.com/auth/drive.file\",\"token_type\":\"Bearer\",\"refresh_token\":\"1//0...M\",\"expiry\":\"2024-12-05T18:08:17.805650Z\"}" for "dejadupdrive" from environment variable RCLONE_CONFIG_DEJADUPDRIVE_TOKEN
<7>DEBUG : Setting token="{\"access_token\":\"ya… ...7\",\"expires_in\":3599,\"scope\":\"https://www.googleapis.com/auth/drive.file\",\"token_type\":\"Bearer\",\"refresh_token\":\"1//01… ...Z\"}" for "dejadupdrive" from environment variable RCLONE_CONFIG_DEJADUPDRIVE_TOKEN
<7>DEBUG : dejadupdrive{Nftip}: Loaded invalid token from config file - ignoring
<7>DEBUG : dejadupdrive{Nftip}: got fatal oauth error: oauth2: "invalid_client" "Unauthorized"
Failed to create file system for destination "dejadupdrive:backup-directory/": couldn't find root directory ID: Get "https://www.googleapis.com/drive/v3/files/root?alt=json&fields=id&prettyPrint=false&supportsAllDrives=true": couldn't fetch token: invalid_client: if you're using your own client id/secret, make sure they're properly set up following the docs

I see you’ve filed a bug in GNOME’s GitLab.

This seems to be an issue with rclone used as the backend for connecting to Google Drive.

Did you try the Flatpak version of Deja-Dup (in flathub remote it’s on a newer version 47)?

Thanks for your reply.
I have not tried the Flatpak version, though that sounds like a good option. The other option suggested was upgrading for Fedora 41 which has a later version of rclone, which seems reasonable as well.

Thanks,

Kevin

Yes, F41 currently provides rclone with version 1.67.0.

On the Rclone issue tracker they recommend using a Google Service Account instead of a transient API-token connection since those don’t require a 1-hour renewal. When using Rclone manually this would be the responsiblity of the user to setup.

Deja-Dup abstracts the connection process by using the default Google Drive connection from Gnome Settings, this is a standard API-token connection.

So this bug would primarily be Deja’s responsiblity to mitigate, then Gnome’s, and last Rclone’s.

1 Like

Hi Kevin,

<7>DEBUG : Setting token="{\"access_token\":\"y… ...7\",\"expires_in\":3599,\
`

… Your authentication token is set to timeout at 3600 seconds … that’s the “why” … now I am not certain if that timeout is set by Google or ?