Closed matthewjamesr closed 5 years ago
Check first to see if this could be related to this issue patched in ruby recently that broke puma: https://www.ruby-lang.org/en/news/2019/03/15/ruby-2-5-5-released/
I don't have any other clues to follow but the "unknown error" seems like it could be that type of issue.
I got a little further:
/home/theagiledev/.rvm/gems/ruby-2.5.1/gems/facebook-messenger-1.1.2/lib/facebook/messenger/subscriptions.rb:74:in `raise_errors': An active access token must be used to query information about the current user. (Facebook::Messenger::Subscriptions::Error)
I do have a active access token.
@matthewjamesr this is due to an issue with Rubotnic.subscribe
the FB API expects the parameter subscribed_fields
to be set, wich is not the case. I will create a PR, but for now you can just comment out Rubotnik.subscribe(ENV['ACCESS_TOKEN'])
in bot/bot.rb
and it will work.
This is occurring with a fresh install.
theagiledev@theagiledev-linux:~/projects/orderbot$ heroku local [OKAY] Loaded ENV .env File as KEY=VALUE Format 7:34:59 PM web.1 | [17957] Puma starting in cluster mode... 7:34:59 PM web.1 | [17957] Version 3.12.0 (ruby 2.5.1-p57), codename: Llamas in Pajamas 7:34:59 PM web.1 | [17957] Min threads: 5, max threads: 5 7:34:59 PM web.1 | [17957] Environment: development 7:34:59 PM web.1 | [17957] Process workers: 1 7:34:59 PM web.1 | [17957] * Preloading application 7:34:59 PM web.1 | [17957] ! Unable to load application: Facebook::Messenger::Subscriptions::Error: An unknown error has occurred. 7:34:59 PM web.1 | /home/theagiledev/.rvm/gems/ruby-2.5.1/gems/facebook-messenger-1.1.2/lib/facebook/messenger/subscriptions.rb:74:in'
7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/builder.rb:55:in '
7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/builder.rb:49:in '
7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in '
[DONE] Killing all processes with signal SIGINT
raise_errors' 7:34:59 PM web.1 | : 7:34:59 PM web.1 | An unknown error has occurred. 7:34:59 PM web.1 | ( 7:34:59 PM web.1 | Facebook::Messenger::Subscriptions::Error 7:34:59 PM web.1 | ) 7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/gems/facebook-messenger-1.1.2/lib/facebook/messenger/subscriptions.rb:36:in
subscribe' 7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/gems/rubotnik-0.2.2/lib/rubotnik.rb:48:insubscribe' 7:34:59 PM web.1 | from /home/theagiledev/projects/orderbot/bot/bot.rb:6:in
<top (required)>' 7:34:59 PM web.1 | from config.ru:5:inrequire_relative' 7:34:59 PM web.1 | from config.ru:5:in
block ininstance_eval' 7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/builder.rb:55:in
initialize' 7:34:59 PM web.1 | from config.ru:innew' 7:34:59 PM web.1 | from config.ru:in
eval' 7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/builder.rb:49:in
new_from_string' 7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/builder.rb:40:inparse_file' 7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/gems/puma-3.12.0/lib/puma/configuration.rb:318:in
load_rackup' 7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/gems/puma-3.12.0/lib/puma/configuration.rb:243:inapp' 7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/gems/puma-3.12.0/lib/puma/runner.rb:145:in
load_and_bind' 7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/gems/puma-3.12.0/lib/puma/cluster.rb:410:inrun' 7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/gems/puma-3.12.0/lib/puma/launcher.rb:184:in
run' 7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/gems/puma-3.12.0/lib/puma/cli.rb:78:inrun' 7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/gems/puma-3.12.0/bin/puma:10:in
<top (required)>' 7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/bin/puma:23:inload' 7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/bin/puma:23:in
eval' 7:34:59 PM web.1 | from /home/theagiledev/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:24:in