Ionic package build with phonegap-plugin-push SENDER_ID missing

I know, there are lots of post about phonegap-plugin-push problems with SENDER_ID missing problem.
I followed the guide that indicate how to solve this problem so I installed the pluging like this:

cordova plugin add phonegap-plugin-push --variable SENDER_ID="MY_GOOGLE_PROJ_NUMBER"

and even with

ionic plugin add phonegap-plugin-push --variable SENDER_ID="MY_GOOGLE_PROJ_NUMBER"

Now my local builds works with both options, but the problem of missing SENDER_ID is still there when I try to build from ionic service:

ionic package build android

then I got this error

Error: Variable(s) missing (use: --variable SENDER_ID=value).

here my package.json

  "cordovaPlugins": [
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "cordova-plugin-statusbar",
    "cordova-plugin-apprate",
    "cordova-plugin-file-transfer",
    "https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git",
    "cordova-plugin-whitelist",
    "cordova-plugin-camera",
    {
      "variables": {
        "SENDER_ID": "MY_GOOGLE_PROJ_NUMBER"
      },
      "locator": "phonegap-plugin-push"
    },      
    {
      "locator": "https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git",
      "id": "cordova-plugin-x-socialsharing"
    },
    "ionic-plugin-keyboard",  
    "phonegap-plugin-push"
  ],

and my settings.xml

<plugin name="phonegap-plugin-push" spec="1.7.4">
    <variable name="SENDER_ID" value="MY_GOOGLE_PROJ_NUMBER"/>
</plugin>

Anyone solved this problem With Ionic Platform Service?

Does this not interest anyone, or nobody has got this problem, please give me some hints

Remove the last line of your package.json. The proper section is this:

{
“locator”: “phonegap-plugin-push”,
“variables”: {
“SENDER_ID”: “MY_GOOGLE_PROJ_NUMBER”
}
}

At the end you have this:

“phonegap-plugin-push”

Which is redundant and running the install (a second time) fails because SENDER_ID is not specified

Did you ever get a resolution on this? I have exactly the same issue. I can build fine locally using ‘ionic build ios’ but if I use ‘ionic package build ios --release --profile distribution’ I get the same error you do.

"ionic-plugin-keyboard@2.2.0",
        {
            "variables": {
                "SENDER_ID": "xxxxxx"
            },
            "locator": "phonegap-plugin-push"
        }

  <plugin name="phonegap-plugin-push" spec="*">
    <variable name="SENDER_ID" value="xxxxxx"/>
  </plugin>

Yes I’ve solved the problem, but unfortunately without understanding what was wrong.
I fact I created from scratch project, I created a new project, copied all my files and then I have installed all the plugins by following their instructions.
and it worked