# Ionic Network Plugin Not Working

**URL:** <https://forum.ionicframework.com/t/ionic-network-plugin-not-working/157037>\
**Category:** ionic-v3\
**Created:** [February 21, 2019, 7:04am UTC](https://forum.ionicframework.com/t/ionic-network-plugin-not-working/157037 "2019-02-21T07:04:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hg8200](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@hg8200](https://forum.ionicframework.com/u/hg8200)\
**Post date:** [February 21, 2019, 7:04am UTC](https://forum.ionicframework.com/t/ionic-network-plugin-not-working/157037/1 "2019-02-21T07:04:29Z")

</div>

Network Plugin not working in ionic  
i am using cordova-plugin-network-information 2.0.1 “Network Information” in ionic  
when i call to check network

```auto
  constructor(private platform: Platform,public navCtrl: NavController,private network: Network,public toastCtrl: ToastController)
  {
    this.platform.ready().then(() =>
    {

          this.network.onConnect().subscribe(() =>
          {
            console.log("calling 2");
            alert("Online!");
          });

          this.network.onDisconnect().subscribe(() =>
          {
            console.log("calling 4");
            alert("Offline!");
          });
    });
  }

```

and i m getting this error

ERROR Error: Uncaught (in promise): TypeError: Object(…) is not a function  
TypeError: Object(…) is not a function  
at Network.onConnect (index.js:62)  
at home.ts:19  
at t.invoke (polyfills.js:3)  
at Object.onInvoke (core.js:4760)  
at t.invoke (polyfills.js:3)  
at r.run (polyfills.js:3)  
at polyfills.js:3  
at t.invokeTask (polyfills.js:3)  
at Object.onInvokeTask (core.js:4751)  
at t.invokeTask (polyfills.js:3)  
at c (polyfills.js:3)  
at polyfills.js:3  
at t.invokeTask (polyfills.js:3)  
at Object.onInvokeTask (core.js:4751)  
at t.invokeTask (polyfills.js:3)  
at r.runTask (polyfills.js:3)  
at o (polyfills.js:3)  
at e.invokeTask [as invoke] (polyfills.js:3)  
at p (polyfills.js:2)  
at HTMLDocument.v (polyfills.js:2)
