-
Notifications
You must be signed in to change notification settings - Fork 144
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
Unable to send Push notification with content_available and mutable_content configurations in sygnal.yaml #365
Comments
Why was this closed? i just encountered the same issue, because i updated to v14. |
Would you be able to try changing the fcm_options:
apns:
payload:
aps:
content-available: 1
mutable-content: 1
alert: "" The new FCM api removed the top level APNS convenience fields and instead prefers them to be specifically declared inside of an If that works I can update the documentation to match. |
did exactly this:
if i comment out entire fcm_options, its without any error. |
Ah - that issue was fixed in #362. I'll make a new release with the fix, and then the new config changes I mentioned should work. |
Would you be able to try with the 0.14.1 release? |
For me, it doesn't work either with version 0.14.1. Despite various attempts to configure "Invalid JSON payload received. Unknown name \"content-available\" at 'message.data[0].value': Cannot find field." Are there any other suggestions on how to configure it? We need the |
Would you be able to specify what your config looks like? I can't seem to reproduce that particular error you are seeing. |
apps:
com.app.my:
api_version: v1
project_id: my-app
service_account_file: /sygnal/my-app-firebase-adminsdk-sq3l9-deea15e111.json
type: gcm
fcm_options:
apns:
payload:
aps:
content-available: 1 |
hmm. Could you send the full log message from sygnal? |
This error is returned by sygnal:
|
Ok. So based off that error, I assume that you have specified something like this when calling "data": {
"default_payload": {
"aps": {
"mutable-content": 1,
"content-available": 1,
"alert": {"loc-key": "SINGLE_UNREAD", "loc-args": []}
}
}
} Sygnal takes that, and adds it into the Removing the |
When removing the Does the |
None of the As for the issue with "silent notifications", I have found these two issues that contain potential workarounds. If you can try some of those suggestions out, I would very much appreciate an update on whether some combination of those configuration settings make things work. |
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.
The text was updated successfully, but these errors were encountered: