question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PushNotifications does not have web implementation.

See original GitHub issue

Description of the problem:

getting “PushNotifications does not have web implementation.” after the app is booted on android emulator, i’m loading the app from an external URL with the capacitor config variable:

"server": {
    "url":"https://MY-SITE.com"
 }
import { Plugins } from '@capacitor/core';

const { Device, PushNotifications } = Plugins;


class Notifications {
    notifications = [];
    constructor() {

        PushNotifications.register();
        PushNotifications.addListener('registration', (token) => {
          console.log('token ' + token.value);
        });
        PushNotifications.addListener('registrationError', (error) => {
          console.log('error on register ' + JSON.stringify(error));
        });
        PushNotifications.addListener('pushNotificationReceived', (notification) => {
          console.log('notification ' + JSON.stringify(notification));
          this.notifications.push(notification);
        });
    
        PushNotifications.addListener('pushNotificationActionPerformed', (notification) => {
          console.log('notification ' + JSON.stringify(notification));
          this.notifications.push(notification);
        });
    }


}


export default new Notifications();

Affected platform

  • Android
  • iOS
  • electron
  • web

OS of the development machine

  • Windows
  • [ x] macOS
  • linux

Other information: i’m following the example https://github.com/jcesarmobile/ionic-angular-capacitor-push-example but instead of Angular i’m using React

Capacitor version: @capacitor/core@1.0.0-beta.19 node version: v11.14.0 npm version: 6.9.0

Related: #749 #1393

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jcesarmobilecommented, May 2, 2019

Updating npm packages should be enough. Sometimes if we did changes in the templates you should do them too (but most times it’s just to update dependencies of the native libraries). At the moment we are not documenting those changes, once we release the final release we will do it.

0reactions
jcesarmobilecommented, May 7, 2019

Please, don’t use unrelated issues to ask questions. If you have questions we have a capacitor dedicated slack https://getcapacitor.herokuapp.com/ and forums https://forum.getcapacitor.com/ or even on stackoverflow using capacitor tag.

On beta 22 those both events should work fine

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Uncaught (in promise): PushNotifications does not have ...
Just wanted to know how to implement PushNotification for web in ionic using capacitor . if there is any plugin or atleast if...
Read more >
PushNotifications does not have web implementation #2659
After using npx add ios and running app from xcode, it works fine. At least it says that remote notifications are not supported...
Read more >
Uncaught (in promise): PushNotifications does not have web ...
ERROR Error: Uncaught (in promise): PushNotifications does not have web implementation. How to catch this exception for web implementation, ...
Read more >
Push Notifications Capacitor Plugin API
The Push Notifications API provides access to native push notifications. ... There is no need to add the Firebase SDK to your app...
Read more >
Web Push Notifications Explained - Airship
Learn about web push notifications, what they look like, technical requirements for implementation and how to use them to drive customer engagement &...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found