After migration: Dropbox Encryption key is invalid

Can anyone please try verify that they can get Dropbox working on a fresh install of ERPNext (i.e. latest version)? I really want it to work, and have tried everything I can think of and find on the forums. But I cannot get it to work! Thanks in advance.

Okay, so I got it working (finally!). I wanted to post here what I had to do. It was a combination of things learned from various forum posts - so thank you all.

Ultimately, it boiled down to an error in my generated access token. I didn’t copy and paste it due to the way I was using VirtualBox. In manually typing it, I thought an “I” (India) was a lower case “l” (“Lima”). Oops. So here’s the steps that it looks like were needed to make it work. I can’t say for sure that all of these were required as I didn’t try every combination. But the bench console step was the one that finally make it work, so I know that one is necessary.

  1. Fill out the information on the “Dropbox Settings” page in ERPNext. BTW, the “App access key” is called the “App key” on the Dropbox page (Login - Dropbox).
  2. Add the dropbox_access_key and dropbox_secret_key to the site_config.json file. Watch carefully that you have the quotation marks in the right place and commas. If not, you’ll get an “Internal Server Error” in ERPNext. Good example of how to do this in this forum post: [v12] Problems in using Dropbox backup - #16 by Ryan_Bohm
  3. Run the bench console as described in the post above in this thread. Make sure the generated access token is correct.

When I try to do the “Allow Dropbox Access” on the Dropbox Settings page, it gives me a 400 error. But this step is apparently not necessary when the above steps are performed.

Good resources or just posts about the same/similar issues:

https://docs.erpnext.com/docs/user/manual/en/erpnext_integration/dropbox-backup

2 Likes

Thank you… This solution worked well with me for Google drive where i was getting the same error of “Invalid encryption key”. I had to delete both google drive and google settings

I just had this problem again with email account after transfering to a new server. One thing that is weird is that you can’t delete a email account when this key is invalid and can’t add a new email account.

The solution is to manually go in the database (I’m using SQLWorkbench), go to tabEmailAccount and delete the user account manually.

Then you can go back in erpnext and add a new user account and it will work.