Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

populate products ran in error #1308

Closed
HobaiRiku opened this issue Jun 30, 2021 · 7 comments · Fixed by #1324
Closed

populate products ran in error #1308

HobaiRiku opened this issue Jun 30, 2021 · 7 comments · Fixed by #1324

Comments

@HobaiRiku
Copy link

Issue summary

flowing the getting-started in Start building your app run shopify populate products, then error.

Expected behavior

work well.

Actual behavior

Please include this information in any issues/report along with relevant logs
/usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/lib/shopify-cli/admin_api.rb:138:in `block in fetch_api_version': undefined method `[]' for nil:NilClass (NoMethodError)
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-kit/lib/cli/kit/util.rb:172:in `retry_after'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/lib/shopify-cli/admin_api.rb:139:in `fetch_api_version'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/lib/shopify-cli/admin_api.rb:117:in `api_client'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/lib/shopify-cli/admin_api.rb:42:in `block in query'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-kit/lib/cli/kit/util.rb:172:in `retry_after'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/lib/shopify-cli/admin_api.rb:43:in `query'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/lib/shopify-cli/admin_api/schema.rb:10:in `get'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/lib/shopify-cli/admin_api/populate_resource_command.rb:113:in `schema'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/lib/shopify-cli/admin_api/populate_resource_command.rb:102:in `input_options'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/lib/shopify-cli/admin_api/populate_resource_command.rb:33:in `call'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/lib/shopify-cli/admin_api/populate_resource_command.rb:17:in `call'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/lib/shopify-cli/command.rb:19:in `call'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:16:in `block (2 levels) in call'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:37:in `block (2 levels) in with_logging'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-ui/lib/cli/ui/stdout_router.rb:169:in `with_id'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:36:in `block in with_logging'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-ui/lib/cli/ui.rb:176:in `log_output_to'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:35:in `with_logging'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:15:in `block in call'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:45:in `block (2 levels) in with_traps'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:55:in `twrap'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:44:in `block in with_traps'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:55:in `twrap'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:43:in `with_traps'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-kit/lib/cli/kit/executor.rb:14:in `call'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/lib/shopify-cli/core/executor.rb:15:in `call'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/lib/shopify-cli/core/entry_point.rb:24:in `block in call'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/lib/shopify-cli/core/monorail.rb:32:in `log'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/lib/shopify-cli/core/entry_point.rb:23:in `call'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/bin/shopify:33:in `block in <top (required)>'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb:75:in `handle_abort'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb:21:in `call'
	from /usr/local/Cellar/shopify-cli/2.0.1/gems/shopify-cli-2.0.1/bin/shopify:32:in `<top (required)>'
	from /usr/local/bin/shopify:6:in `load'
	from /usr/local/bin/shopify:6:in `<main>'

Steps to reproduce the problem

  1. cd to dir
  2. shopify login --STORE=XXXXX
  3. shopify populate products

Reduced test case

The best way to get your bug fixed is to provide a reduced test case.

Specifications

  • App type:
  • Operating System: osx
  • Shell: zsh
  • Ruby version (ruby -v): ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
@mkevinosullivan
Copy link
Contributor

@HobaiRiku I've been unable to reproduce this. Please run DEBUG=1 shopify populate products and share the output.

@javimata
Copy link

DEBUG {"data"=>{"publicApiVersions"=>[{"handle"=>"2019-04", "displayName"=>"2019-04 (No compatible)"}, {"handle"=>"2019-07", "displayName"=>"2019-07 (No compatible)"}, {"handle"=>"2019-10", "displayName"=>"2019-10 (No compatible)"}, {"handle"=>"2020-01", "displayName"=>"2020-01 (No compatible)"}, {"handle"=>"2020-04", "displayName"=>"2020-04"}, {"handle"=>"2020-07", "displayName"=>"2020-07"}, {"handle"=>"2020-10", "displayName"=>"2020-10"}, {"handle"=>"2021-01", "displayName"=>"2021-01"}, {"handle"=>"2021-04", "displayName"=>"2021-04 (Más reciente)"}, {"handle"=>"2021-07", "displayName"=>"2021-07 (Versión candidata)"}, {"handle"=>"unstable", "displayName"=>"unstable (Inestable)"}]}, "extensions"=>{"cost"=>{"requestedQueryCost"=>1, "actualQueryCost"=>1, "throttleStatus"=>{"maximumAvailable"=>1000.0, "currentlyAvailable"=>999, "restoreRate"=>50.0
This command ran with ID: 82669

@mkevinosullivan
Copy link
Contributor

@javimata Thank you. So the problem (with the CLI) is that it looks through that piece of JSON for the api version whose display name has "Latest" beside it. In the case above, that's "2021-04 (Más reciente)" but the CLI is only searching for Latest, not any translations, which obviously is a bug.

While we look to fix this across all our supported languages, a quick workaround for you would be to change the language of your partner account profile to English - then this piece of code will work and populate products should work too.

Thank you for bringing this to our attention.

@javimata
Copy link

Great, change the language to english work fine... i used spanish before, thanks so much

@HobaiRiku
Copy link
Author

work

@mkevinosullivan
Copy link
Contributor

@javimata @HobaiRiku if you wish to change the language of the partner account back to your preferred language, v2.0.2 of the CLI was just released which includes the fix mentioned above (#1324).

It would be great if you could confirm that the CLI works with your partner account set to your preferred language.

@HobaiRiku
Copy link
Author

@mkevinosullivan thanks! it works well when i change to Chinese.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants