webpush-java
webpush-java copied to clipboard
Decryption Error in Firefox
I've been trying to get the push notification running with your example usage code, with no luck.
The browser keeps throwing this error.
The ServiceWorker for scope ‘http://localhost:8081/’ encountered an error decrypting a push message: ‘OperationError: The operation failed for an operation-specific reason’. For help with encryption, please see https://developer.mozilla.org/en-US/docs/Web/API/Push_API/Using_the_Push_API#Encryption
Any idea whats going on?
I used a node library to run a small server to make sure there's no issues in the client side. The issue seem to be in the client side.
When the push message is sent from the server side, I get a 201 http response.
HttpResponseProxy{HTTP/1.1 201 Created [Access-Control-Allow-Headers: content-encoding,encryption,crypto-key,ttl,encryption-key,content-type,authorization, Access-Control-Allow-Methods: POST, Access-Control-Allow-Origin: *, Access-Control-Expose-Headers: location,www-authenticate, Content-Type: text/html; charset=UTF-8, Date: Tue, 03 Jan 2017 01:45:54 GMT, Location: https://updates.push.services.mozilla.com/m/gAAAAABYawJSH-_1uf7tv292lj_TBcDoZ_uJlCI24KqOXcDaNyX7isiiSP0-iYb5z9G2j-EgEwPuntOQsLNq6R2lWrUjNoIefCvJNRUQIvrZQep5gCDD-2ZtBx6hWUpk3it-LI5i252aZMqRiNfcmf1w1Sv3GgOMhfEywI1IS6R7Y3rSfDg1HPJGa7plv_jfaofFsmesmyOk, Server: nginx, TTL: 2419200, Content-Length: 0, Connection: keep-alive] [Content-Type: text/html; charset=UTF-8,Content-Length: 0,Chunked: false]}
@MartijnDwars I am also facing same problem.
Getting below exception from firefox browser console. But I am getting 201 response after pushing to mozilla server.
The ServiceWorker for scope ‘https://xxxxx.yyy.com/’ failed to decrypt a push message. For help with encryption, please see https://developer.mozilla.org/docs/Web/API/Push_API/Using_the_Push_API#Encryption . But at the same time it works fine in chrome.
Below are the browser details. 56.0.2 (64-bit)
@MartijnDwars Did you find out the issue in firefox? It is weird Web Push working in chrome and not in firefox :-( . Meantime we will also try to find out the encryption issue and update.
I'm sorry, no progress here yet. When I know more, I'll leave a comment on the issue.
Can you please get back onto this issue? I am getting a 201 created, but my browser cannot decrypt AES-GCM