notes icon indicating copy to clipboard operation
notes copied to clipboard

Notes app can't connect to nextcloud account

Open lo-zed opened this issue 5 months ago • 13 comments

When I try to connect my android Notes app, nothing happens and I receive an error message. I believe it is a server error and not due to the android app.

Steps to reproduce

  1. open Notes app
  2. press on 'Choose account'
  3. select account (connected through Nextcloud app) and press 'ok'

Expected behaviour

Connect to nextcloud server Notes

Actual behaviour

Nothing happens and an error message is reported

Server

Please complete the following information.

  • Notes app version: 4.12.1
  • Nextcloud version: 31.0.6
  • OS: DSM 7.2.2-72806 Update 3
  • Web server: appache http server 2.4
  • PHP version: 8.2
  • Database: MariaDB 10

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.0.*",
            "maylo.familyds.org",
            "nextcloud.maylo.org"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "31.0.6.2",
        "overwrite.cli.url": "https:\/\/192.168.0.15\/nextcloud",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "filelocking.enabled": false,
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "theme": "",
        "loglevel": 0,
        "default_phone_region": "CH",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "maintenance_window_start": 100,
        "secret": "***REMOVED SENSITIVE VALUE***",
        "app_install_overwrite": []
    }
}

Client

Please complete the following information.

  • Browser (incl. version):
  • OS: e-OS 3.0.1, android 13

Log files

App Version: 4.3.1
App Version Code: 40030190
App Flavor: fdroid

Files App Version Code: 30310490 (PROD)

---

OS Version: 4.9.337-perf+(eng.root.20250606.143826)
OS API Level: 33
Device: FP3
Manufacturer: Fairphone
Model (and Product): FP3 (lineage_FP3)

---

com.nextcloud.android.sso.exceptions.NextcloudHttpRequestFailedException: HTTP request failed with HTTP status-code: 500
	at com.nextcloud.android.sso.api.AidlNetworkRequest.performNetworkRequestV2(AidlNetworkRequest.java:179)
	at com.nextcloud.android.sso.api.NextcloudAPI.performNetworkRequestV2(NextcloudAPI.java:159)
	at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservableV2$0(NextcloudAPI.java:97)
	at com.nextcloud.android.sso.api.NextcloudAPI.$r8$lambda$af7W9mq2B0ZrhVJwZd-ibFp8T3Y(Unknown Source:0)
	at com.nextcloud.android.sso.api.NextcloudAPI$$ExternalSyntheticLambda1.subscribe(D8$$SyntheticClass:0)
	at io.reactivex.internal.operators.observable.ObservableFromPublisher.subscribeActual(ObservableFromPublisher.java:31)
	at io.reactivex.Observable.subscribe(Observable.java:12284)
	at io.reactivex.internal.operators.observable.ObservableSingleMaybe.subscribeActual(ObservableSingleMaybe.java:31)
	at io.reactivex.Maybe.subscribe(Maybe.java:4290)
	at io.reactivex.Maybe.blockingGet(Maybe.java:2320)
	at io.reactivex.Observable.blockingSingle(Observable.java:5381)
	at it.niedermann.owncloud.notes.persistence.CapabilitiesClient.getCapabilities(CapabilitiesClient.java:38)
	at it.niedermann.owncloud.notes.importaccount.ImportAccountActivity.lambda$onActivityResult$5(ImportAccountActivity.java:102)
	at it.niedermann.owncloud.notes.importaccount.ImportAccountActivity.$r8$lambda$wIJzzcgrzM9d6k7exwdLMn3GvgQ(Unknown Source:0)
	at it.niedermann.owncloud.notes.importaccount.ImportAccountActivity$$ExternalSyntheticLambda4.run(D8$$SyntheticClass:0)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463)
	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
	at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.IllegalStateException: {"ocs":{"meta":{"status":"failure","statuscode":996,"message":"Internal Server Error\n"},"data":[]}}

	at com.nextcloud.android.sso.InputStreamBinder.processRequestV2(InputStreamBinder.java:440)
	at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestAndBodyStreamV2(InputStreamBinder.java:113)
	at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestV2(InputStreamBinder.java:96)
	at com.nextcloud.android.sso.aidl.IInputStreamService$Stub.onTransact(IInputStreamService.java:108)
	at android.os.Binder.execTransactInternal(Binder.java:1280)
	at android.os.Binder.execTransact(Binder.java:1244)

lo-zed avatar Jun 27 '25 07:06 lo-zed

This issue is caused by your server, not by the Notes Android App. Please check your Nextcloud server logs and post it here.

stefan-niedermann avatar Jun 27 '25 07:06 stefan-niedermann

Thank you for your answer. Here are the logs, I filtered for error messages

nextcloud_errors.log

lo-zed avatar Jun 27 '25 08:06 lo-zed

The most common cause of this sort of thing is moving to another server or something similar. Basically anything that results in losing the original secret in your Nextcloud config (if the migration process documented in the Admin Manual isn't followed).

This is not specific to Notes (and it's not actually the notes app that is failing).

Are you able to log into your Nextcloud Server via the Web UI in a clean (logged out) browser session? (Using the same account)?

And does the Android Files client work fine for you?

In general, I would suggest troubleshooting further on the help forum: https://help.nextcloud.con

joshtrichards avatar Jun 29 '25 21:06 joshtrichards

Yes I can login in the browser and the android nextcloud app works.

I'll try the forum, thanks.

lo-zed avatar Jul 02 '25 07:07 lo-zed

I'm trying from IPhone Client Version: 4.4.0(3) Server Version: 31.0.6

this is what notes app tries: SCRIPT_NAME//index.php 7REQUEST_URI//index.php/index.php/apps/notes/api/v0.2/notes DOCUMENT_URI//index.php

this is what nextcloud itself does when I look at notes: SCRIPT_NAME//index.php REQUEST_URI//apps/notes/ DOCUMENT_URI//index.php

The notes app gets a 'Error syncing notes' 'the server request timed out' Nextcloud itself works fine Did the REQUEST_URI change ?

The app was removed and installed again. Local database deleted before removing the app.

Wireshark logs do not show any communication trouble during many retries

syntacs avatar Jul 02 '25 18:07 syntacs

Same Problem here since 14.06.2025:

I'm trying from IPhone Client Version: 4.4.0(3) Server Version: 31.0.6

Zick2Zack avatar Jul 09 '25 09:07 Zick2Zack

I'm experiencing the same issue. This might help with debugging or assist others facing it:

I've noticed this behavior several times after a Nextcloud update. On the server, the Notes app showed up as version 0. Disabling it, then re-downloading and enabling it again restored the correct version (4.12.2), and it started working properly.

pantierra avatar Jul 11 '25 09:07 pantierra

Hi Pantierra

Thanks for your reply. Unfortunately, I couldn't solve the problem. When I start the app, the following error message appears: "Error Getting Settings" "Request retry failed with retry error: Request retry failed with retry error: Response Status code was unacceptable:404., original error: Response Status code was unacceptable:404., original error: Request retry failed with retry error: Response Status code was unacceptable: 404., original error: Response Status code was unacceptable: 404."

When I reopen it, the following error message appears: "Error syncing notes" "The server request timed out"

The only solution was to access Nextcloud via WebDAV with the "Joplin" app.

It's a real shame. Thanks anyway.

Zick2Zack avatar Jul 12 '25 20:07 Zick2Zack

Same issue here:

Client Version 4.4.0 (3) Server Version 25.0.13 IOS 18.5 Notes version reported in NC Instance: 4.10.1

KB3HNS avatar Jul 21 '25 15:07 KB3HNS

I think there might be a bug in the way the iOS app builds its requests. I find this issue only happening on instances that are sharing a domain with other services and are hence using a path as their base: my.cloud.com -> iOS Notes App works fine my.cloud.com/my_path -> iOS Notes App cannot sync and reports timeout

LMonert avatar Jul 31 '25 16:07 LMonert

I have the same problem. (request retry failed with retry error: ... Response status code was unacceptable: 404) Those errors occur about a second after editing a note. I can ignore the error message, the notes are still synced. But it's very annoying because the message popups blocks most of the screen and is hard to remove.

Server instance is at mydomain.com/cloud iOS version 18.2.1 App version 4.4.0 (3) Server version 29.0.11

JonyIvy avatar Oct 22 '25 21:10 JonyIvy

Most likely same problem as here nextcloud/notes-ios#161 Nextclouds api has changed

syntacs avatar Oct 23 '25 05:10 syntacs

Same here, Android 16 QPR1.

HamonTeacher avatar Oct 27 '25 21:10 HamonTeacher