Closed GeorgeTailor closed 6 years ago
Consider extending readme to include that the options object can accept proxy object with proxy config. This issue was resolved when I've added proxy config.
https://github.com/web-push-libs/web-push/pull/330 is adding the docs.
I am also facing the same issue.
Setup
Operating System: <macOS High Sierra 10.13.1> Node Version: <8.6.0> web-push Version: <3.3.1>
Chrome 66
Problem
When sending request to endpoint which should send the notification the following error is thrown:
Error: getaddrinfo ENOTFOUND fcm.googleapis.com fcm.googleapis.com:443
Expected
webpush.sendNotification(subscription, dataToSend) should send push msg instead of throwing error.
Features Used
Example / Reproduce Case
relevant code goes as follows:
Other
Subscription is valid and is saved locally as variable in the node.js express instance.
I am using angular ngsw for service worker setup, which handles most of the dirty work. Also, I've checked the endpoint returned by ngsw and it seems legit. It has the following format: https://fcm.googleapis.com/fcm/send/cshk3UHgWLw:APA91bGuj3kA619Gr_pgUiCUI55tTQrpXW22PR_vZA0oRr-VS4BaxHGiX8o4gEha42FDNzGbMWKiDQlcHVca7DFoGHeaVQOwtHJcVXmjZJuAHDQihDeCV4_r7iIf47nyIs1-ozkiHQ10