CloudNotes iOS error 401 when syncing notes after login on nc 21.0.2, notes 4.0.4, apache deb10

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 21.0.2.1
Operating system and version (eg, Ubuntu 20.04): Debian 10
Apache or nginx version (eg, Apache 2.4.25): apache 2.4.38 (Debian)PHP version _(eg, 7.4)_:7.3 FPM/Fast CGI`

The issue you are facing:
Using CloudNotes 3.3.0 (2857) on iOS 14.6 for writing notes and hosting them (approx 500 pcs) on my rootserver (hetzner core i7 2.7 ghz, 16gb ram and 4 x 4 tb in raid 5). Server runs Debian 10 with ispconfig and Apache/maria dB (Version 15.1 Distrib 10.3.27-Mariann ). Servus several domains for me and some friends. Nextcloud 21 runs in own domain / virtual server made by ispconfig with let’s encrypt cert.

app “Brute-force settings” is disabled.
app “Default encryption module” is disabled.
pretty urls are added.
/index.php is added to servername in cloudnotes.
username and password is right one — when I hit „connect“ in cloudnotes it logs in, the green window appear, I press „sync“, it starts doing something.

Until last Friday it successfully synced, notes were editable and changes appeared instantaneously in Webbrowser I am logged into nc too.

Suddenly out of nothing during Friday syncing stopped and it showed error 401 again and again. same when I try to reconnect.

same with 3 other Nextcloud I am running on other machines. Same on iPad.

same with fresh User with no notes in same Nextcloud.

same after erasing local cloudnotes database on iPad and iPhone.

No entry’s in Apache logs.

In Nextcloud log only this:
„ warning core login failed ‚username (ipv4)“

When I try to reconnect cloudnotes to nc server log is flooded with many of these within a second.

Problem occurs both in home network and thru LTE ( deutsche Telekom p v6 only)

login into Nextcloud in Webbrowser chrome, Safari on iOS and on mac with username and password tried in cloudnotes runs without any problems.

since same with 4 different Nextcloud and same on iPad and iPhone and no Problem in Webbrowsers there must be a mistake in cloudnotes iOS app.

Is this the first time you’ve seen this error? (Y/N): y

Steps to replicate it:

  1. login into Nextcloud with cloudnotes
  2. hit sync
  3. app says error 401

The output of your Nextcloud log in Admin > Logging:


„ warning core login failed ‚username (ipv4)“

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' => 
  array (
    0 => 'xxx',
  ),
  'datadirectory' => '/var/www/clients/xxx /data',
  'dbtype' => 'mysql',
  'version' => '21.0.2.1',
  'overwrite.cli.url' => 'https://xxx',
  'dbname' => 'xxx',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'default_phone_region' => 'DE',
  'filelocking.enabled' => false,
  'auth.bruteforce.protection.enabled' => false,
  'maintenance' => false,

The output of your Apache/nginx/system log in /var/log/____:

No output

What did you upgrade on Friday? The app?

How do you authenticate, with app passwords? The real user password (no second factor authentication)?

thx.

What did you upgrade

didnt change anything. no upgrades on iphone or server. onlly usingg the app. writing new notes and editing existing ones.

How do you authenticate

the real user password. no extra app password. no second factor.

If it is a 401 error, you should see this in your webserver logfiles. Perhaps you find the resource that the app tries to connect to. I’d check if the same resource was accessed successfully before this critical friday (no 40x error code). In this case, something on the server side changed. If the requested resource changed, perhaps something in the app changed.

Be aware that some systems upgrade things automatically, which is very handy keeping your system up-to-date.

thx. it IS a 401 error. this is what the red popup in cloudnotes on iphone say. i checked server logfiles. nothing as mentioned. only nextcloud log say access denied. what do you mean by resource? a note? 401 error occurs when cloudnotes tries to load all notes from server into cloudnotes on iphone. so app trys to change its content by uploading it from nextcloud notes server. i am aware on system upgrades. its my own root server. i have full control on it. i have not enabled autmatic unpdates n system and nextcloud. manual updates only. same on iphone. no update at that moment.

The corresponding URL that should be in the access logs of your webserver…

i see eg that:
77.64.139.11 - - [18/Jun/2021:01:01:50 +0200] “OPTIONS /remote.php/dav/principals/users/jms/ HTTP/1.1” 401 5969 “-” “iOS/14.6 (18F72) dataaccessd/1.0”
77.64.139.11 - - [18/Jun/2021:01:01:50 +0200] “OPTIONS /remote.php/dav/principals/users/jms/ HTTP/1.1” 200 5782 “-” “iOS/14.6 (18F72) dataaccessd/1.0”
77.64.139.11 - - [18/Jun/2021:01:01:51 +0200] “REPORT /remote.php/dav/principals/users/jms/ HTTP/1.1” 401 5969 “-” “iOS/14.6 (18F72) dataaccessd/1.0”
77.64.139.11 - - [18/Jun/2021:01:01:51 +0200] “REPORT /remote.php/dav/principals/users/jms/ HTTP/1.1” 207 5897 “-” “iOS/14.6 (18F72) dataaccessd/1.0”
77.64.139.11 - - [18/Jun/2021:01:01:51 +0200] “PROPFIND /remote.php/dav/calendars/jms/ HTTP/1.1” 401 1310 “-” “iOS/14.6 (18F72) dataaccessd/1.0”
77.64.139.11 - - [18/Jun/2021:01:01:51 +0200] “PROPFIND /remote.php/dav/calendars/jms/ HTTP/1.1” 207 6837 “-” “iOS/14.6 (18F72) dataaccessd/1.0”
77.64.139.11 - - [18/Jun/2021:01:01:51 +0200] “PROPFIND /remote.php/dav/calendars/jms/inbox/ HTTP/1.1” 207 1315 “-” “iOS/14.6 (18F72) dataaccessd/1.0”
77.64.139.11 - - [18/Jun/2021:01:01:51 +0200] “REPORT /remote.php/dav/calendars/jms/inbox/ HTTP/1.1” 207 946 “-” “iOS/14.6 (18F72) dataaccessd/1.0”

and this:
77.64.139.11 - - [18/Jun/2021:01:22:34 +0200] “GET /index.php/apps/notes/api/v1/notes HTTP/1.1” 304 5673 “-” “CloudNotes/3.3.0 (com.peterandlinda.iOCNotes; build:2857; iOS 14.6.0) Alamofire/5.4.1”

mhmm, nothing new after 4 weeks ???