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

Authentication error for Nextcloud client - 401 Authorization Required #545

Closed
csolisr opened this issue Jan 11, 2023 · 10 comments
Closed

Comments

@csolisr
Copy link

csolisr commented Jan 11, 2023

Describe the bug

The Nextcloud client is unable to properly log in due to an authentication error.

Context

  • Hardware: Dedicated x86 computer
  • YunoHost version: 11.1.2
  • I have access to my server: Through SSH, webadmin, direct access
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
  • Using, or trying to install package version/branch: 25.0.2

Steps to reproduce

  • Install Nextcloud
  • Run the Nextcloud client setup tool, log into your server, accept the token, choose your folder
  • A message will appear saying "authentication required"

Expected behavior

The system should be capable of reading the token as usual. Now it seems to fetch an error 401:

2023-01-11 07:25:34:334 [ warning nextcloud.sync.networkjob.checkserver C:\Users\sysadmin\AppData\Local\Temp\2\windows-12824\client-building\desktop\src\libsync\networkjobs.cpp:530 ]:	error: status.php replied  401 "<html>\r\n<head><title>401 Authorization Required</title><script type=\"text/javascript\" src=\"/ynh_portal.js\"></script><link type=\"text/css\" rel=\"stylesheet\" href=\"/ynh_overlay.css\"><script type=\"text/javascript\" src=\"/ynhtheme/custom_portal.js\"></script><link type=\"text/css\" rel=\"stylesheet\" href=\"/ynhtheme/custom_overlay.css\"></head>\r\n<body>\r\n<center><h1>401 Authorization Required</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n"
2023-01-11 07:25:34:334 [ warning nextcloud.sync.connectionvalidator C:\Users\sysadmin\AppData\Local\Temp\2\windows-12824\client-building\desktop\src\gui\connectionvalidator.cpp:139 ]:	QNetworkReply::AuthenticationRequiredError "The server requires authentication" "The server requires authentication" "<html>\r\n<head><title>401 Authorization Required</title><script type=\"text/javascript\" src=\"/ynh_portal.js\"></script><link type=\"text/css\" rel=\"stylesheet\" href=\"/ynh_overlay.css\"><script type=\"text/javascript\" src=\"/ynhtheme/custom_portal.js\"></script><link type=\"text/css\" rel=\"stylesheet\" href=\"/ynhtheme/custom_overlay.css\"></head>\r\n<body>\r\n<center><h1>401 Authorization Required</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n"

Logs

20230111_0723_owncloud.log

@alexAubin
Copy link
Member

Can you tell us what version of Yunohost you're running exactly (is it really 11.1.2 or 11.1.2.something ?)

Also could it be that you upgraded yunohost+ssowat recently before the issue was triggered ?

@csolisr
Copy link
Author

csolisr commented Jan 11, 2023

I accidentally ran sudo apt upgrade with the Testing version on, then commented it out and tried to sudo apt dist-upgrade - I didn't get any warnings on rolling back so I assumed that testing and stable were equal at the moment. I'll try force-reinstalling the packages.

@csolisr
Copy link
Author

csolisr commented Jan 11, 2023

For the record, my current version is 11.1.2+202301081500

@alexAubin
Copy link
Member

11.1.2+202301081500 -> wtf really ? Sounds like you're even running unstable to me ...

can you share the full output of yunohost --version ...

@csolisr
Copy link
Author

csolisr commented Jan 11, 2023

Yeah you might be onto something, when I manually downgraded yunohost back to 11.0.11 I got a few warnings:

Warning: The configuration file '/etc/nginx/conf.d/yunohost_http_errors.conf.inc' has been manually modified and will not be updated
Warning: The configuration file '/etc/postfix/ldap-groups.cf' has been manually modified and will not be updated
Success! Configuration updated for 'dovecot'
Success! Configuration updated for 'rspamd'
Success! Configuration updated for 'dnsmasq'
Warning: The configuration file '/etc/fail2ban/filter.d/postfix-sasl.conf' has been manually modified and will not be updated

Sounds like one of these might have been the culprit of the errors, I'll try restoring those

@csolisr
Copy link
Author

csolisr commented Jan 11, 2023

Yup, seemed to be on Unstable before I rolled back:

yunohost:
repo: unstable
version: 11.1.2+202301081500

yunohost-admin:
repo: unstable
version: 11.1.2.1+202301081430

moulinette:
repo: unstable
version: 11.1.2+202301061645

ssowat:
repo: testing
version: 11.1.2.3

@alexAubin
Copy link
Member

Ugh I don't think downgrading from 11.1 to 11.0 was the right thing to do though T_T ... only downgrading from 11.1.x+whatever to 11.1.x should have be enough ...

@goofie45
Copy link

Hello,
I encounter the same problem, via the web interface, no problem accessing Nextcloud, the creation of the token for the desktop client goes smoothly, however, at the end, I have an authentication error.
Thank you for your help

@Br1x
Copy link

Br1x commented Jan 15, 2023

Same problem, and think it is related to this issue : YunoHost/issues#2129

@alexAubin
Copy link
Member

Closing ... please refer to https://forum.yunohost.org/t/authentication-issues-with-yunohost-11-1-0-with-new-ssowat-version-please-upgrade-to-yunohost-11-1-2-to-fix/23059/59

If you still experience the issue despite following the instruction, please reopen another issue with accurate information about which version of YunoHost and SSOwat you are running, possibly what funky history you have such as downgrading packages, and accurate description of symptoms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants