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

[Bug]: createNofitication returning { id: '', errors: {} } #73

Closed
1 task done
Gudaites opened this issue Dec 5, 2023 · 3 comments
Closed
1 task done

[Bug]: createNofitication returning { id: '', errors: {} } #73

Gudaites opened this issue Dec 5, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Gudaites
Copy link

Gudaites commented Dec 5, 2023

What happened?

I have some cases of sending push notifications where I cannot identify the errors and the createNotification function does not return any information about the error.

Steps to reproduce?

version 2.0.1-beta2

I create the object with the OneSignalNotification type

and send with await this.oneSignalService.createNotification(notificationsBody);

when sent successfully it returns the right information but there is no error, I am just receiving errors: {}

What did you expect to happen?

I hope that at least I can get back to the error that happened

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Gudaites Gudaites added the bug Something isn't working label Dec 5, 2023
@GizemSever
Copy link

I had the same problem, my example request was as follows

    const not = new OneSignal.Notification();
    not.app_id = this.appId;
    not.name = 'Test notification name ';
    not.headings = {

      'en': 'Test Notification title',
    };
    not.contents = {
      'en': 'Test Notification content',

    };
    not.target_channel = 'push';

    not.include_aliases = {
      'external_id': ['1', '2'],
    }

    const res = await this.client.createNotification(not);

I noticed that the external_id value in the include_aliases value was not included in the sent http request. If the body value you posted is similar, I fixed it and created a pull request

@nan-li
Copy link
Contributor

nan-li commented May 9, 2024

Hi everyone, thank you for reporting and for your patience.

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.

@jinliu9508
Copy link

Hi, we have had no further reports of this. Please upgrade the OneSignal SDK if you or anyone is still having this issue. If this is still an issue, please open a new report with updated information.

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

4 participants