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

Add platform troubleshooting documentation and sample configuration details #154

Merged
merged 4 commits into from
Oct 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/154.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add troubleshooting documentation and sample configuration about APNs pushkin's `platform` option.
17 changes: 17 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,23 @@ Instead of configuring Sygnal with your APNs secrets, you need to configure
Firebase with your APNs secrets, and Sygnal with your Firebase secrets.


#### Common cause 3: Using sandbox tokens with the production APNs server

Sygnal connects to the production APNs instance by default. This will return
`400 BadDeviceToken` if you send it a token intended for the sandbox APNs
server.

Either use production tokens, or switch to the sandbox APNs server by setting:

```
com.example.myapp.ios:
type: apns
...
platform: sandbox
```

in your sygnal config file.

### App doesn't receive notifications when inactive

If you want your application to be woken up to be able to process APNs messages
Expand Down
33 changes: 19 additions & 14 deletions sygnal.yaml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -199,30 +199,24 @@ metrics:
# For the type, you may specify a fully-qualified Python classname if desired.
#
apps:
# This is an example APNs push configuration using certificate authentication.
# This is an example APNs push configuration
#
#com.example.myapp.ios:
# type: apns
# certfile: com.example.myApp_prod_APNS.pem
#
# # This is the maximum number of in-flight requests *for this pushkin*
# # before additional notifications will be failed.
# # (This is a robustness measure to prevent one pushkin stacking up with
# # queued requests and saturating the inbound connection queue of a load
# # balancer or reverse proxy).
# # Defaults to 512 if unset.
# # Authentication
# #
# #inflight_request_limit: 512

# This is an example APNs push configuration using key authentication.
#
#com.example.myapp2.ios:
# type: apns
# # Two methods of authentication to APNs are currently supported.
# #
# # You can authenticate using a key:
# keyfile: my_key.p8
# key_id: MY_KEY_ID
# team_id: MY_TEAM_ID
# topic: MY_TOPIC
#
# # Or, a certificate can be used instead:
# certfile: com.example.myApp_prod_APNS.pem
#
# # This is the maximum number of in-flight requests *for this pushkin*
# # before additional notifications will be failed.
# # (This is a robustness measure to prevent one pushkin stacking up with
Expand All @@ -231,12 +225,23 @@ apps:
# # Defaults to 512 if unset.
# #
# #inflight_request_limit: 512
#
# # Specifies whether to use the production or sandbox APNs server. Note that
# # sandbox tokens should only be used with the sandbox server and vice versa.
# #
# # Valid options are:
# # * production
# # * sandbox
# #
# # The default is 'production'. Uncomment to use the sandbox instance.
# #platform: sandbox

# This is an example GCM/FCM push configuration.
#
#com.example.myapp.android:
# type: gcm
# api_key: your_api_key_for_gcm
#
# # This is the maximum number of connections to GCM servers at any one time
# # the default is 20.
# #max_connections: 20
Expand Down