Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropbox API v1 deprecated #142

Closed
dennissiemensma opened this issue Jun 30, 2016 · 6 comments
Closed

Dropbox API v1 deprecated #142

dennissiemensma opened this issue Jun 30, 2016 · 6 comments
Assignees
Milestone

Comments

@dennissiemensma
Copy link
Member

On June 28, 2017, API v1 will be turned off.

Please sign in to the Dropbox Platform website by September 28, 2016, and acknowledge that you’re aware of the deprecation.

To keep providing Dropbox features in your app, upgrade to API v2.

https://blogs.dropbox.com/developers/2016/04/announcing-the-v1-to-v2-migration-guide/

@dennissiemensma dennissiemensma added this to the 1.4 milestone Jun 30, 2016
dennissiemensma added a commit that referenced this issue Aug 22, 2016
@dennissiemensma dennissiemensma self-assigned this Aug 22, 2016
@dennissiemensma
Copy link
Member Author

Merged to development. Will run it on own production for a while to be sure.

@dennissiemensma
Copy link
Member Author

It seems that uploading does not work well on my own production. Which is weird, since I cannot reproduce it (yet) locally.

I'll have to look into this again.

@dennissiemensma
Copy link
Member Author

I've found another implementation which seem to work locally, it's slightly differs from my own: https://stackoverflow.com/documentation/dropbox-api/409/uploading-a-file/1927/uploading-a-file-using-the-dropbox-python-sdk#t=201610181733061624381

It also checks whether the files should be uploaded at one go (when small) or in chunks (when spanning multile MB's).

My previous implementation however also worked well locally when developing, so I'll have to test this on my own production later this week to be sure it's fixed completely.

@dennissiemensma
Copy link
Member Author

It still does not work on my own production. For some reason this Dropbox v2 API issue keeps haunting me :]

dennissiemensma added a commit that referenced this issue Nov 9, 2016
dennissiemensma added a commit that referenced this issue Nov 9, 2016
dennissiemensma added a commit that referenced this issue Nov 9, 2016
dennissiemensma added a commit that referenced this issue Nov 9, 2016
dennissiemensma added a commit that referenced this issue Nov 9, 2016
dennissiemensma added a commit that referenced this issue Nov 9, 2016
@dennissiemensma
Copy link
Member Author

I finally got Sentry working as well, which gave me some valuable information:

ApiError: ApiError('xxxxxxxxxxxxx', UploadSessionFinishError('path', WriteError('conflict', WriteConflictError('file', None))))

The WriteConflictError triggered me to recheck the existing-file-policy for Dropbox, which you can alter for each command. The old v1 API command had something similar as well.
However, for v2 I seemed to have used autorename=False, which only prevents autorenaming, but not resolving conflicts for existing files. And since daily backups are rotated and overwritten each week, this happens daily.
After having a peek inside the Dropbox v2 client, I saw another parameter called mode, besides autorename. In the end it seems to accept some union or struct of enum of whatever to say Dropbox what policy to use.
So now I simply removed the autorename directive and replaced it by mode=dropbox.files.WriteMode.overwrite. Just a few minutes after deploying this I already saw incoming dropbox notifications about changed files!

I'll monitor it for a few days, but I'm really glad this finally seems fixed.

dennissiemensma added a commit that referenced this issue Nov 9, 2016
@dennissiemensma
Copy link
Member Author

Confirmed, finally working on production! Merged once again back to development branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant