-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Bug]: Can't create notifications targeting a list of external ids #66
Comments
I'm getting this error as well. The typescript types are wrong |
@remiremi @alexrabin could you share which version of the SDK you're using? |
I am using 2.0.1-beta2 |
I suspected that, but I just wanted to confirm. Thanks for the prompt reply 🙏🏽 |
I'm working on reproducing this now in my sample project. Once I reproduce there, I can start to build additional context to understand what's going wrong and how we can fix our typings. |
@iAmWillShepherd thanks for looking into this! |
I reproduce this issue, and the team is aware of the problem. However, I have little insight into when a fix will be available. ╭─iamwill@kronos ~/code/@onesignalDevelopers/OneSignal-Node-Sample ‹main●›
╰─$ ./bin/dev notification create -A 202d4f61-1ca9-42df-9d36-bb17d8613abf --name "Include EUID test" -- "Did it work"
Sending push notification... done
{
"id": "",
"errors": {}
}
You're 100 percent correct that this isn't possible. The only property you can access is Did you try including EIDs via the const notification = new OneSignal.Notification()
notification.include_external_user_ids = ['id1', 'id2', 'id3'] |
@iAmWillShepherd Yes I am however the documentation says the attribute is deprecated:
https://documentation.onesignal.com/reference/create-notification#send-to-specific-devices |
They are indeed being deprecated, however, they should still be available to use until we ship an updated SDK. |
@iAmWillShepherd Yes the attribute does currently work but I'd rather not use an attribute that is deprecated. |
I understand. However, the property is not deprecated yet. It's marked as Deprecating, so it's a warning that it will be deprecated in the future and subsequently not supported some time after the official deprecation takes place. If you're OK with waiting indefinitely, we will ship an SDK that enables you to avoid using the deprecated property. My suggestion was meant to unblock you today. A fix will likely not be released at any point this week. |
@iAmWillShepherd I understand. Thank you |
I am stuck on the same problem, but I want to include the |
@iAmWillShepherd Available, yes, but not workable in production. The Additionally, What's the ETA for this being wired up properly? Thanks! |
This is still an issue, We've tried to do the migration today but faced the type issues described in the comments. Any ETA on this? |
This SDK is undergoing another overhaul with more clear types and method names. The development for it is in progress and active and this issue is a priority |
I see the development in progress and commenting to add more visibility as I too am blocked by this issue. Thanks! |
Heya - any progress here to report? I'd like to resume being able to report on failed push notifications. |
@emawby Sorry to be a pain. Do you have an expected release date, so I can fix the bug on my end that this change caused? |
Will it be released anytime soon? |
@iAmWillShepherd @emawby any update? The situation is very unclear |
I am also blocked on this. Using include_aliases with external_id does nothing and include_external_user_ids gives a Bad Request HTTP error. |
It's beyond belief that an issue that's 5 months old has had no progress. I'm inclined to believe this repo isn't maintained, which is understandable for some open source projects but this is supposed to be OneSignal's official node SDK 🤷♀️ |
These are still the most up-to-date comments of this post: These backend SDKs are going to take more time so they can be implemented correctly. For now, if you want to target External IDs, continue using the |
I received this generic error when I try to create a notification:
I read that it is necessary to create a segment. It is possible to insert an array of ids in segment and after creating a notification it is necessary to use the id of segment how reference, but my account is free and it is impossible to create segment in free account. If someone to found the solution, please, talk me. |
I've never had to create a segment to send notifications. There is a default segment for everything anyway AFAIK |
I am trying a method of resolve the problem, because include_external_user_ids not works for me. |
This should work with 5.0.0-alpha.1 now. The important change is this: But worth to mention about this new alpha version:
|
Hi everyone, thanks again for reporting and for your patience. As @EinfachHans mentioned, we recently released an alpha version of our latest user model API: Release 5.0.0-alpha-01 that addresses this and other issues. Please read the release description for how to get started, and we appreciate any early feedback on this release. |
What happened?
The REST API makes it possible to send notifications to a list of users given their external ids: https://documentation.onesignal.com/reference/create-notification#platform-to-deliver-to
However the sdk doesn't seem to make it possible, because the field
include_aliases
expects an object of typePlayerNotificationTargetIncludeAliases
, which definition doesn't make it possible to define theexternal_id
field.This is what the serialized JSON for
include_aliases
should look like according to REST API documentationSteps to reproduce?
Install latest version of sdk.
To try and make the call with the SDK, run:
Typescript will complain that
What did you expect to happen?
I expect the SDK to have the correct type definition of
PlayerNotificationTargetIncludeAliases
so that the API call can be made with the correct parameters.Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: