After upgrade shopify_api gem from 7.0.2 to 7.1.0.
All my ShopifyApp::WebhooksManagerJob raise error:
ShopifyAPI::ApiVersion::UnknownVersion (ShopifyAPI::ApiVersion::NullVersion is not in the defined version set: unstable, 2019-04, 2019-07, 2019-10):
2019-09-03T08:17:25.087808+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/shopify_api-7.1.0/lib/shopify_api/api_version.rb:17:in `block in coerce_to_version'
2019-09-03T08:17:25.087810+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/shopify_api-7.1.0/lib/shopify_api/api_version.rb:16:in `fetch'
2019-09-03T08:17:25.087811+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/shopify_api-7.1.0/lib/shopify_api/api_version.rb:16:in `coerce_to_version'
2019-09-03T08:17:25.087813+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/shopify_api-7.1.0/lib/shopify_api/session.rb:130:in `api_version='
2019-09-03T08:17:25.087814+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/shopify_api-7.1.0/lib/shopify_api/session.rb:89:in `initialize'
2019-09-03T08:17:25.087815+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/shopify_api-7.1.0/lib/shopify_api/session.rb:83:in `new'
2019-09-03T08:17:25.087817+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/shopify_api-7.1.0/lib/shopify_api/session.rb:83:in `extract_current_session'
2019-09-03T08:17:25.087818+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/shopify_api-7.1.0/lib/shopify_api/session.rb:30:in `with_session'
2019-09-03T08:17:25.087819+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/shopify_api-7.1.0/lib/shopify_api/session.rb:26:in `temp'
2019-09-03T08:17:25.087821+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/shopify_app-11.0.1/lib/shopify_app/jobs/webhooks_manager_job.rb:10:in `perform'
2019-09-03T08:17:25.087822+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activejob-5.2.3/lib/active_job/execution.rb:39:in `block in perform_now'
2019-09-03T08:17:25.087823+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:109:in `block in run_callbacks'
2019-09-03T08:17:25.087825+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/i18n-1.6.0/lib/i18n.rb:297:in `with_locale'
2019-09-03T08:17:25.087826+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activejob-5.2.3/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
2019-09-03T08:17:25.087828+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:118:in `instance_exec'
2019-09-03T08:17:25.087829+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
2019-09-03T08:17:25.087830+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activejob-5.2.3/lib/active_job/logging.rb:26:in `block (4 levels) in <module:Logging>'
2019-09-03T08:17:25.087832+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/notifications.rb:168:in `block in instrument'
2019-09-03T08:17:25.087833+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
2019-09-03T08:17:25.087834+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/notifications.rb:168:in `instrument'
2019-09-03T08:17:25.087836+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activejob-5.2.3/lib/active_job/logging.rb:25:in `block (3 levels) in <module:Logging>'
2019-09-03T08:17:25.087837+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activejob-5.2.3/lib/active_job/logging.rb:46:in `block in tag_logger'
2019-09-03T08:17:25.087838+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/tagged_logging.rb:71:in `block in tagged'
2019-09-03T08:17:25.087840+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/tagged_logging.rb:28:in `tagged'
2019-09-03T08:17:25.087856+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/tagged_logging.rb:71:in `tagged'
2019-09-03T08:17:25.087862+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activejob-5.2.3/lib/active_job/logging.rb:46:in `tag_logger'
2019-09-03T08:17:25.087863+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activejob-5.2.3/lib/active_job/logging.rb:22:in `block (2 levels) in <module:Logging>'
2019-09-03T08:17:25.087865+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:118:in `instance_exec'
2019-09-03T08:17:25.087866+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
2019-09-03T08:17:25.087867+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:136:in `run_callbacks'
2019-09-03T08:17:25.087869+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activejob-5.2.3/lib/active_job/execution.rb:38:in `perform_now'
2019-09-03T08:17:25.087870+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activejob-5.2.3/lib/active_job/execution.rb:24:in `block in execute'
2019-09-03T08:17:25.087871+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:109:in `block in run_callbacks'
2019-09-03T08:17:25.087879+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activejob-5.2.3/lib/active_job/railtie.rb:28:in `block (4 levels) in <class:Railtie>'
2019-09-03T08:17:25.087880+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/execution_wrapper.rb:87:in `wrap'
2019-09-03T08:17:25.087881+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/reloader.rb:73:in `block in wrap'
2019-09-03T08:17:25.087883+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/execution_wrapper.rb:83:in `wrap'
2019-09-03T08:17:25.087884+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/reloader.rb:72:in `wrap'
2019-09-03T08:17:25.087885+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activejob-5.2.3/lib/active_job/railtie.rb:27:in `block (3 levels) in <class:Railtie>'
2019-09-03T08:17:25.087887+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:118:in `instance_exec'
2019-09-03T08:17:25.087888+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
2019-09-03T08:17:25.087889+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/callbacks.rb:136:in `run_callbacks'
2019-09-03T08:17:25.087891+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activejob-5.2.3/lib/active_job/execution.rb:22:in `execute'
2019-09-03T08:17:25.087892+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activejob-5.2.3/lib/active_job/queue_adapters/sidekiq_adapter.rb:42:in `perform'
2019-09-03T08:17:25.087893+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:192:in `execute_job'
2019-09-03T08:17:25.087895+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:165:in `block (2 levels) in process'
2019-09-03T08:17:25.087896+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:128:in `block in invoke'
2019-09-03T08:17:25.087898+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:133:in `invoke'
2019-09-03T08:17:25.087899+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:164:in `block in process'
2019-09-03T08:17:25.087900+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:137:in `block (6 levels) in dispatch'
2019-09-03T08:17:25.087902+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/job_retry.rb:109:in `local'
2019-09-03T08:17:25.087903+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:136:in `block (5 levels) in dispatch'
2019-09-03T08:17:25.087905+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/rails.rb:43:in `block in call'
2019-09-03T08:17:25.087906+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/execution_wrapper.rb:87:in `wrap'
2019-09-03T08:17:25.087907+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/reloader.rb:73:in `block in wrap'
2019-09-03T08:17:25.087908+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/execution_wrapper.rb:87:in `wrap'
2019-09-03T08:17:25.087910+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/activesupport-5.2.3/lib/active_support/reloader.rb:72:in `wrap'
2019-09-03T08:17:25.087911+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/rails.rb:42:in `call'
2019-09-03T08:17:25.087912+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:132:in `block (4 levels) in dispatch'
2019-09-03T08:17:25.087914+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:250:in `stats'
2019-09-03T08:17:25.087915+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:127:in `block (3 levels) in dispatch'
2019-09-03T08:17:25.087916+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/job_logger.rb:8:in `call'
2019-09-03T08:17:25.087928+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:126:in `block (2 levels) in dispatch'
2019-09-03T08:17:25.087930+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/job_retry.rb:74:in `global'
2019-09-03T08:17:25.087931+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:125:in `block in dispatch'
2019-09-03T08:17:25.087932+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/logging.rb:48:in `with_context'
2019-09-03T08:17:25.087933+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/logging.rb:42:in `with_job_hash_context'
2019-09-03T08:17:25.087935+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:124:in `dispatch'
2019-09-03T08:17:25.087936+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:163:in `process'
2019-09-03T08:17:25.087937+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:83:in `process_one'
2019-09-03T08:17:25.087939+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:71:in `run'
2019-09-03T08:17:25.087940+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/util.rb:16:in `watchdog'
2019-09-03T08:17:25.087941+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.4.0/gems/sidekiq-5.2.7/lib/sidekiq/util.rb:25:in `block in safe_thread'
Just to clarify, you have set your API version as stated in the readme and the error is still thrown?
If it is still thrown you should try setting the api version directly on the ShopifyApi as a work around and we will get that fixed soon
Just to clarify, you have set your API version as stated in the readme and the error is still thrown?
If it is still thrown you should try setting the api version directly on the ShopifyApi as a work around and we will get that fixed soon
Yes Tanema, My project work fine for a 1 year, and that error raise on the lastest deployment to heroku, because my gemfile doesn't add specific version for shopify_api gem so Heroku automatic update it to newest version. I temporary fixed it by downgraded shopify_api gem to '7.0.2'
I was seeing the same issue. I think the desirable behavior is for shopify_app to set ShopifyAPI::Base.api_version once initialized. Right now, authenticated controllers have api_version set only as a byproduct of calling ShopifyAPI::Base.activate_session. Attempting to make ShopifyAPI calls from a worker (or console) will raise the following:
ShopifyAPI::ApiVersion::UnknownVersion: ShopifyAPI::ApiVersion::NullVersion is not in the defined version set: unstable, 2019-04, 2019-07, 2019-10
As a workaround, I put the ShopifyAPI::Base.api_version = '...' call in my shopify_app initializer.
I have confirmed that this is broken. It is also very likely that 7.1 has broken the app generator as well so we will be fixing it as soon as possible.
We will be preventing the current gem https://github.com/Shopify/shopify_app/pull/789 and will be fixing how the shopifyapp configures shopifyapi after that. We just want to get a patch out now so peoples projects are not broken
Hey @tanema 馃憢 Any updates on this?
We shipped a fix https://github.com/Shopify/shopify_app/pull/789 that would make sure that this does not happen. Please update to 11.0.2