Skip to content
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

Nextcloud 14 redirect loop on login #11149

Closed
Quintasan opened this issue Sep 10, 2018 · 17 comments
Closed

Nextcloud 14 redirect loop on login #11149

Quintasan opened this issue Sep 10, 2018 · 17 comments
Labels

Comments

@Quintasan
Copy link

Quintasan commented Sep 10, 2018

Steps to reproduce

  1. Go to https://cloud.frelia.org
  2. Try logging in
  3. Get redirected back to login form with no error

Expected behaviour

I should be logged in and see my files

Actual behaviour

I'm constantly getting redirected back to the login form with no error

Server configuration

Operating system: Ubuntu 16.04.5 LTS

Web server: nginx/1.15.3

Database: psql (PostgreSQL) 9.5.14

PHP version: PHP 7.0.30-0ubuntu0.16.04.1

Nextcloud version: 14.0.0.19

Updated from an older Nextcloud/ownCloud or fresh install: updated from ownCloud to NextCloud 13 and then updated to 14

Where did you install Nextcloud from: Official ZIP

List of activated apps:

App list
╭─quintasan@frelia  /srv/www/cloud.frelia.org  
╰─$ sudo -u www-data php occ app:list
Enabled:
  - accessibility: 1.0.1
  - cloud_federation_api: 0.0.1
  - comments: 1.4.0
  - dav: 1.6.0
  - federatedfilesharing: 1.4.0
  - federation: 1.4.0
  - files: 1.9.0
  - files_external: 1.5.0
  - files_sharing: 1.6.2
  - files_trashbin: 1.4.1
  - files_versions: 1.7.1
  - files_videoplayer: 1.3.0
  - firstrunwizard: 2.3.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.2.0
  - nextcloud_announcements: 1.3.0
  - notifications: 2.2.1
  - oauth2: 1.2.1
  - password_policy: 1.4.0
  - provisioning_api: 1.4.0
  - serverinfo: 1.4.0
  - sharebymail: 1.4.0
  - support: 1.0.0
  - survey_client: 1.2.0
  - systemtags: 1.4.0
  - theming: 1.5.0
  - twofactor_backupcodes: 1.3.1
  - updatenotification: 1.4.1
  - workflowengine: 1.4.0
Disabled:
  - activity
  - admin_audit
  - encryption
  - files_pdfviewer
  - files_texteditor
  - gallery
  - user_external
  - user_ldap

Nextcloud configuration:

Config report
╭─quintasan@frelia  /srv/www/cloud.frelia.org  
╰─$ sudo -u www-data php occ config:list system
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "trusted_do**Signing status:**
<details>
<summary>Signing status</summary>

Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.

</details>mains": [
            "cloud.frelia.org"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "version": "14.0.0.19",
        "logtimezone": "UTC",
        "installed": true,
        "maintenance": false,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "php",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 0,
        "overwrite.cli.url": "https:\/\/cloud.frelia.org",
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

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: no

Client configuration

Browser: Latest Chrome

Operating system: KDE Neon

Logs

Web server error log

Web server error log
Empty

Nextcloud log (data/nextcloud.log)

Nextcloud log
{"reqId":"SYDTawW5o84xUVNvjgJU","level":0,"time":"2018-09-10T18:06:52+00:00","remoteAddr":"89.78.219.123","user":"--","app":"core","method":"GET","url":"\/apps\/files\/","message":{"Exception":"OC\\AppFramework\\Middleware\\Security\\Exceptions\\NotLoggedInException","Message":"Current user is not logged in","Code":401,"Trace":[{"file":"\/srv\/www\/cloud.frelia.org\/lib\/private\/AppFramework\/Middleware\/MiddlewareDispatcher.php","line":95,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\Security\\SecurityMiddleware","type":"->","args":[{"__class__":"OCA\\Files\\Controller\\ViewController"},"index"]},{"file":"\/srv\/www\/cloud.frelia.org\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":98,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type":"->","args":[{"__class__":"OCA\\Files\\Controller\\ViewController"},"index"]},{"file":"\/srv\/www\/cloud.frelia.org\/lib\/private\/AppFramework\/App.php","line":118,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Files\\Controller\\ViewController"},"index"]},{"file":"\/srv\/www\/cloud.frelia.org\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["ViewController","index",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"files.view.index"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"files.view.index"}]},{"file":"\/srv\/www\/cloud.frelia.org\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"files.view.index"}]},{"file":"\/srv\/www\/cloud.frelia.org\/lib\/base.php","line":989,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/apps\/files\/"]},{"file":"\/srv\/www\/cloud.frelia.org\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/srv\/www\/cloud.frelia.org\/lib\/private\/AppFramework\/Middleware\/Security\/SecurityMiddleware.php","Line":143,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.19"}
{"reqId":"yuiTnvnzPTSMu6UeTHsS","level":0,"time":"2018-09-10T18:06:52+00:00","remoteAddr":"89.78.219.123","user":"--","app":"no app in context","method":"GET","url":"\/login?redirect_url=\/apps\/files\/","message":"No cache entry found for \/appdata_oc7g1cohctyj\/theming\/images\/background (storage: local::\/srv\/owncloud\/data\/, internalPath: appdata_oc7g1cohctyj\/theming\/images\/background)","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.19"}
{"reqId":"yuiTnvnzPTSMu6UeTHsS","level":0,"time":"2018-09-10T18:06:52+00:00","remoteAddr":"89.78.219.123","user":"--","app":"core","method":"GET","url":"\/login?redirect_url=\/apps\/files\/","message":"Scss is disabled for \/srv\/www\/cloud.frelia.org\/core\/css\/jquery-ui-fixes.scss, ignoring","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.19"}
{"reqId":"yuiTnvnzPTSMu6UeTHsS","level":0,"time":"2018-09-10T18:06:52+00:00","remoteAddr":"89.78.219.123","user":"--","app":"core","method":"GET","url":"\/login?redirect_url=\/apps\/files\/","message":"Scss is disabled for \/srv\/www\/cloud.frelia.org\/core\/css\/server.scss, ignoring","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.19"}
{"reqId":"yuiTnvnzPTSMu6UeTHsS","level":0,"time":"2018-09-10T18:06:52+00:00","remoteAddr":"89.78.219.123","user":"--","app":"core","method":"GET","url":"\/login?redirect_url=\/apps\/files\/","message":"Scss is disabled for \/srv\/www\/cloud.frelia.org\/core\/css\/css-variables.scss, ignoring","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.19"}
{"reqId":"yuiTnvnzPTSMu6UeTHsS","level":0,"time":"2018-09-10T18:06:52+00:00","remoteAddr":"89.78.219.123","user":"--","app":"core","method":"GET","url":"\/login?redirect_url=\/apps\/files\/","message":"Scss is disabled for \/srv\/www\/cloud.frelia.org\/apps\/firstrunwizard\/css\/firstrunwizard.scss, ignoring","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.19"}
{"reqId":"yuiTnvnzPTSMu6UeTHsS","level":0,"time":"2018-09-10T18:06:52+00:00","remoteAddr":"89.78.219.123","user":"--","app":"core","method":"GET","url":"\/login?redirect_url=\/apps\/files\/","message":"Scss is disabled for \/srv\/www\/cloud.frelia.org\/core\/css\/jquery.ocdialog.scss, ignoring","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.19"}
{"reqId":"yuiTnvnzPTSMu6UeTHsS","level":0,"time":"2018-09-10T18:06:52+00:00","remoteAddr":"89.78.219.123","user":"--","app":"core","method":"GET","url":"\/login?redirect_url=\/apps\/files\/","message":"Scss is disabled for \/srv\/www\/cloud.frelia.org\/core\/search\/css\/results.scss, ignoring","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.19"}
{"reqId":"fQhsam4MFqJAz86nbsa6","level":0,"time":"2018-09-10T18:06:53+00:00","remoteAddr":"89.78.219.123","user":"--","app":"no app in context","method":"GET","url":"\/apps\/theming\/styles?v=0","message":"No cache entry found for \/appdata_oc7g1cohctyj\/css\/icons\/icons-vars.css (storage: local::\/srv\/owncloud\/data\/, internalPath: appdata_oc7g1cohctyj\/css\/icons\/icons-vars.css)","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.19"}

Browser log

Browser log

screenshot_20180910_202024

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #9170 (redirect), #1748 (Nextcloud does not redirect to login page while open share link If user not logged in), #8829 (login loop), #560 (Wrong redirect after login), and #8042 (Fixes issue with login redirect loop).

@DBJRdev
Copy link

DBJRdev commented Sep 11, 2018

@Quintasan: Just a hint, we had a similar problem and found a workaround: The login that appears at your NC is https://cloud.frelia.org/login, which results in the loop, but have you tried the longer URL version https://cloud.frelia.org/index.php/login? It worked for us in our installation, the redirect loop is not happening there.

@Quintasan
Copy link
Author

@DBJRdev thanks for the hint but unfortunately I'm getting redirected back to https://cloud.frelia.org/login?redirect_url=/apps/files/

@BernieO
Copy link
Contributor

BernieO commented Sep 11, 2018

This also looks like a duplicate of #10885 and #11114
It is probably best to continue posting only in the original issue which is #10885

@BernieO
Copy link
Contributor

BernieO commented Sep 11, 2018

@Quintasan can you check whether #11103 solves this issue for you?

@apocalyptech
Copy link

@BernieO Hello! I'd just run into this problem myself, and can confirm that #11103 fixes the issue for me. Thanks!

@Quintasan
Copy link
Author

@BernieO This does help, thank you!

@ppagan
Copy link

ppagan commented Nov 12, 2018

For anyone coming from google with this problem (like I did): this exact same problem occurs if you use php7.2. I had to downgrade to php7.1.24 to get past this issue (on an EC2 instance running Amazon Linux 2.0 (2017.12), which is basically a RHEL7 variant),

@Arnros
Copy link

Arnros commented Nov 12, 2018

yes it seems to come from php 7.2.

I just upgraded my version of php 7.0 to 7.2 from remi repo and found myself looping on the login page.

EDIT: I tried with php7.1 from remi repo and same problem.

EDIT2: I tried with php7.0 from "webtatic" repo and it's work.

EDIT3: I installed php 7.2 from webtatic and it's work ! I have only problem with remi php.

@stemid
Copy link

stemid commented Dec 3, 2018

PHP 7.2 should be removed from the docs system requirements. I just upgraded my Fedora from 27 (EOL) to 28 and got PHP upgraded from 7.1 to 7.2 in the process. And now nextcloud doesn't work, I can't login.

Is there a workaround that does not involve 3rd party repos? Some places do not allow third party repos.

I have no rows in oc_bruteforce_attempts table and I've tried disabling 'auth.bruteforce.protection.enabled' => false in config with no change.

@kesselb
Copy link
Contributor

kesselb commented Dec 3, 2018

Please open a new issue and provide the requested information (especially the logs). Thank you!

@AlexCloudDev
Copy link

Hello,
same problem here.
Can't log in anymore. I always get redirected to main page.
No errors.
I'm on 14.0.4; PHP 7.2.12

@stemid
Copy link

stemid commented Dec 7, 2018

@AlexCloudDev I'm afraid you'll have to use the message boards instead of github, unless you think it's a bug in nextcloud. I've posted my issue here.

@AlexCloudDev
Copy link

AlexCloudDev commented Dec 7, 2018

Hey stemid,
of course i think it is a nextcloud bug.
What else?
I didn't change anything on my setup, except upgrading from 14.0.3 to 14.0.4.
And suddenly i can't login anymore.

I enter my credentials, click on login and get redirected to 'https://ABC.cba/login?redirect_url=/apps/files/'
Where i can start again ---> infinite loop

@kesselb
Copy link
Contributor

kesselb commented Dec 7, 2018

Please open a new issue and provide the requested information (especially the logs). Thank you!

https://github.com/nextcloud/server/issues/new/choose

  1. A closed issue is usually considered as fixed/won't fix/configuration issue. There is only a little chance that someone will look into it.

  2. Please provide as much as possible information (use the issue template)

  3. Keep in mind this issue was about "login troubles" after upgrading from 13.x to 14. @stemid has "login troubles" after upgrading php7.1 to php7.2 and your "login troubles" started after upgrade from 14.0.x to 14.0.z. While the result/problem is the same the initial conditions (e.g. Ubuntu 16.04 vs Fedora 28) are different.

@maryito
Copy link

maryito commented Dec 12, 2018

Please open a new issue and provide the requested information (especially the logs). Thank you!

https://github.com/nextcloud/server/issues/new/choose

1. A closed issue is usually considered as fixed/won't fix/configuration issue. There is only a little chance that someone will look into it.

2. Please provide as much as possible information (use the issue template)

3. Keep in mind this issue was about "login troubles" after upgrading from 13.x to 14. @stemid has "login troubles" after upgrading php7.1 to php7.2 and your "login troubles" started after upgrade from 14.0.x to 14.0.z. While the result/problem is the same the initial conditions (e.g. Ubuntu 16.04 vs Fedora 28) are different.

Not working in Centos 7 witch Nextcloud 14.0.4.2

@kesselb
Copy link
Contributor

kesselb commented Dec 12, 2018

Not working in Centos 7 witch Nextcloud 14.0.4.2

https://github.com/nextcloud/server/issues/new/choose

  1. A closed issue is usually considered as fixed/won't fix/configuration issue. There is only a little chance that someone will look into it.

  2. Please provide as much as possible information (use the issue template)

  3. Keep in mind this issue was about "login troubles" after upgrading from 13.x to 14. @stemid has "login troubles" after upgrading php7.1 to php7.2 and your "login troubles" started after upgrade from 14.0.x to 14.0.z. While the result/problem is the same the initial conditions (e.g. Ubuntu 16.04 vs CentOS 7) are different.

@ChristophWurst @jospoortvliet could you consider to lock this conversation please?

@nextcloud nextcloud locked and limited conversation to collaborators Dec 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests