title: Capacitor - TypeError: Cannot read property 'getToken' of undefined
body: <p>I'm trying to implement notifications with Capacitor FCM plugin in my Android app. However, when running the following code in Android Studio, I get this error message: &quot;TypeError: Cannot read property 'getToken' of undefined&quot;.</p>
  <p>I'm using Ionic 5 with Vue 3.</p>
  <p>App.vue</p>
  <pre><code>async pushInit() {
        const fcm = new FCM();
  
        alert(&quot;...&quot;);
        try {
          PushNotifications.addListener(&quot;registrationError&quot;, (error) =&gt; {
            console.log(`error on register ${JSON.stringify(error)}`);
          }),
            PushNotifications.addListener(
              &quot;pushNotificationReceived&quot;,
              (notification) =&gt; {
                console.log(`notification ${JSON.stringify(notification)}`);
              }
            ),
            PushNotifications.addListener(
              &quot;pushNotificationActionPerformed&quot;,
              async (notification) =&gt; {
                console.log(&quot;notification succeeded&quot;);
              }
            ),
            PushNotifications.register();
          const fcmToken = await fcm.getToken();
          alert(fcmToken);
          console.log(&quot;token:&quot; + fcmToken);
        } catch (e) {
          console.log(e);
        }
      }
  </code></pre>
  <p>I already ran npx cap sync android.</p>