web-push

Uncaught (in promise) SyntaxError: Unexpected end of JSON input

守給你的承諾、 提交于 2020-01-21 05:12:06
问题 I am trying to send a new push subscription to my server but am encountering an error "Uncaught (in promise) SyntaxError: Unexpected end of JSON input" and the console says it's in my index page at line 1, which obviously is not the case. The function where I suspect the problem occurring (because error is not thrown when I comment it out) is sendSubscriptionToBackEnd(subscription) which is called in the following: function updateSubscriptionOnServer(subscription) { const subscriptionJson =

Gradle build configured signatory

时光怂恿深爱的人放手 提交于 2020-01-03 15:33:19
问题 I'm looking at the webpush-java code. I run into a problem attempting to build the project using gradle. (I'm a gradle newbie). :signArchives FAILED FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':signArchives'. Cannot perform signing task ':signArchives' because it has no configured signatory I guess that I need to configure a signatory. How do I do that? 回答1: Found solution here https://github.com/jaegertracing/jaeger-client-java/issues/202 Use the

Gradle build configured signatory

陌路散爱 提交于 2020-01-03 15:32:08
问题 I'm looking at the webpush-java code. I run into a problem attempting to build the project using gradle. (I'm a gradle newbie). :signArchives FAILED FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':signArchives'. Cannot perform signing task ':signArchives' because it has no configured signatory I guess that I need to configure a signatory. How do I do that? 回答1: Found solution here https://github.com/jaegertracing/jaeger-client-java/issues/202 Use the

PushManager subscription promise never fulfill nor reject

独自空忆成欢 提交于 2020-01-01 04:55:13
问题 I am currently facing an issue with some Chrome (Chromium) version where the PushManager.subscribe promise from a ServiceWorker stays in a pending state . The code itself is pretty simple : return serviceWorkerRegistration.pushManager.subscribe({ userVisibleOnly: true }); I have a valid and accessible JSON manifest , providing the GCM Sender ID . I also tried different implementations, as described in this post, but the result is still the same. The subscription part works well with every 47+

How to send a notification to multiple firefox devices at a time

人走茶凉 提交于 2019-12-25 04:34:16
问题 Anyone know how to send the notification to multiple Firefox devices in one POST call. 回答1: The Web Push standard currently doesn't allow it. Take a look at this discussion for more information. How to send a notification to multiple subscribers using web-push package of Node.js? contains a possible alternative solution (the question is more specific than this one, but you could apply the same solution). 来源: https://stackoverflow.com/questions/36133772/how-to-send-a-notification-to-multiple

Web push notifications in chrome

拟墨画扇 提交于 2019-12-25 03:26:17
问题 I have created web push notifications and they work in Firefox ok (service worker is registered, subscription created, subscription data stored, using subscription data notification is sent ok). I have tried the same in Chrome and Opera, but nothing happens. I tried to debug, and after I send push notification, browser receives it, executes code, but nothing happens. There are no errors, code runs till the end. Service worker code is the following: 'use strict'; self.addEventListener('push',

Create a web push notification service like OneSignal

℡╲_俬逩灬. 提交于 2019-12-25 01:34:42
问题 We need to develop something similar to OneSignal (only web, no native apps) for private use. Where can we start? Is there some open source project we can use? 回答1: Each browser implements their own Push Service, so using a private/custom Push Service necessitates re-creating (at least portions of) the Push & Service Worker API's to achieve similar behavior client-side. Google has a nicely-written high-level overview; see the "Who and What is the Push Service?" section of Step 2. It's also

How are web push messages delivered?

眉间皱痕 提交于 2019-12-24 16:32:53
问题 I try to set up push messages for a web page. While I understand the front-end part (the Push API) and have a working localhost demo app, I just don't get how a server can push a message to the browser. How are the packages from the push service routed to the client? The client has no domain name and usually no fixed IP address, so how is this possible? I've read Google's guide to Web Push Libraries and parts of RFC 8030, but if they have the answer to this question, it eluded me. 回答1: Your

How are web push messages delivered?

与世无争的帅哥 提交于 2019-12-24 16:30:02
问题 I try to set up push messages for a web page. While I understand the front-end part (the Push API) and have a working localhost demo app, I just don't get how a server can push a message to the browser. How are the packages from the push service routed to the client? The client has no domain name and usually no fixed IP address, so how is this possible? I've read Google's guide to Web Push Libraries and parts of RFC 8030, but if they have the answer to this question, it eluded me. 回答1: Your

Web push notification error with curl send message

扶醉桌前 提交于 2019-12-24 03:51:35
问题 I want to understand what is web-push and how can i use for my projects... Have found this example https://mobiforge.com/design-development/web-push-notifications But always getting an error when try to send notification via Firebase Cloud Messaging (FCM is the new version of GCM) {"multicast_id":6440031216763605980,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidRegistration"}]} What it means "InvalidRegistration"? What i'm doing wrong? My php curl, but i am sure that