peburrows / goth

Elixir package for Oauth authentication via Google Cloud APIs
http://hexdocs.pm/goth
MIT License
284 stars 108 forks source link

HTTPoison.Error when trying to retrieve token #72

Closed ghost closed 3 years ago

ghost commented 4 years ago

This only appears to have cropped up recently but there is now an error when retrieving the token from Goth.

Goth.Client.get_access_token("https://www.googleapis.com/auth/pubsub")
=NOTICE REPORT==== 21-May-2020::17:29:31.899288 ===
TLS client: In state certify at tls_connection.erl:1164 generated CLIENT ALERT: Fatal - Handshake Failure - malformed_handshake_data

{:error,
 %HTTPoison.Error{
   id: nil,
   reason: {:tls_alert,
    {:handshake_failure,
     'received CLIENT ALERT: Fatal - Handshake Failure - malformed_handshake_data'}}
 }}

I am using erlang 22.0 along with Elixir 1.9.4 and 1.10.3.

There is a server that is using elrang 23 as a base and that also has the same issue.

Fudoshiki commented 3 years ago

Related

https://github.com/benoitc/hackney/issues/664 https://github.com/thoughtbot/bamboo/issues/565 https://github.com/edgurgel/httpoison/issues/417

methyl commented 3 years ago

Running mix deps.update hackney fixed this problem for me.

yoelfme commented 3 years ago

Running mix deps.update hackney fixed this problem for me.

thanks, that saved my night!

wojtekmach commented 3 years ago

Yes, it can be solved by updating hackney, thanks everyone for providing extra context.