Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websockets returning nxdomain on start_link callup from slack rtm api #46

Open
jeshocarmel opened this issue May 3, 2016 · 1 comment

Comments

@jeshocarmel
Copy link

jeshocarmel commented May 3, 2016

When connecting with the Slack RTM API with websocket_client as dep, I'm receiving a{:error, :nxdomain} error.

Initially I thought it was Slack which which didn't accept my proxy settings but later on debugging I found Slack sends me a 200 response and found that the websocket_client was the one who was not able to bypass my proxy settings.

I'm attaching my slack rtm api code here

  def start_link(token, initial_state, client \\ :websocket_client) do
        case Slack.Rtm.start(token) do
          {:ok, rtm} ->
            state = %{
              rtm: rtm,
              state: initial_state,
              client: client,
              token: token
            }
            url = String.to_char_list(rtm.url)
            client.start_link(url, __MODULE__, state)
          {:error, %HTTPoison.Error{reason: :connect_timeout}} ->
            {:error, "Timed out while connecting to the Slack RTM API"}
          {:error, %HTTPoison.Error{reason: :nxdomain}} ->
            {:error, "Could not connect to the Slack RTM API"}
          {:error, error} ->
            {:error, error}
        end
      end

FYI I'm new to Erlang. Kindly help @jeremyong

@splashx
Copy link

splashx commented Jul 29, 2017

@jeshocarmel Did you solve this at the end? It looks like a proxy support in this websockets_client is required. We're hitting the same problem @ Elixir-Slack simply because websockets are not going through the proxy #bummer

dapdizzy pushed a commit to dapdizzy/websocket_client that referenced this issue Jul 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants