postData turns Uncaught TypeError: Cannot read property 'postPvdr' of null error

Hi everyone i need your help about my issue. I will be happy if i can get any help of you.

I make login and in success function i need to send onesignal playerid to php again. Because i want to send notification only logged users. For this i will send playerid when user logged in and with onesignal api i will set datatag to a user. So i am using these codes to this. But when login success function i get this error when posting playerid to php.

Uncaught TypeError: Cannot read property ‘postPvdr’ of null

ps: first postData is working well and success function is working well too. But when i try to post another data in success function i get this error.

Thanks for your help.

let body = {
        login_username: this.login_username,
        login_password: this.login_password,
        login_device: this.userdevicename,
        login_device_model: this.userdevicemodel,
        login_device_marka: this.userdevicemanufacturer,
        logdatas: 'do_login'

      this.postPvdr.postData(body, '').subscribe((data) =>{
        var alertbox = data.msg;
        if (data.success) {

        var notificationOpenedCallback = function(jsonData) {
          console.log('notificationOpenedCallback:' + JSON.stringify(jsonData));
          .startInit("xxx", "xxx")

        window["plugins"].OneSignal.getIds(function(ids) {
            let body = {
              loggedplayerid : ids.userId
            this.postPvdr.postData(body, '').subscribe(data => {
              for(let loggedplayer of data.result){

Especially when submitting sensitive data like passwords, it is absolutely essential to use HTTPS. Do not send passwords over the Internet in cleartext HTTP. That being said, your proximate problem is that you typed the word ‘function’ inside the body of one.

i mean i tried different functions but i get always same error. for example when i use function named test() this error returns test() is null. any function doesn’t work in this code.

Did you read any of the search hits from the link in my previous post?