Cannot grant access

I have the same setup, and I’m having the same problem. If this is an nginx configuration error, does anyone have a suggestion as to what I need to change?

I got the same issue. Grant access button is not working. Only android client can connect. iOS win and linux all can not connect. Chrome console says that

Refused to send form data to ‘’ because it violates the following Content Security Policy directive: “form-action ‘self’”.

1 Like

I have the same issue. On a company provided macbook on which I am not allowed to modify networking/proxy configuration, I’m completely blocked for the installation of the nextcloud client due to this.
IMHO this is a bug in the client, because there’s simply nothing happening when you press the button, no error message, nothing.

i 've got the same problem!
last time i used an older client to login but that doesn’t work anymore


grant access is doing nothing


server: 17.0.2
client: 2.6

i am using nextcloud as docker with letsencrypt companion docker and nginx reverse proxy docker

‘overwriteprotocol’ => ‘https’ does not help

please help us!

1 Like

Hello All,

to solve this issue you need to add ‘overwriteprotocol’ => ‘https’ in config/config.php in nextcloud, I tested and solving the issue, here the explaination

/**

  • When generating URLs, Nextcloud attempts to detect whether the server is
  • accessed via https or http. However, if Nextcloud is behind a proxy
  • and the proxy handles the https calls, Nextcloud would not know that
  • ssl is in use, which would result in incorrect URLs being generated.
  • Valid values are http and https.
    */
    ‘overwriteprotocol’ => ‘’,
5 Likes

EDIT: Installed the 18.0.0.3 docker and added:
‘overwriteprotocol’ => ‘https’,
Which indeed did work!

I have the same problem:

Behind an Nginx reverse proxy; and no app works. When adding overwriteprotocol https nothing works anymore. which is logical I gues because: nextcloud -> nginx is http


Any solution to this?

[edit] Strangely: it did work before installing two factor authentication
 but now after uninstalling it; it still doesn’t work. [/edit]

1 Like

I’m running nextcloud in docker containers and finally got this too work.

Upgraded to 18.01 and then added following to config/config.php

‘overwriteprotocol’ => ‘https’,

1 Like

'overwriteprotocol' => 'https' does not work when Nextcloud is running behind a reverse proxy. The system returns:

Content Security Policy: The page’s settings blocked the loading of a resource
at http://wherever.com (“form-action”).

Editing the trusted domains and trusted proxies settings in config.php does not work, either.

Still waiting for a solution on this one.

I still have the same problem here with nextcloud in docker behind a traefik2 in docker.
There really is a error message missing.
I will try to add 'overwriteprotocol’ => ‘https’ to my docker-compose file - i’ll report if that helps.

yeah - that worked but how to Integrate this into a docker-compose file

Big trouble whith the “grant acces” procedure from the 2.5.XX version of th client on Debian Buster.
Adding the PPA won’t work since the last version will only be available for xenial distros.
had to compile from source the 2.7.xx with no difficulty at all.
Work’s very well !
Please publish some adapted ppa :wink:

1 Like

I’m having the same issue and overwrite and trusted configs do not work. In a desktop browser I have to refresh the the tab to login as I get the ‘Content Security Policy’ error messge. In the iOS app I’m stuck on the grant access screen as it does not redirect.

Just wanted to say thanks - this solved my ios issues. Just completed installing via k8s and I was oh no why isn’t this working. excellent forum thanks y’all :grinning:

Editing a config.php file is not possible on my docker servers, everything is stateless regarding nextcloud itself.
I tried using the documented environment variable “OVERWRITEPROTOCOL” (set to https) but with no difference.

Currently, a possible workaround to the “cannot grant access” problem is to use the OwnCloud desktop client.

problem with Docker you may check here https://github.com/nextcloud/android/issues/4786

Thank you!
I have the same problem with docker.
Just add
‘overwriteprotocol’ => ‘https’,
to config.php and everything is fine !
Thank a lot all you people! )

But I was need to reinstall nextcloud client at all my devices (win10, macos, android)

4 Likes

hi

sorry to jump on to this thread but i am having the same issue here , not sure if im going to the right place to edit config.php ( im fairly new to all this )

but the one i have found within the nectcloud app docker container at /var/www/html/data/config.php
doesnt look like the one at the following address

Worked for me, thanks!

Hi all,
I’m running Nextcloud in a FreeNAS jail and am having trouble getting my clients to access the server via my public facing domain. Through a web browser off of my network I can access my server just fine so I know it’s up and running. It is behind an Nginx reverse-proxy.
Editing config.php file in /usr/local/www/nextcloud/config to add ‘overwriteprotocol’ => ‘https’ does not work for me for allowing the android client to access my nextcloud server off of my LAN.

Does anyone have a solution for this? It doesn’t seem like it should be a complicated issue especially in this case where I know the server is accessible publicly in the first place.

I also had this problem, on only one of my machines not the other one (but both run Debian 10 and version 2.5.x from the PPA).

Nextcloud server is installed without a proxy and ‘overwritehost’ => ‘https’ did not fix the issue as that only fixes it when it’s behind a proxy (like with Docker deployments).

it definitely seems like a bug in the version 2.5 Nextcloud desktop for Debian 10 Buster, possibly more systems. The symptoms are the same: it loops around between the login screen and the grant access screen, never getting logged back in. It used to work until one day it broke. It doesn’t break every time (my desktop and laptop both run same versions of linux and are hooked up to same 4 nextcloud servers, it only broke on one machine on one server).

To make my account sync again, I built myself version 2.6 from the Git 2.6-stable branch, and that worked well but it took me some time to get it to work. I had a linker/library version conflict with the old libnextcloudsync that was installed from the packages. once I removed libnextcloudsync* and nextcloud* , I then had a missing libnextcloudsync.so error. I had to add my /home/me/nextcloud-desktop-client/lib/x86_64-linux-gnu/ to /etc/ld.so.conf and then “ldconfig -v | grep libnextcloudsync” to confirm it was seen by the system.

Finally after all that, i was able to run bin/nextcloud and immediately I was able to reconnect the one failed account in the settings. It didn’t prompt me for password at all (I was already logged in) and let me press Grant access and then everything started syncing again.

So that worked but probably won’t be easy for any non-developers. For anyone else using Debian and having this login/grant access loop issue, your best bet is to probably just download the pre-built version 2.6, 2.7, or 3.x version of Nextcloud Desktop. Then make the downloaded .AppImage file executable and you should be able to then just run it (make sure the old one is quit first) and it will hopefully get you logged back in and working. If so uninstall the old one and use the newly downloaded AppImage one until the PPA’s get upgraded to 2.6/2.7.

As the bug is already fixed in the code, this isn’t really something to take up in Github, it will get fixed when the PPA’s for Debian ship version 2.6+