ShopifyApp omniauth-shopify-oauth2 error on heroku

PurpleMamba
Shopify Partner
89 1 8

I have a problem with the Shopify omniauth-shopify-oauth2 gem in my app. It works fine in my local environment but on heroku it returns a 500 error.

Here is what I have in my logs:

2017-08-07T17:58:11.341606+00:00 app[web.1]: I, [2017-08-07T17:58:11.341557 #6]  INFO -- omniauth: (shopify) Callback phase initiated.
2017-08-07T17:58:11.342680+00:00 app[web.1]: TypeError (no implicit conversion of nil into String):
2017-08-07T17:58:11.342691+00:00 app[web.1]:   
2017-08-07T17:58:11.342737+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/omniauth-shopify-oauth2-1.2.0/lib/omniauth/strategies/shopify.rb:85:in `hmac_sign'
2017-08-07T17:58:11.342737+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/omniauth-shopify-oauth2-1.2.0/lib/omniauth/strategies/shopify.rb:60:in `valid_signature?'
2017-08-07T17:58:11.342736+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/omniauth-shopify-oauth2-1.2.0/lib/omniauth/strategies/shopify.rb:85:in `hexdigest'
2017-08-07T17:58:11.342738+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/omniauth-shopify-oauth2-1.2.0/lib/omniauth/strategies/shopify.rb:111:in `callback_phase'
2017-08-07T17:58:11.342738+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:230:in `callback_call'
2017-08-07T17:58:11.342739+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:187:in `call!'
2017-08-07T17:58:11.342739+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:in `call'
2017-08-07T17:58:11.342740+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/builder.rb:63:in `call'
2017-08-07T17:58:11.342741+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/etag.rb:25:in `call'
2017-08-07T17:58:11.342741+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/conditional_get.rb:25:in `call'
2017-08-07T17:58:11.342742+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/head.rb:12:in `call'
2017-08-07T17:58:11.342742+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:232:in `context'
2017-08-07T17:58:11.342743+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/session/abstract/id.rb:226:in `call'
2017-08-07T17:58:11.342744+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.5/lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
2017-08-07T17:58:11.342743+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.5/lib/action_dispatch/middleware/cookies.rb:613:in `call'
2017-08-07T17:58:11.342744+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.5/lib/active_support/callbacks.rb:97:in `__run_callbacks__'
2017-08-07T17:58:11.342745+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.5/lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
2017-08-07T17:58:11.342745+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.5/lib/active_support/callbacks.rb:90:in `run_callbacks'
2017-08-07T17:58:11.342745+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.5/lib/action_dispatch/middleware/callbacks.rb:36:in `call'
2017-08-07T17:58:11.342746+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.5/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
2017-08-07T17:58:11.342746+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.5/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
2017-08-07T17:58:11.342746+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.5/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
2017-08-07T17:58:11.342747+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/railties-5.0.5/lib/rails/rack/logger.rb:36:in `call_app'
2017-08-07T17:58:11.342747+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/railties-5.0.5/lib/rails/rack/logger.rb:24:in `block in call'
2017-08-07T17:58:11.342747+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.5/lib/active_support/tagged_logging.rb:69:in `block in tagged'
2017-08-07T17:58:11.342748+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.5/lib/active_support/tagged_logging.rb:26:in `tagged'
2017-08-07T17:58:11.342748+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.5/lib/active_support/tagged_logging.rb:69:in `tagged'
2017-08-07T17:58:11.342748+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/railties-5.0.5/lib/rails/rack/logger.rb:24:in `call'
2017-08-07T17:58:11.342749+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.5/lib/action_dispatch/middleware/request_id.rb:24:in `call'
2017-08-07T17:58:11.342749+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/method_override.rb:22:in `call'
2017-08-07T17:58:11.342750+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.5/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2017-08-07T17:58:11.342749+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/runtime.rb:22:in `call'
2017-08-07T17:58:11.342750+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.5/lib/action_dispatch/middleware/executor.rb:12:in `call'
2017-08-07T17:58:11.342750+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.5/lib/action_dispatch/middleware/static.rb:136:in `call'
2017-08-07T17:58:11.342751+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call'
2017-08-07T17:58:11.342751+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/railties-5.0.5/lib/rails/engine.rb:522:in `call'
2017-08-07T17:58:11.342752+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/configuration.rb:224:in `call'
2017-08-07T17:58:11.342752+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/server.rb:602:in `handle_request'
2017-08-07T17:58:11.342753+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/server.rb:299:in `block in run'
2017-08-07T17:58:11.342752+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/server.rb:435:in `process_client'
2017-08-07T17:58:11.342753+00:00 app[web.1]: vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/thread_pool.rb:120:in `block in spawn_thread'

I've been trying to find the issue, but so far I've had no luck. I don't see how the hmac could be nil. Any ideas?

0 Likes
PurpleMamba
Shopify Partner
89 1 8

*bump*

0 Likes
PurpleMamba
Shopify Partner
89 1 8

Can anyone help with this issue?

0 Likes
sshc
Shopify Partner
1 0 0

@PurpleMamba  did you manage to find a solution for this? 

0 Likes