Access forbidden invalid request nextcloud android

Android 1.0.14/Talk 3.1.0 — cannot log in: Error Access Forbidden Invalid request #669

Comments

StuartJMackintosh commented Feb 17, 2018

Steps to reproduce

  1. Open Nextcloud Talk on Android device
  2. Enter server address
  3. When presented with ‘You are about to grant access to your nextcloud account: Select ‘Grant access’
  4. Enter username / password and press log in
  5. Presented with:
    Error
    Access Forbidden
    Invalid request
  • This is an existing and working Nextcloud but new install of the Talk app on the phone.
  • I have not tried issuing a token manually

Expected behaviour

I would expect to log in.

Actual behaviour

I receive the error:
Error
Access Forbidden
Invalid request

Spreed app

**Spreed app version: Talk 3.1.0

**Custom TURN server configured: No

**Custom STUN server configured: stun.nextcloud.com:443

Server configuration detail

Operating system: Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64

Webserver: Apache/2.4.10 (Debian) (apache2handler)

Database: sqlite3 3.15.1

PHP version: 7.1.14
Modules loaded: Core, date, libxml, openssl, pcre, sqlite3, zlib, ctype, curl, dom, fileinfo, filter, ftp, hash, iconv, json, mbstring, SPL, PDO, session, posix, Reflection, standard, SimpleXML, pdo_sqlite, Phar, tokenizer, xml, xmlreader, xmlwriter, mysqlnd, apache2handler, apcu, exif, gd, intl, ldap, mcrypt, memcached, mysqli, pcntl, pdo_mysql, pdo_pgsql, pgsql, redis, zip, Zend OPcache

Nextcloud version: 13.0.0 — 13.0.0.14

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: Docker

List of activated apps

Are you using external storage, if yes which one: local/smb/sftp/.

Are you using encryption: no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/.

Client configuration

Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0

Operating system:

The text was updated successfully, but these errors were encountered:

Источник

Errors logging in via Android client (Access Forbidden — Invalid request) #8956

Comments

jose1711 commented Mar 22, 2018

Steps to reproduce

  1. Use Android client to login to Nextcloud instance
  2. Enter valid username + login

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)

Читайте также:  4pda виртуальная машина android

Client configuration

Official Android Nextcloud app

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:

fabian727 commented Mar 23, 2018 •

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:
if I login with my admin account -> settings -> administration -> security, the table for oauth2 clients is empty. Could this have something to do with our problem?

xduseko commented Mar 25, 2018

Same problem here using docker image nextcloud:13

danb35 commented Mar 26, 2018

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:

MorrisJobke commented Jul 4, 2018

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.

jose1711 commented Dec 14, 2018

brucealthompson commented Jan 4, 2020

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?

kesselb commented Jan 4, 2020

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 overwritehost and overwriteprotcol if the proxy is trusted and is forwarding the right headers. I’m not sure if this will work for your setup. Probably the people at help.nextcloud.com know.

brucealthompson commented Jan 5, 2020

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.

I did not create this thread. I was simply responding to the comment from jose1711.

Читайте также:  Nfc не поддерживает android pay

In fact, I believe there is a bug in Nextcloud that was never resolved in this thread. I will explain below.

It’s possible to use a reverse proxy without overwritehost and overwriteprotcol if the proxy is trusted and is forwarding the right headers.

I believe you are partially correct in this statement. I have almost everything working without the overwritehost and overwriteprotcol variables declared. The only thing that does not work is the «Grant Access» screen of the Nextcloud apps. This is the original issue described on this thread.

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 overwritehost and overwriteprotcol variables to get around this issue.

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??

Источник

[Nextcloud 15] Nextcloud clients cannot log in after upgrading from 15.0.0 to 15.0.2 #13591

Comments

phish108 commented Jan 14, 2019 •

Confirmed clients to fail:

Official Desktop Client:

  • Nextcloud for MacOS 2.5.1
  • Nextcloud for Windows 2.5.1
  • Nextcloud fo iOS 2.22..7.8 (On Grant Access reports Error: Access Forbidden, Invalid Request)
  • Nextcloud Android 3.4.1 (On Grant Access reports Error: Access Forbidden, Invalid Request)

Unaffected

Steps to reproduce

  1. Install NC 15.0.0
  2. Install NC client 2.5.1
  3. authenticate and sync (works nice and smooth)
  4. upgrade to NC 15.0.2
  5. log client out (or reinstall client)
  6. login with client
  7. authenticate via password
  8. grant access (return to landing page, return to step 6 — on mobiles, stuck at error page).
  9. authenticate via token
  10. grant access (return to landing page/step 9 — on mobiles, stuck at error page).

only on mobile clients
11. return to old method
12. enter credentials
13. return to landing screen for new accounts.

Web Login works as usual.

Expected behaviour

Client authenticates and synchronizes the user data

Actual behaviour

User is stuck on the client’s authentication screen.

Server configuration

Operating system:

alpine linux (official docker container 15-fpm-alpine)

Web server:
NGINX

Database:
MariaDB

PHP version:
7.2.14

Nextcloud version: (see Nextcloud admin page)

Updated from an older Nextcloud/ownCloud or fresh install:

15.0.0 and fresh install

Where did you install Nextcloud from:

Signing status:

List of activated apps:

Nextcloud configuration:

Are you using external storage, if yes which one: local/smb/sftp/.
No (local)

Are you using encryption: yes/no
No (apart from HTTPS)

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/.
LDAP

LDAP configuration (delete this part if not used)

Client configuration

Browser:
NC Client 2.5.1 (Mozilla/5.0 (Macintosh) mirall/2.5.1final (build 20181204) (Nextcloud)

Operating system:
Mac OS 10.14.2

Web server error log

Nextcloud log (data/nextcloud.log)

The nextcloud log keeps returning these blocks from the nextcloud client.

Browser log

Under settings/logging I see this line repeating over and over.

Читайте также:  Lucky patcher андроид не устанавливается

The text was updated successfully, but these errors were encountered:

Источник

Nextcloud client cannot connect to the nextcloud server. Access forbidden State token does not match #1682

Comments

xavi12p commented Dec 16, 2019 •

Expected behaviour

Nextcloud client, as part of the initial configuration process, should connect to the nextcloud server and authenticate the input credentials

Actual behaviour

In the nextcloud client, after introducing the nextcloud url server, and the user & password, an error message is shown in the web browser with the error: Access forbidden. State token does not match

Steps to reproduce

  1. install nextcloud through snap in Host A (Raspberry pi with Ubuntu Server 19.10)
  2. run the manual installation with the command: nextcloud.manual-install user passwd
  3. add a trusted domain: the hostname of the Host A
  4. From Host B, through a web brower, access http://hostnameA
  5. It works. You can navigate through the webconsole of nextcloud
  6. Download and install nextcloud client for ubuntu and run it
  7. Input the server location: http://hostnameA and click Next
  8. A web browser is opened asking to connect your account. Input your credentials
  9. An error page is shown: «Access forbidden. State token does not match»

Client configuration

Client version: 2.6/

Operating system:
Ubuntu 18 LTS

OS language: Spanish

Qt version used by client package (Linux only, see also Settings dialog):

Client package (From Nextcloud or distro) (Linux only):
From Nexcloud

Installation path of client:
/usr/bin/nextcloud

Server configuration

Nextcloud version: 16.0.5
Operating System of the Nextcloud server: Ubuntu 19.10 for raspberry pi 4

Storage backend (external storage):
No

Please use Gist (https://gist.github.com/) or a similar code paster for longer
logs.

Client logfile:
[OCC::Application::setupLogging «################## Nextcloud locale:[es_ES] ui_lang:[] version:[2.6.1git] os:[Ubuntu 18.04.3 LTS]»
[OCC::Application::setupTranslations Using «es_ES» translation
[OCC::SocketApi::SocketApi server started, listening at «/run/user/1000/Nextcloud/socket»
[OCC::FolderMan::FolderMan setting remote poll timer interval to 5000 msec
[OCC::ownCloudGui::setupContextMenu Tray menu workarounds: noabouttoshow: false fakedoubleclick: false showhide: false manualvisibility: false
[OCC::FolderMan::setupFoldersMigration Setup folders from «/home/xavi/.config/Nextcloud/folders» (migration)
[OCC::ClientProxy::setupQtProxyFromConfig Set proxy configuration to use the prefered system proxy for http tcp connections
[OCC::ownCloudGui::slotOpenSettingsDialog No configured folders yet, starting setup wizard
[OCC::WebViewPage::WebViewPage Time for a webview!
[OCC::OCUpdater::backgroundCheckForUpdate Checking for available update
[OCC::AccessManager::createRequest 2 «» «https://updates.nextcloud.org/client/?client=RGlzdHJpYnV0b3IgSUQ6CVVidW50dQpEZXNjcmlwdGlvbjoJVWJ1bnR1IDE4LjA0LjMgTFRTClJlbGVhc2U6CTE4LjA0CkNvZGVuYW1lOgliaW9uaWMK&version=2.6.1.0&platform=linux&oem=Nextcloud&versionsuffix=git» has X-Request-ID «d9eabee0-60fd-4f3c-980c-eee9023d7a4a»
[OCC::PassiveUpdateNotifier::versionInfoArrived Client is on latest version!
[OCC::OwncloudSetupWizard::slotSystemProxyLookupDone No system proxy set by OS
[OCC::AccessManager::createRequest 2 «» «http://aragorn/status.php» has X-Request-ID «2e5ebdbf-78e6-4c3d-a99a-30ab8b25f26e»
[OCC::AbstractNetworkJob::start OCC::CheckServerJob created for «http://aragorn» + «status.php» «OCC::OwncloudSetupWizard»
[OCC::CheckServerJob::finished status.php returns: QJsonDocument(<"edition":"","installed":true,"maintenance":false,"needsDbUpgrade":false,"productname":"Nextcloud","version":"16.0.5.1","versionstring":"16.0.5">) QNetworkReply::NetworkError(NoError) Reply: QNetworkReplyHttpImpl(0x5593844d51c0)
[OCC::DetermineAuthTypeJob::start Determining auth type for QUrl(«http://aragorn/remote.php/webdav/»)
[OCC::AccessManager::createRequest 2 «» «http://aragorn/remote.php/webdav/» has X-Request-ID «3b3fc7c3-c320-4061-a452-f4d105ad27c4»
[OCC::AbstractNetworkJob::start OCC::SimpleNetworkJob created for «http://aragorn» + «» «OCC::Account»
[OCC::AccessManager::createRequest 6 «PROPFIND» «http://aragorn/remote.php/webdav/» has X-Request-ID «2fd91598-eeba-4c4d-85f7-40779edbd74d»
[OCC::AbstractNetworkJob::start OCC::SimpleNetworkJob created for «http://aragorn» + «» «OCC::Account»
[OCC::DetermineAuthTypeJob::checkBothDone Auth type for QUrl(«http://aragorn/remote.php/webdav/») is 4
[OCC::AccessManager::createRequest 4 «» «http://aragorn/index.php/login/v2» has X-Request-ID «77448844-6a83-439d-bfc1-e40045739723»
[OCC::AbstractNetworkJob::start OCC::SimpleNetworkJob created for «http://aragorn» + «» «OCC::Account»
[OCC::Flow2Auth::openBrowser():: beforeController( OC\Core\Contr . <>, «grantPage» ) 2. lib/private/AppFramework/App.php line 126 OC\AppFramework\Http\Dispatcher->dispatch( OC\Core\Controller\ClientFlowLoginV2C . <>, «grantPage» ) 3. . /AppFramework/Routing/RouteActionHandler.php line 47 OC\AppFramework\App::main( «OC\\Core\\Controller\\ClientFlowLoginV2Controller», «grantPage», OC\AppFramework\DependencyInjection\DIContainer <>, <> ) 4. > OC\AppFramework\Routing\RouteActionHandler->__invoke(<>) 5. lib/private/Route/Router.php line 297 call_user_func(OC\AppFramework\Routing\RouteActionHandler <>, <>) 6. lib/base.php line 975 OC\Route\Router->match(«\/login\/v2\/grant») 7. index.php line 42 OC::handleRequest() «>

Debug PHP implode(): Invalid arguments passed at 2019-12-16T17:37:43+00:00
/snap/nextcloud/16741/htdocs/apps/logreader/lib/Log/Formatter.php#93

Debug PHP Array to string conversion at 2019-12-16T17:37:43+00:00
/snap/nextcloud/16741/htdocs/apps/logreader/lib/Log/Formatter.php#93

Debug PHP Undefined index: type at 2019-12-16T17:37:43+00:00
/snap/nextcloud/16741/htdocs/apps/logreader/lib/Log/Formatter.php#52

Debug PHP Undefined index: class at 2019-12-16T17:37:43+00:00
/snap/nextcloud/16741/htdocs/apps/logreader/lib/Log/Formatter.php#52

Debug PHP implode(): Invalid arguments passed at 2019-12-16T17:37:43+00:00
/snap/nextcloud/16741/htdocs/apps/logreader/lib/Log/Formatter.php#93

Debug PHP Array to string conversion at 2019-12-16T17:37:43+00:00
/snap/nextcloud/16741/htdocs/apps/logreader/lib/Log/Formatter.php#93

Debug PHP implode(): Invalid arguments passed at 2019-12-16T17:37:43+00:00
/snap/nextcloud/16741/htdocs/apps/logreader/lib/Log/Formatter.php#93

Debug PHP Array to string conversion at 2019-12-16T17:37:43+00:00
/snap/nextcloud/16741/htdocs/apps/logreader/lib/Log/Formatter.php#93

The text was updated successfully, but these errors were encountered:

Источник

Оцените статью