onedrive backend HTTP error 410: Gone for URL

Bug #1811114 reported by Charlie on 2019-01-09
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Duplicity
High
Unassigned

Bug Description

Since 8.1.2019: When trying to backup to onedrive HTTP 410 Error is raised.
I sniffed the request manually and got the API response:

{
    "error": {
        "code": "api_deprecated",
        "message": "This API is no longer supported. Please see https://aka.ms/livesdkmigration for information about migrating your application to Microsoft Graph."
    }
}

While reading the MS website it seems to me, that the onedrive backend needs refactoring to new API.
Can anyone acknowledge?

Reproduce by e.g.:
/usr/local/bin/duplicity --tempdir /tmp --asynchronous-upload cleanup --force --extra-clean onedrive://backup-lucius -v9

Thanks!
Charlie

Environment:
duplicity 0.7.18.2
Python 2.7.12
Ubuntu 16.04.5 LTS
Type of Target Filesystem: onedrive
Using archive dir: /root/.cache/duplicity/e1aea527753c16ab1c297dd8ec2b8925
Using backup name: e1aea527753c16ab1c297dd8ec2b8925
GPG binary is gpg, version 1.4.20
Import of duplicity.backends.acdclibackend Succeeded
Import of duplicity.backends.azurebackend Succeeded
Import of duplicity.backends.b2backend Succeeded
Import of duplicity.backends.botobackend Succeeded
Import of duplicity.backends.cfbackend Succeeded
Import of duplicity.backends.dpbxbackend Failed: No module named dropbox
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.giobackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.hubicbackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.lftpbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.mediafirebackend Succeeded
Import of duplicity.backends.megabackend Succeeded
Import of duplicity.backends.multibackend Succeeded
Import of duplicity.backends.ncftpbackend Succeeded
Import of duplicity.backends.onedrivebackend Succeeded
Import of duplicity.backends.par2backend Succeeded
Import of duplicity.backends.pydrivebackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.ssh_paramiko_backend Succeeded
Import of duplicity.backends.ssh_pexpect_backend Succeeded
Import of duplicity.backends.swiftbackend Succeeded
Import of duplicity.backends.sxbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.webdavbackend Succeeded
Using temporary directory /tmp/duplicity-zdHcUx-tempdir
Traceback (innermost last):
  File "/usr/local/bin/duplicity", line 1560, in <module>
    with_tempdir(main)
  File "/usr/local/bin/duplicity", line 1546, in with_tempdir
    fn()
  File "/usr/local/bin/duplicity", line 1385, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/local/lib/python2.7/dist-packages/duplicity/commandline.py", line 1127, in ProcessCommandLine
    globals.backend = backend.get_backend(args[0])
  File "/usr/local/lib/python2.7/dist-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/local/lib/python2.7/dist-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/usr/local/lib/python2.7/dist-packages/duplicity/backends/onedrivebackend.py", line 91, in __init__
    self.resolve_directory()
  File "/usr/local/lib/python2.7/dist-packages/duplicity/backends/onedrivebackend.py", line 189, in resolve_directory
    files = self.get_files(object_id)
  File "/usr/local/lib/python2.7/dist-packages/duplicity/backends/onedrivebackend.py", line 218, in get_files
    response.raise_for_status()
  File "/usr/lib/python2.7/dist-packages/requests/models.py", line 937, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
 HTTPError: 410 Client Error: Gone for url: https://apis.live.net/v5.0/me/skydrive/files

Rafael (rafael-pletzer) wrote :

I have the same problem here, when I try to backup on onedrive. The last successful run was on 1/8/2019 since then I get the same error: "HTTPError: 410 Client Error: Gone for url: https://apis.live.net/v5.0/me/skydrive/files"

System:
duplicity 0.7.11
Operating System: Debian GNU/Linux 9 (stretch)
            Kernel: Linux 4.18.5-xen
      Architecture: x86-64

Enno L (ennol) wrote :

I can confirm this with duplicity 0.7.18.2. Logs indicate last successful run was 1/8/2019.
Please let me know how I can help solving this issue.

Python version is:
Python 2.7.15 (default, May 26 2018, 01:11:09)
[GCC 4.2.1 Compatible FreeBSD Clang 4.0.0 (tags/RELEASE_400/final 297347)] on freebsd11
Type "help", "copyright", "credits" or "license" for more information.

System:
FreeBSD BSDServer 11.2-RELEASE

Traceback (innermost last):
  File "/usr/local/bin/duplicity", line 1560, in <module>
    with_tempdir(main)
  File "/usr/local/bin/duplicity", line 1546, in with_tempdir
    fn()
  File "/usr/local/bin/duplicity", line 1385, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/local/lib/python2.7/site-packages/duplicity/commandline.py", line 1135, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/local/lib/python2.7/site-packages/duplicity/commandline.py", line 1010, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/local/lib/python2.7/site-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/local/lib/python2.7/site-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/usr/local/lib/python2.7/site-packages/duplicity/backends/onedrivebackend.py", line 91, in __init__
    self.resolve_directory()
  File "/usr/local/lib/python2.7/site-packages/duplicity/backends/onedrivebackend.py", line 189, in resolve_directory
    files = self.get_files(object_id)
  File "/usr/local/lib/python2.7/site-packages/duplicity/backends/onedrivebackend.py", line 218, in get_files
    response.raise_for_status()
  File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
 HTTPError: 410 Client Error: Gone for url: https://apis.live.net/v5.0/me/skydrive/files

rtfm_07 (rtfm07) wrote :
no longer affects: ubuntu

@rtfm_07 -- You marked that as no longer affecting Ubuntu. Has it already been fixed there?

NOTE: Should use https://github.com/OneDrive/onedrive-sdk-python since it's an MS supported SDK.

rtfm_07 (rtfm07) wrote :

@Kenneth Loafman,

all version are affected by this problem.

Changed in duplicity:
assignee: nobody → Kenneth Loafman (kenneth-loafman)
importance: Undecided → High
milestone: none → 0.7.19
status: New → In Progress

Fix committed in rev 1356

Changed in duplicity:
milestone: 0.7.19 → 0.8.00
status: In Progress → Fix Committed
Changed in duplicity:
assignee: Kenneth Loafman (kenneth-loafman) → nobody
Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers