element-hq / element-hq/sygnal
Unable to send Push notification with content_available and mutable_content configurations in sygnal.yaml
- Dominant language
- Python
- Stars
- 44
- Forks
- 20
- Avg merge
- 16h 53m
- Merged PRs (30d)
- 1
Description
*This issue was originally created by [**@msl2000**](https://github.com/msl2000) at .*
Hi all,
Whenever I add the fcm_options into my sygnal.yaml file,I am getting errors when a notification is being processed.
This is what my app config looks in the yaml file:
apps:
app.name:
type: gcm
api_version: v1
project_id:
service_account_file: /path/to/service_account.json
max_connections: 20
inflight_request_limit: 512
fcm_options:
content_available: true #These cause the issues
mutable_content: true #These cause the issues
These are the errors I am getting:
ERROR sygnal.gcmpushkin [1d40d8dd-a6d1-4656-a3db-706ac4606d97] 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'
I can confirm that by removing those configurations, I am able to receive notifications - but I do need the mutable_content and content_available fields for iOS.
Any help would be much appreciated.
Contributor guide
Assessment
This issue has not been assessed yet.