Skip to content

Push notifications do not work (SQL syntax error) #29459

@errotu

Description

@errotu

Summary

Push notifications do not work on Android and iOS, probably due to a SQL syntax error.

Steps to reproduce

  1. User A sends a message to user B.
  2. User B expects push notification on the other end.
  3. User B does not receive a push notification.

Operating System

CentOS7

Mattermost Server Version

10.2.0

Expected behavior

Push notifications should be sent to the mobile devices.

Observed behavior

Mobile devices do not receive push notifications (iOS and Android alike).

Log Output

Hundreds of entries like this:

{"timestamp":"2024-11-28 20:53:55.332 +01:00","level":"error","msg":"Failed to send mobile app sessions","caller":"app/notification_push.go:123","logSource":"notifications","type":"push","status":"error","reason":"fetch_error","user_id":"3875fqztif8exe4oo8c1enwd8o","error":"getMobileAppSessions: We encountered an error while finding user sessions., failed to find Sessions with userId=3875fqztif8exe4oo8c1enwd8o: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '>>'$.last_removed_device_id', '')' at line 9"}

Additional Information

The same behavior (with the same error messages) occurs on two different Mattermost instances I maintain. They are completely independent, but are both using the same web hosting service (uberspace). Push notifications worked until a couple of weeks ago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions