# Error in push notification

**URL:** <https://forum.ionicframework.com/t/error-in-push-notification/92595>\
**Category:** ionic-v3\
**Created:** [June 1, 2017, 6:05am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595 "2017-06-01T06:05:42Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![muraleecse](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@muraleecse](https://forum.ionicframework.com/u/muraleecse)\
**Post date:** [June 1, 2017, 6:05am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595/1 "2017-06-01T06:05:42Z")

</div>

Hi all,  
When i using this in config.xml the push notification receiving in ios but not working in android

\< plugin name=“phonegap-plugin-push” spec="~1.9.0"\>  
\< variable name=“SENDER\_ID” value=“XXXXXX”/\>  
\< /plugin\>

using the below the push notification receiving in android but not working in ios  
\< plugin name=“phonegap-plugin-push” spec="~1.6"\>  
\< variable name=“SENDER\_ID” value=“XXXXXX”/\>  
\< /plugin\>

Give me the solution for supporting in both platforms

---

<div class="post-metadata">

**Author:** ![echle](https://avatars.discourse-cdn.com/v4/letter/e/7feea3/32.png) [@echle](https://forum.ionicframework.com/u/echle)\
**Post date:** [June 1, 2017, 7:01am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595/2 "2017-06-01T07:01:56Z")

</div>

When using a newer version then 1.8.4 the ionic package service doesnt include the phonegap-plugin-push in the apk file when building for the android platform. Try version 1.8.4 for Android. Or arent you using the package service?

For ios you can use the newsest version (1.10.4) . So far I could not find a way without changing the config.xml between the two platform builds.

---

<div class="post-metadata">

**Author:** ![muraleecse](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@muraleecse](https://forum.ionicframework.com/u/muraleecse)\
**Post date:** [June 1, 2017, 7:05am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595/3 "2017-06-01T07:05:09Z")

</div>

\< plugin name=“phonegap-plugin-push” spec="~1.8.4"\>  
\< variable name=“SENDER\_ID” value=“XXXXXX”/\>  
\< /plugin\>

This is right?

---

<div class="post-metadata">

**Author:** ![echle](https://avatars.discourse-cdn.com/v4/letter/e/7feea3/32.png) [@echle](https://forum.ionicframework.com/u/echle)\
**Post date:** [June 1, 2017, 7:17am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595/4 "2017-06-01T07:17:10Z")

</div>

you dont need the ~ cause you explictly want to use that version

I opened a thread with that subject this week:

> [@Phonegap-plugin-push not included in apk file with ionic packakge build](https://forum.ionicframework.com/t/phonegap-plugin-push-not-included-in-apk-file-with-ionic-packakge-build/92246):
>
> Hi all, when I build an apk file using the package service the phonegap-plugin-push is not included. I can verify that by opening the apk using an unzip tool. I am using ionic2 and the dependency for the plugin is defined in config.xml \<plugin name="phonegap-plugin-push"\> \<variable name="SENDER\_ID" value="XXXXXXXXX"/\> \</plugin\> The only way to get the build service include the plugin is by explicitly using the version “1.8.4” like that: \<plugin name="phonegap-plugin-push" spec="1.8.…

you can find my config entry there

---

<div class="post-metadata">

**Author:** ![muraleecse](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@muraleecse](https://forum.ionicframework.com/u/muraleecse)\
**Post date:** [June 1, 2017, 8:36am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595/5 "2017-06-01T08:36:11Z")

</div>

thank u very much echle…

---

<div class="post-metadata">

**Author:** ![muraleecse](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@muraleecse](https://forum.ionicframework.com/u/muraleecse)\
**Post date:** [June 1, 2017, 9:02am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595/6 "2017-06-01T09:02:05Z")

</div>

Hi echle,  
The device not receiving push notifications while i using this  
\< plugin name=“phonegap-plugin-push” spec=“1.8.4”\>  
\< variable name=“SENDER\_ID” value=“xxxxxxxx”/\>  
\< /plugin\>

---

<div class="post-metadata">

**Author:** ![echle](https://avatars.discourse-cdn.com/v4/letter/e/7feea3/32.png) [@echle](https://forum.ionicframework.com/u/echle)\
**Post date:** [June 1, 2017, 9:12am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595/7 "2017-06-01T09:12:41Z")

</div>

Could you check if the phonegap-plugin-push is included in the apk file?

Just unzip it and look for the folder “phonegape-plugin-push” in assets/www/plugins

---

<div class="post-metadata">

**Author:** ![muraleecse](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@muraleecse](https://forum.ionicframework.com/u/muraleecse)\
**Post date:** [June 1, 2017, 9:16am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595/8 "2017-06-01T09:16:29Z")

</div>

yes it is there in that folder

---

<div class="post-metadata">

**Author:** ![echle](https://avatars.discourse-cdn.com/v4/letter/e/7feea3/32.png) [@echle](https://forum.ionicframework.com/u/echle)\
**Post date:** [June 1, 2017, 9:18am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595/9 "2017-06-01T09:18:42Z")

</div>

You are using the ionic cloud push service?

Where and when do you register your device?

Have you double checked your sender ID?

---

<div class="post-metadata">

**Author:** ![muraleecse](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@muraleecse](https://forum.ionicframework.com/u/muraleecse)\
**Post date:** [June 1, 2017, 9:19am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595/10 "2017-06-01T09:19:25Z")

</div>

during login i register my device

---

<div class="post-metadata">

**Author:** ![echle](https://avatars.discourse-cdn.com/v4/letter/e/7feea3/32.png) [@echle](https://forum.ionicframework.com/u/echle)\
**Post date:** [June 1, 2017, 10:57am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595/11 "2017-06-01T10:57:08Z")

</div>

Is the app open or in background while you are sending the push notification?

(sry for asking so much … )

can you see the push token in your ionic-dashboard connected to your user (you should see it when looking at the details of you user in the auth tab)?

---

<div class="post-metadata">

**Author:** ![muraleecse](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@muraleecse](https://forum.ionicframework.com/u/muraleecse)\
**Post date:** [June 1, 2017, 11:00am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595/12 "2017-06-01T11:00:16Z")

</div>

\< plugin name=“phonegap-plugin-push” spec=“1.8.4”\>  
\< variable name=“SENDER\_ID” value=“xxxxxxxx”/\>  
\< /plugin\>

While using this android works fine but not in ios

---

<div class="post-metadata">

**Author:** ![echle](https://avatars.discourse-cdn.com/v4/letter/e/7feea3/32.png) [@echle](https://forum.ionicframework.com/u/echle)\
**Post date:** [June 2, 2017, 6:57am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595/13 "2017-06-02T06:57:01Z")

</div>

yes, thats what I said.

I use 1.10.4 for ios and 1.8.4 for android

---

<div class="post-metadata">

**Author:** ![muraleecse](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@muraleecse](https://forum.ionicframework.com/u/muraleecse)\
**Post date:** [June 2, 2017, 6:57am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595/14 "2017-06-02T06:57:42Z")

</div>

how can i use both in config.xml?

---

<div class="post-metadata">

**Author:** ![echle](https://avatars.discourse-cdn.com/v4/letter/e/7feea3/32.png) [@echle](https://forum.ionicframework.com/u/echle)\
**Post date:** [June 2, 2017, 7:47am UTC](https://forum.ionicframework.com/t/error-in-push-notification/92595/15 "2017-06-02T07:47:01Z")

</div>

I could not find a solution for that so far, I just change the config.xml before I build …

But I would expect the bug getting fixed in the next time … I would prefer to use 1.10.4. on both platforms of course …
