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

Removing oc_notifications_pushtokens line instead of getting notification #619

Closed
Volevanius opened this issue Apr 13, 2020 · 16 comments
Closed

Comments

@Volevanius
Copy link

Volevanius commented Apr 13, 2020

Talk notification for specific account seems to be broken.

Talk notification for specific account seems to be broken.
When someone calls or send messages to that account, oc_notifications_pushtokens line for this account get deleted, and no notification is received. After deleting the account from the Android Talk app, and login again, oc_notifications_pushtokens line for device creates. After someone sends a message, it removes.
When someone sends a message to that account, this error in log appears:
error:0909006C:PEM routines:get_name:no start line

When using another account on the same Android device, all works file.

Server configuration

Operating system:
Ubuntu 18.04
Web server:
Apache
Database:
PostgreSQL
PHP version:
PHP 7.2.24-0ubuntu0.18.04.3
Nextcloud version: (see Nextcloud admin page)
18.0.3
Where did you install Nextcloud from:
Web Installer
Signing status:

No errors have been found.

List of activated apps:

Enabled:
  - accessibility: 1.4.0
  - activity: 2.11.0
  - bruteforcesettings: 1.6.0
  - calendar: 2.0.2
  - circles: 0.18.4
  - cloud_federation_api: 1.1.0
  - comments: 1.8.0
  - dav: 1.14.0
  - deck: 0.8.0
  - federatedfilesharing: 1.8.0
  - federation: 1.8.0
  - files: 1.13.1
  - files_pdfviewer: 1.7.0
  - files_rightclick: 0.15.2
  - files_sharing: 1.10.1
  - files_trashbin: 1.8.0
  - files_versions: 1.11.0
  - files_videoplayer: 1.7.0
  - firstrunwizard: 2.7.0
  - logreader: 2.3.0
  - lookup_server_connector: 1.6.0
  - nextcloud_announcements: 1.7.0
  - notifications: 2.6.0
  - oauth2: 1.6.0
  - password_policy: 1.8.0
  - photos: 1.0.0
  - privacy: 1.2.0
  - provisioning_api: 1.8.0
  - rainloop: 6.1.0
  - recommendations: 0.6.0
  - serverinfo: 1.8.0
  - settings: 1.0.0
  - sharebymail: 1.8.0
  - spreed: 8.0.7
  - support: 1.1.0
  - survey_client: 1.6.0
  - systemtags: 1.8.0
  - text: 2.0.0
  - theming: 1.9.0
  - twofactor_backupcodes: 1.7.0
  - updatenotification: 1.8.0
  - user_ldap: 1.8.0
  - viewer: 1.2.0
  - workflowengine: 2.0.0
Disabled:
  - admin_audit
  - encryption
  - files_external

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "10.61.12.70",
            "2": "file.kyivland.gov.ua"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "18.0.3.0",
        "overwrite.cli.url": "http:\/\/10.61.12.70\/nextcloud",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 3
        },
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory"
    }
}

**Are you using an external user-backend, if yes which one:**ActiveDirectory

@Volevanius Volevanius changed the title Removing oc_notifications_pushtokens line intead of getting notification Removing oc_notifications_pushtokens line instead of getting notification Apr 13, 2020
@Volevanius
Copy link
Author

Seems similar to #488

@nickvergessen
Copy link
Member

Shpupd be fixed with 18.0.2 since #584

@Volevanius
Copy link
Author

Volevanius commented Apr 13, 2020

I have 18.0.3 fresh install

@14042020
Copy link

14042020 commented Apr 14, 2020

Hi.
I have the same problem.
After deleting the account from the Android Talk, iOS Talk app and re-logging in, notifications begin to come.

Errors in the log:
Fatal notifications error: 0909006C: PEM routines: get_name: no start line
Fatal notifications error: 0E06D06C: configuration file routines: NCONF_get_string: no value

Server configuration
Operating system:
Centos 8
Web server:
nginx/1.14.1
Database:
mysql Ver 15.1 Distrib 10.3.17-MariaDB
PHP version:
PHP 7.2.11
Nextcloud version
18.0.3

@nickvergessen
Copy link
Member

Not sure if that is possible for you, but if you still have the error, can you try apply the following patch on your instance https://patch-diff.githubusercontent.com/raw/nextcloud/notifications/pull/620.diff and then run the command:
php occ notifications:test-push <user with problems> and
php occ notifications:test-push <user with problems> --talk

That should give some more details why things are happening.

@Volevanius
Copy link
Author

Volevanius commented Apr 14, 2020

Looks like all fine:
(btw I didnt get any notification. is it ok?)

sudo -u www-data php occ notification:test-push B0193511-4F5D-4DC1-9306-2B9BE1898816 --talk
returns:

Trying to push to 1 devices

Language is set to en
Private user key size: 1708
Public user key size: 451

Device token:125
Device public key size: 451
Data to encrypt is: {"nid":153,"app":"admin_notification_talk","subject":"Testing push notifications","type":"admin_notifications","id":"5e95e8ad"}
Signed encrypted push subject
Push notification sent

There some more info discovered by me today:

  • Looks like i have Android Nextcloud Talk app error. Because when I delete my account from app, clear cache using android settings, remove app, install it again and open, it doesn't ask me to login, but shows me blank screen imgur and in nextcloud.log i see attempts of Android app to do some authorization staff i guess?
{"reqId":"mJ1reARHF81TBXdcoKh5","level":2,"time":"2020-04-14T17:20:31+00:00","remoteAddr":"**my_phone_ip*","user":"--","app":"user_ldap","method":"GET","url":"/ocs/v2.php/cloud/capabilities","message":"Bind failed: 49: Invalid credentials","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.8","version":"18.0.3.0"}
{"reqId":"Etxauat184CsBh0cUYkd","level":2,"time":"2020-04-14T17:20:31+00:00","remoteAddr":"**my_phone_ip*","user":"--","app":"user_ldap","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/room","message":"Bind failed: 49: Invalid credentials","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.8","version":"18.0.3.0"}
{"reqId":"sBAzz6rGTOFaKtGzOymz","level":2,"time":"2020-04-14T17:20:31+00:00","remoteAddr":"**my_phone_ip*","user":"--","app":"user_ldap","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/signaling/settings","message":"Bind failed: 49: Invalid credentials","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.8","version":"18.0.3.0"}
{"reqId":"6NdXjfIohX3WV41ayrkT","level":2,"time":"2020-04-14T17:20:31+00:00","remoteAddr":"**my_phone_ip*","user":"--","app":"user_ldap","method":"GET","url":"/index.php/avatar/B0193511-4F5D-4DC1-9306-2B9BE1898816/182","message":"Bind failed: 49: Invalid credentials","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.8","version":"18.0.3.0"}
{"reqId":"DZBhE5VAKDrXRAPNdeep","level":2,"time":"2020-04-14T17:20:31+00:00","remoteAddr":"**my_phone_ip*","user":"--","app":"user_ldap","method":"POST","url":"/ocs/v2.php/apps/notifications/api/v2/push?devicePublicKey=-----BEGIN%20PUBLIC%20KEY-----%0AMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuSGt9seEGIgLVeLb7oS6%0AHyJ0GXid3ocyadj%2BlJb7qmuV3O4aGGK6S%2Fl6VlLcwqOOLu6FfUFY8%2BzV5%2BwrGDBo%0AttuXAwB200Br2zJYl%2FnjxGqKFcZIyZddA6KcQPZXMeQTOQI9HclYXbC05NqfsjgG%0ACGHYYVf5w2yywYFh2p1J69cJuUyp5kQYfo5nJtS48UcrmuJA7FsWadXtm5kl7v68%0AykBpbq4QZXRGJ0b%2FhqQLxiOVif79OLYTZ4hd%2BqG2Iayvjk2%2F98sbAN0Hhhstu6Ji%0Ap7T%2BF209PjYIAv2dpMZFwrzaOIuiQ3oFhfCVBqCjgMbxy86hvgX34zUvd3yhOgcH%0AiwIDAQAB%0A-----END%20PUBLIC%20KEY-----%0A&proxyServer=https%3A%2F%2Fpush-notifications.nextcloud.com&format=json&pushTokenHash=4e6b1605af14d30e60b3abee0a165f76b2db14bec84a89c9270c1406cc86ca39f6a621f537b194d00d6f940ed1dee75b814a4d15394f86dd2f85a8a1ac614fb2","message":"Bind failed: 49: Invalid credentials","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.8","version":"18.0.3.0"}
{"reqId":"WrV0Cj2n4GFhrbS20mF5","level":2,"time":"2020-04-14T17:20:32+00:00","remoteAddr":"**my_phone_ip*","user":"--","app":"user_ldap","method":"GET","url":"/ocs/v2.php/cloud/capabilities","message":"Bind failed: 49: Invalid credentials","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.8","version":"18.0.3.0"}
{"reqId":"mJ1reARHF81TBXdcoKh5","level":2,"time":"2020-04-14T17:20:32+00:00","remoteAddr":"**my_phone_ip*","user":"--","app":"core","method":"GET","url":"/ocs/v2.php/cloud/capabilities","message":"Login failed: '**my_user_email/login*' (Remote IP: '**my_phone_ip*')","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.8","version":"18.0.3.0"}
{"reqId":"Etxauat184CsBh0cUYkd","level":2,"time":"2020-04-14T17:20:32+00:00","remoteAddr":"**my_phone_ip*","user":"--","app":"core","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/room","message":"Login failed: '**my_user_email/login*' (Remote IP: '**my_phone_ip*')","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.8","version":"18.0.3.0"}
{"reqId":"DZBhE5VAKDrXRAPNdeep","level":2,"time":"2020-04-14T17:20:32+00:00","remoteAddr":"**my_phone_ip*","user":"--","app":"core","method":"POST","url":"/ocs/v2.php/apps/notifications/api/v2/push?devicePublicKey=-----BEGIN%20PUBLIC%20KEY-----%0AMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuSGt9seEGIgLVeLb7oS6%0AHyJ0GXid3ocyadj%2BlJb7qmuV3O4aGGK6S%2Fl6VlLcwqOOLu6FfUFY8%2BzV5%2BwrGDBo%0AttuXAwB200Br2zJYl%2FnjxGqKFcZIyZddA6KcQPZXMeQTOQI9HclYXbC05NqfsjgG%0ACGHYYVf5w2yywYFh2p1J69cJuUyp5kQYfo5nJtS48UcrmuJA7FsWadXtm5kl7v68%0AykBpbq4QZXRGJ0b%2FhqQLxiOVif79OLYTZ4hd%2BqG2Iayvjk2%2F98sbAN0Hhhstu6Ji%0Ap7T%2BF209PjYIAv2dpMZFwrzaOIuiQ3oFhfCVBqCjgMbxy86hvgX34zUvd3yhOgcH%0AiwIDAQAB%0A-----END%20PUBLIC%20KEY-----%0A&proxyServer=https%3A%2F%2Fpush-notifications.nextcloud.com&format=json&pushTokenHash=4e6b1605af14d30e60b3abee0a165f76b2db14bec84a89c9270c1406cc86ca39f6a621f537b194d00d6f940ed1dee75b814a4d15394f86dd2f85a8a1ac614fb2","message":"Login failed: '**my_user_email/login*' (Remote IP: '**my_phone_ip*')","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.8","version":"18.0.3.0"}
{"reqId":"WrV0Cj2n4GFhrbS20mF5","level":2,"time":"2020-04-14T17:20:32+00:00","remoteAddr":"**my_phone_ip*","user":"--","app":"core","method":"GET","url":"/ocs/v2.php/cloud/capabilities","message":"Login failed: '**my_user_email/login*' (Remote IP: '**my_phone_ip*')","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.8","version":"18.0.3.0"}
{"reqId":"sBAzz6rGTOFaKtGzOymz","level":2,"time":"2020-04-14T17:20:32+00:00","remoteAddr":"**my_phone_ip*","user":"--","app":"core","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/signaling/settings","message":"Login failed: '**my_user_email/login*' (Remote IP: '**my_phone_ip*')","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.8","version":"18.0.3.0"}
{"reqId":"6NdXjfIohX3WV41ayrkT","level":2,"time":"2020-04-14T17:20:32+00:00","remoteAddr":"**my_phone_ip*","user":"--","app":"core","method":"GET","url":"/index.php/avatar/B0193511-4F5D-4DC1-9306-2B9BE1898816/182","message":"Login failed: '**my_user_email/login*' (Remote IP: '**my_phone_ip*')","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.8","version":"18.0.3.0"}
  • But when I login with same account on iPhone Nextcloud Talk, got same error on incoming message:
{"reqId":"8iPl59HikAltpAU46WHx","level":4,"time":"2020-04-14T17:32:42+00:00","remoteAddr":"**IP ADRESS OF USER THAT SENDS ME MESSAGE","user":"22115EE2-A598-48E1-BD1A-FA21BD4CFA50","app":"notifications","method":"POST","url":"/ocs/v2.php/apps/spreed/api/v1/chat/sc8gmkca","message":"error:0909006C:PEM routines:get_name:no start line","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
  • After that I guess that the problem can be in my account, so I try to send me a message using another account from web interface. And it works well. WTF?

  • After that I guess that the problem can be with the iPhone, from witch another user sends me messages before(btw he always gets notification without problems), so I ask him to message me from browser, and same error comes with removing oc_notifications_pushtokens token.

I so confused.

@nickvergessen
Copy link
Member

Do you also get a Error while encrypting data: " entry in your nextcloud.log ?

@Volevanius
Copy link
Author

Nope

@Volevanius
Copy link
Author

Volevanius commented Apr 21, 2020

Tried to recreate all users with changing internal username in LDAP / AD integration / Expert to sAMAccountName and clearing Username-LDAP User Mapping. then relogin
can see new account folders in data folder.
but same error on getting message

"app":"notifications","method":"POST","url":"/ocs/v2.php/apps/spreed/api/v1/room","message":"error:0909006C:PEM routines:get_name:no start line"

didnt see any other errors in logs

any ideas?

@14042020
Copy link

14042020 commented Apr 21, 2020

Hi, Volevanius

I was able to verify that if you get local users in nextcloud, notifications in nextcloud Talk start to come. And if you use users from AD, a bug appears:

Fatal notifications error: 0909006C: PEM routines: get_name: no start line

@nickvergessen
Copy link
Member

@14042020 see #619 (comment)

@Volevanius
Copy link
Author

I set log level to 0 (debug)
here some logs (maybe will be useful) :
When I just browsing(opening dialogs etc ) on talk app with account that gets this logs:

{"reqId":"bEyUrOKmJ4ZcxrPy63t2","level":0,"time":"2020-04-21T10:15:09+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/chat/warz7s6x?lastKnownMessageId=408&includeLastKnown=0&limit=100&setReadMarker=1&timeout=30&lookIntoFuture=1","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}
{"reqId":"UJooy1XDWNN7ceheJcSJ","level":0,"time":"2020-04-21T10:15:09+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/chat/warz7s6x?lastKnownMessageId=392&includeLastKnown=0&limit=100&setReadMarker=1&timeout=30&lookIntoFuture=0","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}
{"reqId":"3WnMbygzwBepLl8RY9Sh","level":0,"time":"2020-04-21T10:15:13+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/room","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}
{"reqId":"xn5ZmfuCSI3ZCdWOxrYc","level":0,"time":"2020-04-21T10:15:13+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"no app in context","method":"DELETE","url":"/ocs/v2.php/apps/spreed/api/v1/room/warz7s6x/participants/active","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}
{"reqId":"fARUcTo5BbqLRsN601aH","level":0,"time":"2020-04-21T10:15:14+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/room/fpee5yuu","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}
{"reqId":"2NkoJgcXdANIEXVlSZu6","level":0,"time":"2020-04-21T10:15:14+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/spreed/api/v1/room/fpee5yuu/participants/active","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}
{"reqId":"UJDoEUAKSXgIHWKdr7zs","level":0,"time":"2020-04-21T10:15:14+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/chat/fpee5yuu?lastKnownMessageId=0&includeLastKnown=1&limit=100&setReadMarker=1&timeout=0&lookIntoFuture=0","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}
{"reqId":"Z2Wsj7DG1dojnYZZOjIt","level":0,"time":"2020-04-21T10:15:14+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/chat/fpee5yuu?lastKnownMessageId=0&includeLastKnown=0&limit=100&setReadMarker=1&timeout=30&lookIntoFuture=1","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}
{"reqId":"rAibVs64qQejdPflQUKK","level":0,"time":"2020-04-21T10:15:15+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/chat/fpee5yuu?lastKnownMessageId=358&includeLastKnown=0&limit=100&setReadMarker=1&timeout=30&lookIntoFuture=1","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}
{"reqId":"plfYrD4OcKW6O3rKmtjm","level":0,"time":"2020-04-21T10:15:17+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"no app in context","method":"DELETE","url":"/ocs/v2.php/apps/spreed/api/v1/room/fpee5yuu/participants/active","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}
{"reqId":"plfYrD4OcKW6O3rKmtjm","level":0,"time":"2020-04-21T10:15:17+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"user_ldap","method":"DELETE","url":"/ocs/v2.php/apps/spreed/api/v1/room/fpee5yuu/participants/active","message":"initializing paged search for  Filter (&(|(objectclass=person))) base Array\n(\n    [0] => cn=\u0432\u043e\u043b\u0435\u0432\u0430\u0447 \u0456\u0432\u0430\u043d \u0432\u0456\u0442\u0430\u043b\u0456\u0439\u043e\u0432\u0438\u0447,ou=institute,ou=personal,dc=dzr,dc=c\n)\n attr Array\n(\n    [0] => \n)\n limit 500 offset 0","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}
{"reqId":"plfYrD4OcKW6O3rKmtjm","level":0,"time":"2020-04-21T10:15:17+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"user_ldap","method":"DELETE","url":"/ocs/v2.php/apps/spreed/api/v1/room/fpee5yuu/participants/active","message":"Ready for a paged search","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}
{"reqId":"plfYrD4OcKW6O3rKmtjm","level":0,"time":"2020-04-21T10:15:17+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"user_ldap","method":"DELETE","url":"/ocs/v2.php/apps/spreed/api/v1/room/fpee5yuu/participants/active","message":"readAttribute: cn=\u0432\u043e\u043b\u0435\u0432\u0430\u0447 \u0456\u0432\u0430\u043d \u0432\u0456\u0442\u0430\u043b\u0456\u0439\u043e\u0432\u0438\u0447,ou=institute,ou=personal,dc=dzr,dc=c found","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}
{"reqId":"yRvIvZViWYEyDEiO6vD6","level":0,"time":"2020-04-21T10:15:51+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/spreed/api/v1/room/fpee5yuu/participants/active","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}
{"reqId":"ZvjC9rMZ88cjEuscEbRS","level":0,"time":"2020-04-21T10:15:51+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/chat/fpee5yuu?lastKnownMessageId=358&includeLastKnown=0&limit=100&setReadMarker=1&timeout=30&lookIntoFuture=1","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}
{"reqId":"nM4cNsFkPDMhnyyS1TIp","level":0,"time":"2020-04-21T10:16:03+00:00","remoteAddr":"MY_IP","user":"MY_samaccountname","app":"no app in context","method":"DELETE","url":"/ocs/v2.php/apps/spreed/api/v1/room/fpee5yuu/participants/active","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v8.0.9","version":"18.0.3.0"}****

When sending message to this account from specific account that ruins my notifications:

{"reqId":"KmBZdF3tDv9PPOpPChx7","level":0,"time":"2020-04-21T10:18:22+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"--","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/room","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"KmBZdF3tDv9PPOpPChx7","level":0,"time":"2020-04-21T10:18:22+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"--","app":"user_ldap","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/room","message":"initializing paged search for  Filter (&(&(|(objectclass=person)))(|(samaccountname=OTHER_USERNAME)(|(mailPrimaryAddress=OTHER_USERNAME)(mail=OTHER_USERNAME)))) base Array\n(\n    [0] => OU=personal,DC=dzr,DC=c\n)\n attr Array\n(\n    [0] => entryuuid\n    [1] => nsuniqueid\n    [2] => objectguid\n    [3] => guid\n    [4] => ipauniqueid\n    [5] => dn\n    [6] => uid\n    [7] => samaccountname\n    [8] => memberof\n    [9] => mail\n    [10] => displayname\n    [11] => jpegphoto\n    [12] => thumbnailphoto\n)\n limit 500 offset 0","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"KmBZdF3tDv9PPOpPChx7","level":0,"time":"2020-04-21T10:18:22+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"--","app":"user_ldap","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/room","message":"Ready for a paged search","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"KmBZdF3tDv9PPOpPChx7","level":0,"time":"2020-04-21T10:18:24+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"OTHER_USERNAME","app":"user_ldap","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/room","message":"initializing paged search for  Filter (&(|(objectclass=person))) base Array\n(\n    [0] => cn=\u0431\u0430\u0445\u0430\u0440\u0435\u0432 \u0432\u0430\u0434\u0438\u043c \u0430\u043d\u0430\u0442\u043e\u043b\u0456\u0439\u043e\u0432\u0438\u0447,ou=institute,ou=personal,dc=dzr,dc=c\n)\n attr Array\n(\n    [0] => \n)\n limit 500 offset 0","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"KmBZdF3tDv9PPOpPChx7","level":0,"time":"2020-04-21T10:18:24+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"OTHER_USERNAME","app":"user_ldap","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/room","message":"Ready for a paged search","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"KmBZdF3tDv9PPOpPChx7","level":0,"time":"2020-04-21T10:18:24+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"OTHER_USERNAME","app":"user_ldap","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/room","message":"readAttribute: cn=\u0431\u0430\u0445\u0430\u0440\u0435\u0432 \u0432\u0430\u0434\u0438\u043c \u0430\u043d\u0430\u0442\u043e\u043b\u0456\u0439\u043e\u0432\u0438\u0447,ou=institute,ou=personal,dc=dzr,dc=c found","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"2zObZ8GsTEeclHb91Crl","level":0,"time":"2020-04-21T10:18:24+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"OTHER_USERNAME","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/spreed/api/v1/room/9iu9a5y5/participants/active","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"Zy2bpoFfzftgmOKlE9PT","level":0,"time":"2020-04-21T10:18:24+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"--","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/chat/9iu9a5y5?includeLastKnown=1&lastKnownMessageId=410&limit=100&lookIntoFuture=0&setReadMarker=1&timeout=0","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"5NMGg2ynG8b47pKdiAi9","level":0,"time":"2020-04-21T10:18:24+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"--","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/chat/9iu9a5y5?includeLastKnown=0&lastKnownMessageId=410&limit=100&lookIntoFuture=1&setReadMarker=1&timeout=0","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"YleVfNF8AgF8NJhl8ix9","level":0,"time":"2020-04-21T10:18:24+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"--","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/chat/9iu9a5y5?includeLastKnown=0&lastKnownMessageId=410&limit=100&lookIntoFuture=1&setReadMarker=1&timeout=30","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"gKlXHDKFt39Xp8BBmZxq","level":0,"time":"2020-04-21T10:18:26+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"--","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/chat/9iu9a5y5?includeLastKnown=0&lastKnownMessageId=375&limit=100&lookIntoFuture=0&setReadMarker=1&timeout=0","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"y50y9hNO9Zo5UfmP2UQo","level":0,"time":"2020-04-21T10:18:28+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"--","app":"no app in context","method":"POST","url":"/ocs/v2.php/apps/spreed/api/v1/chat/9iu9a5y5","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"y50y9hNO9Zo5UfmP2UQo","level":4,"time":"2020-04-21T10:18:29+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"OTHER_USERNAME","app":"notifications","method":"POST","url":"/ocs/v2.php/apps/spreed/api/v1/chat/9iu9a5y5","message":"error:0E06D06C:configuration file routines:NCONF_get_string:no value","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"p0wHXyde1IUQBf1xA0wD","level":0,"time":"2020-04-21T10:18:30+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"--","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/chat/9iu9a5y5?includeLastKnown=0&lastKnownMessageId=411&limit=100&lookIntoFuture=1&setReadMarker=1&timeout=30","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"jp65O3UgZWvQAlouoKM0","level":0,"time":"2020-04-21T10:18:32+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"--","app":"no app in context","method":"DELETE","url":"/ocs/v2.php/apps/spreed/api/v1/room/9iu9a5y5/participants/active","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"io3heGFuO8TqfAUOApqI","level":0,"time":"2020-04-21T10:18:32+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"--","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v1/room","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (iOS) Nextcloud-Talk v8.1.0","version":"18.0.3.0"}
{"reqId":"7EIMpmw3FTUk7BhwQcge","level":0,"time":"2020-04-21T10:18:42+00:00","remoteAddr":"IP_OF_OTHER_ACC","user":"B95C76A9-C4C9-4CF6-8E83-3103344C5110","app":"no app in context","method":"POST","url":"/index.php/apps/rainloop/app/?/Ajax/&q[]=/_nfuRXWhiun9qOOnMwr3RWD8DlAUqzY6bxJvr-6mOKYnrWnMiBnJByrYvKeLCREU7515D8vfwzUIKLkxyZq9-ePjHKVRrSrxsbbCrbbmq0zw0GMF-2h67Vddv7_4pRanhEXxPEahlh4LsgtB3rZKOIdTN4BTBInyOfTqp6mXoFRzYV3rfP7xlwAFeOh13fMo0IBri18UuPdJRBO4xi18-AofuVSAZWr6LV5oen3PRpwYzete2wYG_FPFcC-y_guUV3avjWGyjl_JwgPBbBfrbTJE19Rp_fNA2iaf_31Yx2kPh9Qz61Bj-A-z3sel3CmJV08SfzYUYG30-HL0xUkNz2HgsQVSAMwxSARvpARlRPTWKRzgnmd-ZHw/","message":"Deprecated event type for OCA\\User_LDAP\\User\\User::postLDAPBackendAdded: null","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.19603","version":"18.0.3.0"}

Messages from another accounts works fine. Error heppens only when "OTHER_USERNAME" send something (call,message,chat start notification) to "MY_samaccountname"

@krestyanikov
Copy link

@Volevanius Hi

I had a similar problem a few days ago. I had studied the error in detail and it turned out that there were two reasons for it, the first was that the subject was too long due to the use of multibyte characters, and the second was the return of the corrette in public. I corrected both cases and it worked for me

nextcloud\apps\notifications\lib\Push.php

find
$maxDataLength = 255 - strlen(json_encode($data)) - 10;
replace by

// Half the length for multibyte characters like Russian, Chinese, Japanese, Emojis, …
$maxDataLength = floor((255 - strlen(json_encode($data))-10) / 2) - 1;
// Remove ^M
$device['devicepublickey'] = str_replace( "\r", "", $device['devicepublickey']);

I hope this helps solve your problem.

@nickvergessen
Copy link
Member

So your device key is \n\r line breaked? What device is this? Do you run windows somewhere in the chain? Did you restore a backup at some point?

@krestyanikov
Copy link

I think you can ignore that. I deleted this line in my code and it still works. It was left as a result of my experiments.
I think the length of the subject is the real reason:
// Half the length for multibyte characters like Russian, Chinese, Japanese, Emojis, … $maxDataLength = floor((255 - strlen(json_encode($data))-10) / 2) - 1;
Thanks

@nickvergessen
Copy link
Member

Closing as this should work much better since #670

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