403 Forbidden issue on Chrome but working on Firefox
Task :run SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. HTTP/1.1 403 Forbidden [Content-Type: text/plain; charset=utf-8, X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN, X-Xss-Protection: 0, Date: Mon, 29 Aug 2022 05:29:47 GMT, Content-Length: 135, Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"] [Content-Length: 135,Chunked: false]
BUILD SUCCESSFUL in 2s 2 actionable tasks: 1 executed, 1 up-to-date
Tried even without payload still no luck :(
Same issue. Tried command line and java implementation. Same error. Tested all the same keys with node web-push and it works fine. Any ideas?
Figured it out for chrome needed to encode as follows pushService.send(notification, Encoding.AES128GCM);
This happens also for IOs final devices. I tried to change the default encoding as @jcpearce mentioned, but continued receiving the same problem. Now, trying to reproduce the HTTP POST request over the Apple APN itself using the javascript variant result in a success push notification. Considering this, anyone detected a difference between the encryption on Java and Javascript?