ryanwinchester / tmi.ex

Twitch Messaging Interface for Elixir.
Apache License 2.0
42 stars 7 forks source link

Deployment error with trying to use Fly.io #9

Closed talk2MeGooseman closed 2 years ago

talk2MeGooseman commented 2 years ago

I am curious if you have tried or know anyone that has deployed an app using TMI on fly.io?

I am experiencing this error when it trying to authenticate the user. It appears it connecting to IRC fine but when trying to auth it breaks down from there. I had double-checked the OAuth creds to make sure they are good. My only thought is that it's a networking issue with how fly.io forwards connections. Any ideas you might have will be appreciated.

Here is the error log during deployment.

2022-03-23T16:31:33.313 app[e88f93e1] lax [info] 16:31:33.313 [info] [Elixir.PomodoroAppBot.Bot.ChannelServer] STARTING with rate of 500ms...

2022-03-23T16:31:33.313 app[e88f93e1] lax [info] 16:31:33.313 [info] [Elixir.PomodoroAppBot.Bot.WhisperServer] STARTING @ 625ms...

2022-03-23T16:31:33.314 app[e88f93e1] lax [info] 16:31:33.313 [warning] Description: 'Authenticity is not established by certificate path validation'

2022-03-23T16:31:33.314 app[e88f93e1] lax [info] Reason: 'Option {verify, verify_peer} and cacertfile/cacerts is missing'

2022-03-23T16:31:33.405 app[e88f93e1] lax [info] 16:31:33.405 [info] [TMI.ConnectionServer] Connected to irc.chat.twitch.tv:6697...

2022-03-23T16:31:33.406 app[e88f93e1] lax [info] 16:31:33.405 [error] GenServer #PID<0.2576.0> terminating

2022-03-23T16:31:33.406 app[e88f93e1] lax [info] ** (ArgumentError) errors were found at the given arguments:

2022-03-23T16:31:33.406 app[e88f93e1] lax [info] * 1st argument: not an iodata term

2022-03-23T16:31:33.406 app[e88f93e1] lax [info] :erlang.iolist_to_iovec([['PASS ', :error], '\r\n'])

2022-03-23T16:31:33.406 app[e88f93e1] lax [info] (ssl 10.6.1) ssl.erl:843: :ssl.send/2

2022-03-23T16:31:33.406 app[e88f93e1] lax [info] (exirc 2.0.0) lib/exirc/client.ex:367: ExIRC.Client.handle_call/3

2022-03-23T16:31:33.406 app[e88f93e1] lax [info] (stdlib 3.17) gen_server.erl:721: :gen_server.try_handle_call/4

2022-03-23T16:31:33.406 app[e88f93e1] lax [info] (stdlib 3.17) gen_server.erl:750: :gen_server.handle_msg/6

2022-03-23T16:31:33.406 app[e88f93e1] lax [info] (stdlib 3.17) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

2022-03-23T16:31:33.406 app[e88f93e1] lax [info] Last message (from PomodoroAppBot.Bot.ConnectionServer): {:logon, :error, "gooseman_bot", "gooseman_bot", "gooseman_bot"}

2022-03-23T16:31:33.407 app[e88f93e1] lax [info] 16:31:33.406 [warning] [TMI.ConnectionServer] Terminating...

2022-03-23T16:31:33.407 app[e88f93e1] lax [info] 16:31:33.406 [error] GenServer PomodoroAppBot.Bot.ConnectionServer terminating

2022-03-23T16:31:33.407 app[e88f93e1] lax [info] ** (stop) exited in: GenServer.call(#PID<0.2576.0>, {:quit, "[TMI.ConnectionServer] Goodbye, cruel world."}, :infinity)

2022-03-23T16:31:33.407 app[e88f93e1] lax [info] ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started

2022-03-23T16:31:33.407 app[e88f93e1] lax [info] (elixir 1.13.2) lib/gen_server.ex:1030: GenServer.call/3

2022-03-23T16:31:33.407 app[e88f93e1] lax [info] (tmi 0.5.4) lib/tmi/client.ex:148: TMI.Client.quit/2

2022-03-23T16:31:33.407 app[e88f93e1] lax [info] (tmi 0.5.4) lib/tmi/connection_server.ex:121: TMI.ConnectionServer.terminate/2

2022-03-23T16:31:33.407 app[e88f93e1] lax [info] (stdlib 3.17) gen_server.erl:733: :gen_server.try_terminate/3

2022-03-23T16:31:33.407 app[e88f93e1] lax [info] (stdlib 3.17) gen_server.erl:918: :gen_server.terminate/10

2022-03-23T16:31:33.407 app[e88f93e1] lax [info] (stdlib 3.17) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

2022-03-23T16:31:33.407 app[e88f93e1] lax [info] Last message: {:connected, "irc.chat.twitch.tv", 6697}

2022-03-23T16:31:33.407 app[e88f93e1] lax [info] 16:31:33.407 [info] [Elixir.PomodoroAppBot.Bot.ChannelServer] STARTING with rate of 500ms...

2022-03-23T16:31:33.408 app[e88f93e1] lax [info] 16:31:33.407 [info] [Elixir.PomodoroAppBot.Bot.WhisperServer] STARTING @ 625ms...

2022-03-23T16:31:33.408 app[e88f93e1] lax [info] 16:31:33.408 [warning] Description: 'Authenticity is not established by certificate path validation'

2022-03-23T16:31:33.408 app[e88f93e1] lax [info] Reason: 'Option {verify, verify_peer} and cacertfile/cacerts is missing'

2022-03-23T16:31:33.496 app[e88f93e1] lax [info] 16:31:33.495 [info] [TMI.ConnectionServer] Connected to irc.chat.twitch.tv:6697...

2022-03-23T16:31:33.496 app[e88f93e1] lax [info] 16:31:33.496 [error] GenServer #PID<0.2589.0> terminating

2022-03-23T16:31:33.496 app[e88f93e1] lax [info] ** (ArgumentError) errors were found at the given arguments:

2022-03-23T16:31:33.496 app[e88f93e1] lax [info] * 1st argument: not an iodata term

2022-03-23T16:31:33.496 app[e88f93e1] lax [info] :erlang.iolist_to_iovec([['PASS ', :error], '\r\n'])

2022-03-23T16:31:33.496 app[e88f93e1] lax [info] (ssl 10.6.1) ssl.erl:843: :ssl.send/2

2022-03-23T16:31:33.496 app[e88f93e1] lax [info] (exirc 2.0.0) lib/exirc/client.ex:367: ExIRC.Client.handle_call/3

2022-03-23T16:31:33.497 app[e88f93e1] lax [info] (stdlib 3.17) gen_server.erl:721: :gen_server.try_handle_call/4

2022-03-23T16:31:33.497 app[e88f93e1] lax [info] (stdlib 3.17) gen_server.erl:750: :gen_server.handle_msg/6

2022-03-23T16:31:33.497 app[e88f93e1] lax [info] (stdlib 3.17) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

2022-03-23T16:31:33.497 app[e88f93e1] lax [info] Last message (from PomodoroAppBot.Bot.ConnectionServer): {:logon, :error, "gooseman_bot", "gooseman_bot", "gooseman_bot"}

2022-03-23T16:31:33.497 app[e88f93e1] lax [info] 16:31:33.496 [warning] [TMI.ConnectionServer] Terminating...

2022-03-23T16:31:33.497 app[e88f93e1] lax [info] 16:31:33.496 [error] GenServer PomodoroAppBot.Bot.ConnectionServer terminating

2022-03-23T16:31:33.497 app[e88f93e1] lax [info] ** (stop) exited in: GenServer.call(#PID<0.2589.0>, {:quit, "[TMI.ConnectionServer] Goodbye, cruel world."}, :infinity)

2022-03-23T16:31:33.497 app[e88f93e1] lax [info] ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started

2022-03-23T16:31:33.497 app[e88f93e1] lax [info] (elixir 1.13.2) lib/gen_server.ex:1030: GenServer.call/3

2022-03-23T16:31:33.497 app[e88f93e1] lax [info] (tmi 0.5.4) lib/tmi/client.ex:148: TMI.Client.quit/2

2022-03-23T16:31:33.497 app[e88f93e1] lax [info] (tmi 0.5.4) lib/tmi/connection_server.ex:121: TMI.ConnectionServer.terminate/2

2022-03-23T16:31:33.497 app[e88f93e1] lax [info] (stdlib 3.17) gen_server.erl:733: :gen_server.try_terminate/3

2022-03-23T16:31:33.497 app[e88f93e1] lax [info] (stdlib 3.17) gen_server.erl:918: :gen_server.terminate/10

2022-03-23T16:31:33.497 app[e88f93e1] lax [info] (stdlib 3.17) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

2022-03-23T16:31:33.497 app[e88f93e1] lax [info] Last message: {:connected, "irc.chat.twitch.tv", 6697}

2022-03-23T16:31:33.503 app[e88f93e1] lax [info] 16:31:33.503 [notice] Application pomodoro_app exited: shutdown

2022-03-23T16:31:33.779 app[e88f93e1] lax [info] Reaped child process with pid: 572 and signal: SIGUSR1, core dumped? false

2022-03-23T16:31:33.780 app[e88f93e1] lax [info] Reaped child process with pid: 574 and signal: SIGUSR1, core dumped? false

2022-03-23T16:31:35.029 app[e88f93e1] lax [info] {"Kernel pid terminated",application_controller,"{application_terminated,pomodoro_app,shutdown}"}

2022-03-23T16:31:35.030 app[e88f93e1] lax [info] Kernel pid terminated (application_controller) ({application_terminated,pomodoro_app,shutdown})

2022-03-23T16:31:35.172 app[e88f93e1] lax [info] Crash dump is being written to: erl_crash.dump...done

2022-03-23T16:31:35.785 app[e88f93e1] lax [info] Starting clean ud normally with code: 1

2022-03-23T16:31:35.789 app[e88f93e1] lax [info] Starting clean up. 
ryanwinchester commented 2 years ago

Looks like maybe password in config is not coming through:

:erlang.iolist_to_iovec([['PASS ', :error], '\r\n'])

Did you set the env var or typo it?

talk2MeGooseman commented 2 years ago

Through the power of trying random stuff till things work, I got it deployed. Did a couple of changes to how the configs are loaded and looks like it worked. Nothing to see here.