Error with dropbox backend after upgrade to 0.7.0

Asked by mm

Hi!

After upgrading to 0.7.0 my dropbox backend seems to be broken. When I try to backup to dropbox duplicity states the following error:
Attempt 1 failed. ErrorResponse: [403] u"Invalid app key (consumer key). Check your app's configuration to make sure everything is correct."
Attempt 2 failed. ErrorResponse: [403] u"Invalid app key (consumer key). Check your app's configuration to make sure everything is correct."
Attempt 3 failed. ErrorResponse: [403] u"Invalid app key (consumer key). Check your app's configuration to make sure everything is correct."
Attempt 4 failed. ErrorResponse: [403] u"Invalid app key (consumer key). Check your app's configuration to make sure everything is correct."

Any way to fix this? I already tried reinstalling duplicity with no luck.
Btw.: I get another error message too Import of duplicity.backends.ftpsbackend Failed: the scheme ftps already has a backend associated with it. Backup to ftp server fails too.

Question information

Language:
English Edit question
Status:
Answered
For:
Duplicity Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
edso (ed.so) said :
#1

On 29.10.2014 14:31, cp wrote:
> New question #256351 on Duplicity:
> https://answers.launchpad.net/duplicity/+question/256351
>
> Hi!
>
> After upgrading to 0.7.0 my dropbox backend seems to be broken. When I try to backup to dropbox duplicity states the following error:
> Attempt 1 failed. ErrorResponse: [403] u"Invalid app key (consumer key). Check your app's configuration to make sure everything is correct."
> Attempt 2 failed. ErrorResponse: [403] u"Invalid app key (consumer key). Check your app's configuration to make sure everything is correct."
> Attempt 3 failed. ErrorResponse: [403] u"Invalid app key (consumer key). Check your app's configuration to make sure everything is correct."
> Attempt 4 failed. ErrorResponse: [403] u"Invalid app key (consumer key). Check your app's configuration to make sure everything is correct."

seems like the dropbox app key hardcoded into the backend became invalid.

try to create your own and add it manually to the backend python file.

> Any way to fix this? I already tried reinstalling duplicity with no luck.
> Btw.: I get another error message too Import of duplicity.backends.ftpsbackend Failed: the scheme ftps already has a backend associated with it. Backup to ftp server fails too.
>

probably a bug due to retiring ncftp backend. will have a look at that. for now if you need ftp, use 0.6.25

..ede/duply.net

Revision history for this message
edso (ed.so) said :
#2

On 29.10.2014 14:41, edso wrote:
> Question #256351 on Duplicity changed:
> https://answers.launchpad.net/duplicity/+question/256351
>
> Status: Open => Answered
>
> edso proposed the following answer:
> On 29.10.2014 14:31, cp wrote:
>> New question #256351 on Duplicity:
>> https://answers.launchpad.net/duplicity/+question/256351
>>
>> Hi!
>>
>> After upgrading to 0.7.0 my dropbox backend seems to be broken. When I try to backup to dropbox duplicity states the following error:
>> Attempt 1 failed. ErrorResponse: [403] u"Invalid app key (consumer key). Check your app's configuration to make sure everything is correct."
>> Attempt 2 failed. ErrorResponse: [403] u"Invalid app key (consumer key). Check your app's configuration to make sure everything is correct."
>> Attempt 3 failed. ErrorResponse: [403] u"Invalid app key (consumer key). Check your app's configuration to make sure everything is correct."
>> Attempt 4 failed. ErrorResponse: [403] u"Invalid app key (consumer key). Check your app's configuration to make sure everything is correct."
>
> seems like the dropbox app key hardcoded into the backend became
> invalid.
>
> try to create your own and add it manually to the backend python file.
>

see
https://www.dropbox.com/developers/apps/create

..ede/duply.net

Revision history for this message
mm (mtl-0) said :
#3

I added my own app keys to /usr/local/lib/python2.7/dist-packages/duplicity/backends/dpbxbackend.py but still get the same error.

Revision history for this message
mm (mtl-0) said :
#4

Ok, I installed 0.6.25 and extracted the app key which really got lost in 0.7.0. I put it in dpbxbackend.py and compiled it, and now it seems to be working again.
FTP error remains.

Revision history for this message
Bobrunning (bobrunning2004) said :
#5

FYI - I also upgraded from 0.7.0 and experienced the same error. I reverted back to 0.6.25 and that resolved the problem.

Robert

Revision history for this message
spidernik84 (alexander-rilik) said :
#6

Hello,

I was hesitant to post here since this might be a different issue. I'll be happy to create a new ticket if necessary.

Anyway, I get the same message but with a fresh setup:

dpbx Error: [403] u"Invalid app key (consumer key). Check your app's configuration to make sure everything is correct."

I added the APP_KEY and APP_SECRET verbatim in the "/usr/lib/python2.7/dist-packages/duplicity/backends/dpbxbackend.py" file. No success. As a note, the Dropbox application was created with "full dropbox access", still with the "development" status.

Some more info about my setup:
Ubuntu 12.04
duplicity 0.7.02-0ubuntu0ppa1080~ubuntu12.0

Thanks!

Revision history for this message
Jorman Franzini (jorman-franzini) said :
#7

Hi, same here, I reinstalled all, duplicity and backends but don't works

Revision history for this message
edso (ed.so) said :
#8

verbatim won't work. they have to be obfuscated, as stated above the entries in dpbxbackend.py .

as a workaround use the ones from 0.6
 http://bazaar.launchpad.net/~duplicity-team/duplicity/0.6-series/view/head:/duplicity/backends/dpbxbackend.py
or simply use 0.6.25 alltogether.

..ede/duply.net

Revision history for this message
spidernik84 (alexander-rilik) said :
#9

Thanks edso!
My bad, I read the comment in the code. I misinterpreted it as "when promoting your dropbox app to -production- you need to obfuscate them, but they can be used in clear when in development mode".
I wonder: Is there a script that can be used to hash/obfuscate them in any way?

Revision history for this message
edso (ed.so) said :
#10

On 30.03.2015 22:06, spidernik84 wrote:
> Question #256351 on Duplicity changed:
> https://answers.launchpad.net/duplicity/+question/256351
>
> spidernik84 proposed the following answer:
> Thanks edso!
> My bad, I read the comment in the code. I misinterpreted it as "when promoting your dropbox app to -production- you need to obfuscate them, but they can be used in clear when in development mode".
> I wonder: Is there a script that can be used to hash/obfuscate them in any way?
>

try the original author.. address is in the python file's header. alternatively you can patch the backend to simply not use etacsufbo() and enter your key as plain text.

this guy had the same issue
 https://answers.launchpad.net/duplicity/+question/255740

..ede/duply.net

Revision history for this message
Daniel Lo Nigro (daniel15) said :
#11

It looks like this commit removed the default key: http://bazaar.launchpad.net/~duplicity-team/duplicity/0.7-series/revision/1003#duplicity/backends/dpbxbackend.py. It's not apparent whether that was intentional or not.

etacsufbo is "obfuscate" backwards, and the obfuscation of the key and secret appears to be a simple letter swap - Every letter is swapped with the one directly after it (so "helloworld" becomes "ehllworodl").

Revision history for this message
edso (ed.so) said :
#12

the latest agreed upon solution w/ the duplicity maintainer is

1. remove obfuscation code & hardcoded key
2. interpret env vars like eg. s3 and add documentation to the manpage

this way each user can generate/use their own api key w/o source hacking

nobody came around to implement it so far so patches/branches will be appreciated!

..ede/duply.net

Can you help with this problem?

Provide an answer of your own, or ask mm for more information if necessary.

To post a message you must log in.