-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Errors logging in via Android client (Access Forbidden - Invalid request) #8956
Comments
I have the same problem, but with all clients, like android-client, ubuntu-client, thunderbird for calendar and contacts (also on android) My setup is apache2 with php-fpm, mariadb on a raspberry3 with raspbian stretch. The only same in my setup is nextcloud-13.0.1 Login with browser works as expected from computer and android AddOn: |
Same problem here using docker image nextcloud:13 |
I was having a similar problem, but at least my version was tied to using PHP-FPM and mpm_event in Apache. Adding the lines below to the relevant virtualhost fixed it for me:
|
This looks like the auth headers are stripped out of the request. So make sure that they are properly forwarded. |
following this example resolved the issue for me (nginx used as a reverse proxy): https://docs.nextcloud.com/server/11/admin_manual/configuration_server/reverse_proxy_configuration.html#example |
Unfortunately, this example uses the config variables "overwritehost" and "overwriteprotocol". These variables perform brute force redirects to the host / protocol defined in the variables. This means that all accesses to the Nextcloud instance will be redirected to whatever host / protocol is listed in these variables. I have a Nextcloud instance running in my local network. I don't want requests to the nextcloud instance from client in my local network to be redirected to the proxy. Without the "overwritehost" and "overwriteprotocol" variables, requests to the local IP of the Nextcloud instance (I use mdns for local hosts) work just fine for local nodes. With the "overwritehost" and "overwriteprotocol" variables, requests to the local IP of the Nextcloud instance are redirected out of the local network to a proxy I have set up in the cloud. The result is that uploads and downloads from clients in the local network are as slow as remote access. The"overwritehost" and "overwriteprotocol" variables do solve the problem described in this post. Unfortunately, they have the side effect I I described above. Is there any way to get a both local and remote access through a reverse proxy to work with Nextcloud? |
This is the issue tracker of Nextcloud, please do NOT use this to get answers to your questions or get help for fixing your installation. This is a place to report bugs to developers, after your server has been debugged. You can find help debugging your system on our home user forums: https://help.nextcloud.com or, if you use Nextcloud in a large organization, ask our engineers on https://portal.nextcloud.com. See also https://nextcloud.com/support for support options. It's possible to use a reverse proxy without |
I did not create this thread. I was simply responding to the comment from jose1711. In fact, I believe there is a bug in Nextcloud that was never resolved in this thread. I will explain below.
I believe you are partially correct in this statement. I have almost everything working without the I believe there is a bug in Nextcloud redirection associated with the webdav calls used in the "Grant Access" screen of the Nextcloud apps. The workaround that is described in the Nextcloud documentation is to use the I would be happy to debug this issue myself if I could get the Nextcloud apps to work with phpStorm. I there a way to get get the Nextcloud apps to work with an xDebug style browser plugin?? |
I think you can configure xdebug to connect with every request to a fixed remote: https://xdebug.org/docs/all_settings#remote_enable / https://xdebug.org/docs/all_settings#remote_host |
kesselb: Your links led me to the solution for enabling xdebug unconditionally. I set this variable to enable xdebug connections unconditionally: And now I have gotten to the bottom of my issue. I needed to have 127.0.0.1 as one of the values in trusted_proxies in config.php. Here is the config works for me: With this and the correct reverse proxy configuration, everything works without the overwritehost and overwriteprotcol variables. |
Steps to reproduce
Expected behaviour
Successfull login event
Actual behaviour
Error
Access Forbidden
Invalid request
Server configuration
Operating system: Alpine linux
Web server: nginx
Database: mariadb
PHP version: php5-5.6.34-r0
Nextcloud version: nextcloud-13.0.1-r0
Updated from an older Nextcloud/ownCloud or fresh install: update
Where did you install Nextcloud from: official repository (edge)
Client configuration
Official Android Nextcloud app
Logs
Web server error log
Web server error log
I suspect rewrite rules but I followed a recommended way to deploy Nextcloud server so do not really know what could be wrong. Any hint is greatly welcome.
The text was updated successfully, but these errors were encountered: