Android Notes app can't connect to server

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 31.0.7
  • Operating system and version (e.g., Ubuntu 24.04):
    • DSM 7.2.2-72806 Update 3
  • Web server and version (e.g, Apache 2.4.25):
    • appache http server 2.4
  • PHP version (e.g, 8.3):
    • 8.2.28-0107
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • copied the package by hand
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

My Android Notes app can’t connect to my server

Steps to replicate it (hint: details matter!):

  1. In android app: Choose account
  2. Select account (the generic Nextcloud app works fine), then: ok
  3. Allow

Log entries

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

Files App Version Code: 30320090 (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)

Nextcloud

{"reqId":"LzOQR9zTLwauup0kYrhe","level":3,"time":"2025-07-17T13:14:21+00:00","remoteAddr":"192.168.1.3","user":"lziegler","app":"no app in context","method":"GET","url":"/ocs/v2.php/cloud/capabilities?format=json","message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/volume1/web/nextcloud/lib/private/Security/Crypto.php' line 147","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.32.0","version":"31.0.7.1","exception":{"Exception":"Exception","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/volume1/web/nextcloud/lib/private/Security/Crypto.php' line 147","Code":0,"Trace":[{"file":"/volume1/web/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\WhatsNewController"},"getCapabilities"]},{"file":"/volume1/web/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Core\\Controller\\WhatsNewController","getCapabilities",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"ocs.core.whatsnew.getcapabilities"}]},{"file":"/volume1/web/nextcloud/ocs/v1.php","line":49,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/cloud/capabilities"]},{"file":"/volume1/web/nextcloud/ocs/v2.php","line":7,"args":["/volume1/web/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/volume1/web/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":146,"Previous":{"Exception":"ValueError","Message":"hash_hkdf(): Argument #2 ($key) cannot be empty","Code":0,"Trace":[{"file":"/volume1/web/nextcloud/lib/private/Security/Crypto.php","line":147,"function":"hash_hkdf","args":["sha512",{"__class__":"SensitiveParameterValue"}]},{"file":"/volume1/web/nextcloud/lib/private/Security/Crypto.php","line":102,"function":"decryptWithoutSecret","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/volume1/web/nextcloud/lib/private/Security/IdentityProof/Manager.php","line":100,"function":"decrypt","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/volume1/web/nextcloud/lib/private/Security/IdentityProof/Manager.php","line":144,"function":"retrieveKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":["app-core-ocm_external"]},{"file":"/volume1/web/nextcloud/lib/private/OCM/OCMSignatoryManager.php","line":103,"function":"getAppKey","class":"OC\\Security\\IdentityProof\\Manager","type":"->","args":["core","ocm_external"]},{"file":"/volume1/web/nextcloud/apps/cloud_federation_api/lib/Capabilities.php","line":81,"function":"getLocalSignatory","class":"OC\\OCM\\OCMSignatoryManager","type":"->","args":[]},{"file":"/volume1/web/nextcloud/lib/private/CapabilitiesManager.php","line":61,"function":"getCapabilities","class":"OCA\\CloudFederationAPI\\Capabilities","type":"->","args":[]},{"file":"/volume1/web/nextcloud/core/Controller/OCSController.php","line":70,"function":"getCapabilities","class":"OC\\CapabilitiesManager","type":"->","args":[]},{"file":"/volume1/web/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"getCapabilities","class":"OC\\Core\\Controller\\OCSController","type":"->","args":[]},{"file":"/volume1/web/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\WhatsNewController"},"getCapabilities"]},{"file":"/volume1/web/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\WhatsNewController"},"getCapabilities"]},{"file":"/volume1/web/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Core\\Controller\\WhatsNewController","getCapabilities",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"ocs.core.whatsnew.getcapabilities"}]},{"file":"/volume1/web/nextcloud/ocs/v1.php","line":49,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/cloud/capabilities"]},{"file":"/volume1/web/nextcloud/ocs/v2.php","line":7,"args":["/volume1/web/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/volume1/web/nextcloud/lib/private/Security/Crypto.php","Line":147},"message":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/volume1/web/nextcloud/lib/private/Security/Crypto.php' line 147","exception":[],"CustomMessage":"hash_hkdf(): Argument #2 ($key) cannot be empty in file '/volume1/web/nextcloud/lib/private/Security/Crypto.php' line 147"},"id":"6878f7358c16c"}

Configuration

Nextcloud

{
    "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.7.1",
        "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": []
    }
}

Apps

Enabled:

  • activity: 4.0.0
  • app_api: 5.0.2
  • calendar: 5.3.6
  • circles: 31.0.0
  • cloud_federation_api: 1.14.0
  • comments: 1.21.0
  • contacts: 7.2.0
  • contactsinteraction: 1.12.0
  • cookbook: 0.11.3
  • dashboard: 7.11.0
  • dav: 1.33.0
  • federatedfilesharing: 1.21.0
  • federation: 1.21.0
  • files: 2.3.1
  • files_downloadlimit: 4.0.0
  • files_pdfviewer: 4.0.0
  • files_reminders: 1.4.0
  • files_sharing: 1.23.1
  • files_trashbin: 1.21.0
  • files_versions: 1.24.0
  • firstrunwizard: 4.0.0
  • logreader: 4.0.0
  • lookup_server_connector: 1.19.0
  • nextcloud_announcements: 3.0.0
  • notes: 4.12.2
  • notifications: 4.0.0
  • oauth2: 1.19.1
  • password_policy: 3.0.0
  • photos: 4.0.0
  • privacy: 3.0.0
  • profile: 1.0.0
  • provisioning_api: 1.21.0
  • recommendations: 4.0.0
  • related_resources: 2.0.0
  • serverinfo: 3.0.0
  • settings: 1.14.0
  • sharebymail: 1.21.0
  • support: 3.0.0
  • survey_client: 3.0.0
  • systemtags: 1.21.1
  • tasks: 0.16.1
  • text: 5.0.0
  • theming: 2.6.1
  • twofactor_backupcodes: 1.20.0
  • updatenotification: 1.21.0
  • user_status: 1.11.0
  • viewer: 4.0.0
  • weather_status: 1.11.0
  • webhook_listeners: 1.2.0
  • workflowengine: 2.13.0

Disabled:

  • admin_audit: 1.21.0
  • bruteforcesettings: 4.0.0 (installed 2.4.0)
  • encryption: 2.19.0
  • files_external: 1.23.0
  • suspicious_login: 9.0.1
  • twofactor_nextcloud_notification: 5.0.0
  • twofactor_totp: 13.0.0-dev.0
  • user_ldap: 1.22.0

What’s the history of your installation? Has it ever been migrated, perhaps without moving the full config containing the secret? Or was it originally an Owncloud installation?

Thanks. It’s always been a nextcloud installation and has never been migrated. I may have changed the secret by error though. But I can’t be 100% sure because I lost my config backup

Hello,

I have the same problem. Did you solve it ?

To add information : my nextcloud notes" application was connected but I disconnect it (error). Now it’s impossible to reconnect it. I did not change any application (nextcloud server ; Notes on server or nextcloud notes on android).

I send you the message that I get on Android app :

App Version: 4.4.2
App Version Code: 40040290
App Flavor: fdroid

Files App Version Code: 30320290 (PROD)


OS Version: 4.14.141-g99dfc7e(V12.0.9.0.QJOEUXM)
OS API Level: 29
Device: merlinnfc
Manufacturer: Xiaomi
Model (and Product): M2003J15SC (merlinnfc_eea)


java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.gson.JsonPrimitive com.google.gson.JsonObject.getAsJsonPrimitive(java.lang.String)' on a null object reference
	at it.niedermann.owncloud.notes.persistence.sync.CapabilitiesDeserializer.deserialize(CapabilitiesDeserializer.java:75)
	at it.niedermann.owncloud.notes.persistence.sync.CapabilitiesDeserializer.deserialize(CapabilitiesDeserializer.java:32)
	at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:95)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$2.readIntoField(ReflectiveTypeAdapterFactory.java:271)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:561)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:519)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$2.readIntoField(ReflectiveTypeAdapterFactory.java:271)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:561)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:519)
	at com.google.gson.Gson.fromJson(Gson.java:1359)
	at com.google.gson.Gson.fromJson(Gson.java:1260)
	at com.google.gson.Gson.fromJson(Gson.java:1228)
	at com.nextcloud.android.sso.api.NextcloudAPI.convertStreamToTargetEntity(NextcloudAPI.java:136)
	at com.nextcloud.android.sso.api.NextcloudAPI.lambda$performRequestObservableV2$0(NextcloudAPI.java:98)
	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:103)
	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:462)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:919)

Hi @Did
no, I haven’t solved it so far, sorry

Hello,

There is an upgrade of Nextcloud an Nextcloud Notes on Android.

The system works again now.

Thanks for all

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.