Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Push Plugin tutorial is giving error #2626

Open
partlok2 opened this issue Nov 14, 2018 · 2 comments
Open

Push Plugin tutorial is giving error #2626

partlok2 opened this issue Nov 14, 2018 · 2 comments

Comments

@partlok2
Copy link

Expected Behaviour

-Implementing the plugin tutorial at http://docs.phonegap.com/tutorials/develop/push-notifications/ should allow me to send push notifications from CLI

capture

Actual Behaviour

-Browser gives the error seen in the attachment and the mobile app never prompts the user to allow the app to send push notifications.

Reproduce Scenario (including but not limited to)

-Follow the instructions step by step at http://docs.phonegap.com/tutorials/develop/push-notifications/ until you go to open the app on desktop or mobile. At that point the app connects but gives the error and never asks for permission to recieve notifications

Steps to Reproduce

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

Chrome v70

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Pixel 2XL

Cordova CLI version and cordova platform version

cordova --version                                    8.1.2
cordova platform version android        

browser 5.0.4
Available platforms:
android ~7.1.1
ios ~4.5.4
osx ~4.0.1
windows ~6.0.0

Plugin version

cordova plugin version | grep phonegap-plugin-push

e.g. 1.5.3

Sample Push Data Payload

Sample Code that illustrates the problem

Logs taken while reproducing problem

@codesundar
Copy link

I have updated my push notification article on my site using phonegap-plugin-push. You can check my step by step tutorial for integration: Phonegap Push Notification Tutorial

@Cipscis
Copy link

Cipscis commented Jan 14, 2019

partlok2, I think the issue you are having is due to Service Workers not being available unless you are on an https connection or while using localhost. If you are previewing your project in a browser via IP address and port number (e.g. http://192.168.222.110:3000/) try using localhost instead (e.g. http://localhost:3000/)

This is explained briefly in the "Browser quirks" section of the installation documentation: https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#browser-quirks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants