Try ERPNext Buy Support Partners Foundation

Dropbox Integration issue (redirect Error) - using Docker image

I am using docker image and I am having issues with dropbox integration.
I found a solution on forum but I am unsure where to run the bench command.

`

bench set-url-root example.com https://example.com

ERPNext: v12.10.1 (version-12)
Frappe Framework: v12.8.4 (version-12)

Error is
Invalid redirect_uri. When response_type=code, only localhost URIs can start with “http://”; all others must start with “https://”

1 Like

add key "host_name" to site_config.json

refer https://github.com/frappe/frappe_docker/blob/develop/docs/site-operations.md#edit-configs

Thanks or your response
I have added “hostname”:“foo.com” to sites/foo.com/site_config.json and restarted the dockers but still dropbox gives the same error.
I have used redirect uri as below

https://foo.com/api/method/frappe.integrations.doctype.dropbox_settings.dropbox_settings.dropbox_auth_finish

but it shows the url without http’s and gives error

I have tried to typein the missing S in the url and it moves ahead for authtication finally I get this error

requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.dropboxapi.com/oauth2/token

Check the field.

host_name

Reference in code: https://github.com/frappe/bench/blob/develop/bench/config/site_config.py#L45

Now a new Error

Error message: No Access Token exists!
I edited site_config.json it using to add the dropbox _access_key and dropbox_secret_key
docker run
-it
-v foo_sites-vol:/sites
alpine vi /sites/foo.com/site_config.json

By Config File is as below

{
“db_name”: “Something”,
“db_password”: “Something”,
“db_type”: “mariadb”,
“encryption_key”: “-Lies In Between-j-EjEeI=A8”,
“host_name”:“foo.com”,
“dropbox_access_key”:“app_KeyFrom DropBox”,
“dropbox_secret_key”:“Top Secret From DropBox”

}

After editing I ran the following command

  • docker stop $(docker ps -a -q)
  • docker-compose --project-name foo up -d

I’m not using dropbox. I won’t be able to debug that.

I use S3 compatible storage for backups, that is part of docker tests that run everyday. It starts a MinIO container to emulate S3 and run backup restore from there.

“host_name” should include https://

I am also facing the same problem. Anybody able to solve this in docker deployments?