WalletConnect / a2

An Asynchronous Apple Push Notification (apns2) Client for Rust
MIT License
137 stars 47 forks source link

http2 error: protocol error: not a result of an error #34

Closed ss025 closed 4 years ago

ss025 commented 4 years ago

Hi,

Need help with error. Need some pointers to debug this issue .

` [2019-07-22T07:37:38Z TRACE hyper_alpn] AlpnConnector::with_client_cert error reading private key [2019-07-22T07:37:38Z TRACE hyper_alpn] AlpnConnector::with_client_cert error reading certificate [2019-07-22T07:37:38Z TRACE hyper::client::pool] checkout waiting for idle connection: "https://api.push.apple.com" [2019-07-22T07:37:38Z TRACE hyper_alpn] AlpnConnector::call (Destination { uri: https://api.push.apple.com/3/device/ }) [2019-07-22T07:37:38Z TRACE hyper_alpn] AlpnConnector::call got TCP, trying TLS [2019-07-22T07:37:38Z DEBUG rustls::client::hs] No cached session for DNSNameRef("api.push.apple.com") [2019-07-22T07:37:38Z DEBUG rustls::client::hs] Not resuming any session [2019-07-22T07:37:38Z TRACE rustls::client::hs] Sending ClientHello Message { typ: Handshake, version: TLSv1_0, payload: Handshake( HandshakeMessagePayload { .....

[2019-07-22T07:37:40Z TRACE rustls::client::hs] We got ServerHello ServerHelloPayload { legacy_version: TLSv1_2, random: Random( [..] ), session_id: SessionID([...] ), ....

[2019-07-22T07:37:40Z DEBUG rustls::client::hs] ALPN protocol is Some("h2") [2019-07-22T07:37:40Z DEBUG rustls::client::hs] Using ciphersuite ....SHA256 [2019-07-22T07:37:40Z DEBUG rustls::client::hs] ECDHE curve is ECParameters { curve_type: NamedCurve, named_group: ... } [2019-07-22T07:37:40Z DEBUG rustls::client::hs] Got CertificateRequest CertificateRequestPayload } [2019-07-22T07:37:40Z DEBUG rustls::client::hs] Attempting client auth [2019-07-22T07:37:40Z DEBUG rustls::client::hs] Server cert is [Certificate([........])] [2019-07-22T07:37:40Z DEBUG rustls::client::hs] Server DNS name is DNSName("api.push.apple.com") [2019-07-22T07:37:41Z DEBUG rustls::client::hs] Session not saved [2019-07-22T07:37:41Z TRACE hyper::client::conn] client handshake HTTP/2 [2019-07-22T07:37:41Z TRACE hyper::client] handshake complete, spawning background dispatcher task [2019-07-22T07:37:41Z TRACE hyper::client::pool] put; add idle connection for "https://api.push.apple.com" [2019-07-22T07:37:41Z DEBUG hyper::client::pool] pooling idle connection for "https://api.push.apple.com" [2019-07-22T07:37:41Z TRACE hyper::client::pool] checkout dropped for "https://api.push.apple.com" [2019-07-22T07:37:41Z TRACE hyper::proto::h2] send body chunk: 58 bytes, eos=true [2019-07-22T07:37:41Z TRACE hyper::proto::h2::client] connection gracefully shutdown [2019-07-22T07:37:41Z DEBUG hyper::proto::h2::client] client response error: protocol error: not a result of an error got error : http2 error: protocol error: not a result of an error, Error: ConnectionError [2019-07-22T07:37:41Z TRACE hyper::client::pool] pool closed, canceling idle interval [2019-07-22T07:37:41Z DEBUG hyper::proto::h2::client] connection error: Connection reset by peer (os error 54)`

pimeys commented 4 years ago

Hi, sorry for not having better help. Not really owning any apple devices right now. Were you able to fix the error?

ss025 commented 4 years ago

HI Pimeys,

It was due to using wrong APNS configuration. (certificates).My bad . Resolved now.