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

FirebaseMessagingAdminException: messaging/invalid-argument: Value type for APS key [alert] is a Dictionary or String. #50

Open
binemmanuel opened this issue Aug 2, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@binemmanuel
Copy link

Describe the bug
After going through the code I understand that the _toProto() method serialises the ApnsConfig Object resulting in this exception as it creates nullable fields like;

{"alert": null, "sound": {"name": "default"}, ...}

To Reproduce

ApnsConfig(
    payload: ApnsPayload(
        aps: Aps(
            sound: CriticalSound(name: 'default'),
        ),
    ),
)

Expected behaviour
If the expected result was the below not including fields that weren't passed to the object then the said exception wouldn't be a thing.

{"sound": {"name": "default"}, ...}
@binemmanuel binemmanuel added the bug Something isn't working label Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants