Closed arma7x closed 4 years ago
Operating System: Linux Node Version: v12.18.2 web-push Version: 3.4.4
Please select any browsers that you are experiencing problems with: [ ] Chrome [ ] Firefox [x ] Other(KaiOS 2.5.1) Please list the browsers you are have tested this, including the version Chrome 84.0.4147.89 (Official Build) (64-bit) Firefox 78.0.2 (64-bit) KaiOS 2.5.1
Please select any browsers that you are experiencing problems with:
Please list the browsers you are have tested this, including the version
Failing to receive push notifications on KaiOS 2.5.1 but am 100% successful when it comes to desktop chrome and desktop Firefox.
Expecting to receive push notifications on KaiOS 2.5.1.
require('dotenv').config({ path: 'variables.env' }); const express = require('express'); const webPush = require('web-push'); const bodyParser = require('body-parser'); const path = require('path'); const cors = require('cors') const app = express(); app.use(cors()) app.use(cors()) app.use(bodyParser.json()); app.use(express.static(path.join(__dirname, 'client'))); const publicVapidKey = process.env.PUBLIC_VAPID_KEY; const privateVapidKey = process.env.PRIVATE_VAPID_KEY; webPush.setVapidDetails('mailto:test@example.com', publicVapidKey, privateVapidKey); // Subscribe route app.get('/subscribe', (req, res) => { const subscription = JSON.parse(decodeURI(req.query.body)) //res.status(200).json(subscription); // create payload const payload = JSON.stringify({ title: 'Push notifications with Service Workers', }); setTimeout(() => { webPush.sendNotification(subscription, payload) .then((success) => { console.log(success); res.status(success.statusCode).json(success) }) .catch((error) => { console.log(error); res.status(error.statusCode).json(error) }); }, 3000); }); app.set('port', process.env.PORT || 5000); const server = app.listen(app.get('port'), () => { console.log(`Express running → PORT ${server.address().port}`); });
https://developer.kaiostech.com/core-developer-topics/using-push-notifications
KaiOS push service use aesgcm instead of aes128gcm
aesgcm
aes128gcm
Setup
Operating System: Linux Node Version: v12.18.2 web-push Version: 3.4.4
Problem
Expected
Features Used
Example / Reproduce Case