That encryption key error occurs after you do a restore of database to a new server.
If thats the case and you still have access to your previous server, go to that file site_config.json of your old server, you will see the encryption keys there. Copy them and paste them in the site_config.json of your new server
I’ll try.
What I dont understand is that everything else work. If it really was a encryption key error, I wouldnt be able to add new user and do stuff like that…
without the original encryption keys some functions might not work, backup being one of them.
what about email function, is it working? there isn’t really a list of what will work and what won’t. you just have to test the whole system see.
Thanks for your help.
Yes i’m sure the app access key is good and secret key too.
I did try to change the dropbox access token (this field is also accessible if you customize the doctype to unhide it).
Also tried with the bench console
The error I get after putting new access token is the same error: Encryption key is invalid, Please check site_config.json
I even created a new dropbox app and tried everything again and same error.
As a final resort, deleting Dropbox Settings and starting over should work.
(Yes, you can delete single DocTypes too.)
I have noticed that all issues crop up because the site name may have changed upon migration to another server. I guess the encryption key in site_config.json must be backed up too?
This worked for me. Had to run these commands in the console as the “allow dropbox access” button gives error 400. Other posts have said to customize the dropbox settings form so you can enter an Access token generated from dropbox, but the menu–>customize button has been removed in newer versions of erpnext (leaving no way to enter the access token).
So from a command line, entering “bench console”, then the above solution solved my dropbox setup issues.
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.
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).
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
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:
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.