sygnal icon indicating copy to clipboard operation
sygnal copied to clipboard

v0.14.0 FCM error sending notification

Open MichalNemec opened this issue 10 months ago • 9 comments

Hello, i have exactly the same issue as #365 and dont know why it got closed. If i remove the two properties from config, its working, but its needed.

If i leave those enabled, then its cycling to send and on macos its random if i get notification and even more random when i get it. Could this be looked at or did the settings changed in the config side?

...
2024-03-31 08:46:12,264 [1] INFO  twisted Starting factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.<locals>.quiescentCallback at 0x7f1cd6797880>, <twisted.internet.endpoints._WrapperEndpoint object at 0x7f1cd5e97ca0>)
2024-03-31 08:46:12,265 [1] INFO  twisted Starting factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.<locals>.quiescentCallback at 0x7f1cd684b490>, <twisted.internet.endpoints._WrapperEndpoint object at 0x7f1cd67b1960>)
2024-03-31 08:46:12,267 [1] INFO  twisted Starting factory _HTTP11ClientFactory(<function HTTPConnectionPool._newConnection.<locals>.quiescentCallback at 0x7f1cd5e90c10>, <twisted.internet.endpoints._WrapperEndpoint object at 0x7f1cd5e9c4c0>)
2024-03-31 08:46:12,319 [1] DEBUG sygnal.gcmpushkin [74cc5d5d-71f8-4e09-a55e-530575c035d4] GCM request took 0.327629 seconds
2024-03-31 08:46:12,320 [1] ERROR sygnal.gcmpushkin [74cc5d5d-71f8-4e09-a55e-530575c035d4] 400 from server, we have sent something invalid! Error: '{\n  "error": {\n    "code": 400,\n    "message": "Invalid JSON payload received. Unknown name \\"content_available\\" at \'message\': Cannot find field.\\nInvalid JSON payload received. Unknown name \\"mutable_content\\" at \'message\': Cannot find field.",\n    "status": "INVALID_ARGUMENT",\n    "details": [\n      {\n        "@type": "type.googleapis.com/google.rpc.BadRequest",\n        "fieldViolations": [\n          {\n            "field": "message",\n            "description": "Invalid JSON payload received. Unknown name \\"content_available\\" at \'message\': Cannot find field."\n          },\n          {\n            "field": "message",\n            "description": "Invalid JSON payload received. Unknown name \\"mutable_content\\" at \'message\': Cannot find field."\n          }\n        ]\n      }\n    ]\n  }\n}\n'
2024-03-31 08:46:12,320 [1] WARNING sygnal.http [74cc5d5d-71f8-4e09-a55e-530575c035d4] Failed to dispatch notification.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/sygnal/http.py", line 275, in _handle_dispatch
    result = await pushkin.dispatch_notification(notif, d, context)
  File "/usr/local/lib/python3.10/site-packages/sygnal/notifications.py", line 217, in dispatch_notification
    return await self._dispatch_notification_unlimited(n, device, context)
  File "/usr/local/lib/python3.10/site-packages/sygnal/gcmpushkin.py", line 574, in _dispatch_notification_unlimited
    new_failed, new_pushkeys = await self._request_dispatch(
  File "/usr/local/lib/python3.10/site-packages/sygnal/gcmpushkin.py", line 287, in _request_dispatch
    return self._handle_v1_response(
  File "/usr/local/lib/python3.10/site-packages/sygnal/gcmpushkin.py", line 431, in _handle_v1_response
    raise NotificationDispatchException("Invalid request")
sygnal.exceptions.NotificationDispatchException: Invalid request
2024-03-31 08:46:12,321 [1] INFO  sygnal.access Handled request: "IP" - - [31/Mar/2024:08:46:12 +0000] "POST /_matrix/push/v1/notify HTTP/1.1" 502 - "-" "Synapse/1.103.0"
2024-03-31 08:46:12,323 [1] DEBUG sygnal.gcmpushkin [70fb8467-9880-49cb-97f5-58d11aa440e6] GCM request took 0.198191 seconds
2024-03-31 08:46:12,323 [1] ERROR sygnal.gcmpushkin [70fb8467-9880-49cb-97f5-58d11aa440e6] 400 from server, we have sent something invalid! Error: '{\n  "error": {\n    "code": 400,\n    "message": "Invalid JSON payload received. Unknown name \\"content_available\\" at \'message\': Cannot find field.\\nInvalid JSON payload received. Unknown name \\"mutable_content\\" at \'message\': Cannot find field.",\n    "status": "INVALID_ARGUMENT",\n    "details": [\n      {\n        "@type": "type.googleapis.com/google.rpc.BadRequest",\n        "fieldViolations": [\n          {\n            "field": "message",\n            "description": "Invalid JSON payload received. Unknown name \\"content_available\\" at \'message\': Cannot find field."\n          },\n          {\n            "field": "message",\n            "description": "Invalid JSON payload received. Unknown name \\"mutable_content\\" at \'message\': Cannot find field."\n          }\n        ]\n      }\n    ]\n  }\n}\n'
2024-03-31 08:46:12,323 [1] WARNING sygnal.http [70fb8467-9880-49cb-97f5-58d11aa440e6] Failed to dispatch notification.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/sygnal/http.py", line 275, in _handle_dispatch
    result = await pushkin.dispatch_notification(notif, d, context)
  File "/usr/local/lib/python3.10/site-packages/sygnal/notifications.py", line 217, in dispatch_notification
    return await self._dispatch_notification_unlimited(n, device, context)
  File "/usr/local/lib/python3.10/site-packages/sygnal/gcmpushkin.py", line 574, in _dispatch_notification_unlimited
    new_failed, new_pushkeys = await self._request_dispatch(
  File "/usr/local/lib/python3.10/site-packages/sygnal/gcmpushkin.py", line 287, in _request_dispatch
    return self._handle_v1_response(
  File "/usr/local/lib/python3.10/site-packages/sygnal/gcmpushkin.py", line 431, in _handle_v1_response
    raise NotificationDispatchException("Invalid request")
sygnal.exceptions.NotificationDispatchException: Invalid request
2024-03-31 08:46:12,324 [1] INFO  sygnal.access Handled request: "IP" - - [31/Mar/2024:08:46:12 +0000] "POST /_matrix/push/v1/notify HTTP/1.1" 502 - "-" "Synapse/1.103.0"
2024-03-31 08:46:12,326 [1] DEBUG sygnal.gcmpushkin [57fed7a7-9154-407c-a41d-4690e9550af1] GCM request took 0.510864 seconds
...

MichalNemec avatar Apr 01 '24 09:04 MichalNemec