Comments (14)
Plainly, your device token seems to be wrong.
Oddly, I get a different error to you:
>>> pk = "APA91bHPRgkF3JUikC4ENAHEeMrd41Zxv3hVZjC9KtT8OvPVGJ-hQMRKRrZuJAEcl7B338qju59zJMjw2DELjzEvxwYv7hH5Ynpc1ODQ0aT4U4OFEeco8ohsN5PjL1iC2dNtk2BAokeMCg2ZXKqpc8FXKmhX94kIxQ"
>>> base64.b64decode(pk)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.7/base64.py", line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Invalid base64-encoded string: number of data characters (161) cannot be 1 more than a multiple of 4
Invalid base64-encoded string: number of data characters (161) cannot be 1 more than a multiple of 4
Without knowing specifics about how you're getting your device tokens, it's hard to offer any advice.
Something is going wrong with your base64 encoding...
from sygnal.
are you sending it to Sygnal as a string or encoded?
from sygnal.
@myoussef89 the above pk is 'fcmToken' srting that i got from Firebase ,and i send it as a string not b64decode.
from sygnal.
I'm afraid I'm rather confused, are you two related in some way?
@myoussef89 the above pk is 'fcmToken' srting that i got from Firebase ,and i send it as a string not b64decode.
Firebase FCM (once known as GCM, typically used for Android) and APNs (used for iOS) are two different systems.
If you give Sygnal a FCM token, it needs to be for a FCM app ID.
i.e. "app_id": "com.xxxxxxxxxx:xxxxxxxxxx.matrix"
, then com.xxxxxxxxxx:xxxxxxxxxx.matrix
in your config needs to refer to a GCM/FCM-type app.
from sygnal.
yes, we are working together on the same project.
Does that mean IOS is only working with APNS, Not supported on firebase ?
from sygnal.
You are using iOS with FCM?
from sygnal.
we tried to use it for FCM because we are having trouble receiving notification with APNS. before IOS 13.3 it was working after Apple's last updates we are not receiving VOIP notifications or text notifications anymore.
from sygnal.
OK so my understanding is:
- When you use FCM on iOS, FCM will talk to APNs on your behalf.
- so you should not configure Sygnal with APNs
- You need to give your APNs credentials to FCM
- then you can try configuring Sygnal to use FCM (GCM) for your iOS app
- I don't know if anyone has tried this, but after skimming FCM's documentation, it seems like it stands a chance
I don't know if going through FCM will help your problem, though.
from sygnal.
yes, that exactly what we are trying to do.
from sygnal.
Your error message indicates that Sygnal is configured with type: apns
when it needs to be type: gcm
if you are using FCM.
from sygnal.
Your error message indicates that Sygnal is configured with
type: apns
when it needs to betype: gcm
if you are using FCM.
yes, I think we messed up the tokens when we were trying on APNS.
from sygnal.
Is this now resolved? :)
from sygnal.
Is this now resolved? :)
I think for the current error yes
from sygnal.
how did you finally resolve it ?, can you share the structure of your sygnal.yaml ? i seem to have the same problem
from sygnal.
Related Issues (20)
- iOS VOIP sometimes notifications getting significantly delayed if app is closed/in background HOT 19
- ios notification -fluffyChat HOT 2
- `binascii.Error: Invalid base64-encoded string: number of data characters (157) cannot be 1 more than a multiple of 4` when using FluffyChat HOT 5
- Add wget or curl in docker image for healthchecking in docker-compose
- Android, Apple and client cannot jump out the message. HOT 2
- IOS ringtone in Matrix Synapse installed using ansible? HOT 2
- Collapsing push messages for IOS HOT 1
- On Screen Calls IOS HOT 3
- FCM push for iOS issue HOT 2
- Web push notifications are not working with web.push.apple.com (Safari) HOT 3
- missing setup.py file HOT 3
- UnifiedPush support HOT 11
- Upgrade dependencies HOT 1
- Documentation for using Sygnal behind a reverse proxy HOT 9
- New tagged version HOT 2
- Disable logging for health endpoint
- anyway to use gcm/fcm key as of today 24/10/2023 for android notification HOT 2
- `sygnal.__version__` is broken
- Tests failing with Twisted 23.10
- twisted Timing out client: IPv6Address HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sygnal.