cli icon indicating copy to clipboard operation
cli copied to clipboard

[Bug]: shopify theme pull & dev commands return blank results

Open hectorcymbiotika opened this issue 1 year ago • 13 comments

Please confirm that you have:

  • [X] Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • [X] Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Theme

Expected behavior

When running shopify theme pull --store=shop.myshopify.com I should have gotten a list of all themes that are currently connected to my store and visible in the Shopify admin.

When I run shopify theme dev I should be able to spin up and preview the 3 different local environments (i.e. local theme preview, editor and sharable theme).

Actual behavior

Running shopify theme pull --store=shop.myshopify.com causes the request to hang and no theme options are returned.

The shopify theme dev returns my 3 preview links. However my theme is not being recognized and all previews return error messages.

Screenshot 2024-07-26 at 10 30 44 PM

for the error regarding the missing files I have checked and confirmed that they exist in my theme directory

Screenshot 2024-07-26 at 10 30 51 PM

Screenshot 2024-07-26 at 22-30-58 CYMBIOTIKA · Customize Development (74ab00-CHONKER-MD) · Shopify Plus

Verbose output

To my knowledge I am not using npm, pnpm or yarn.

Reproduction steps

  1. run `shopify theme pull --store=shop.myshopify.com
  2. run shopify theme dev

Operating System

Mac OS Sonoma 14.5

Shopify CLI version (check your project's package.json if you're not sure)

3.64.1

Shell

zsh

Node version (run node -v if you're not sure)

v20.14.0

What language and version are you using in your application?

3.3.4

hectorcymbiotika avatar Jul 27 '24 05:07 hectorcymbiotika

I'm facing the same issue. The error is this one (on verbose) DEBUG timeout in GET https://store.myshopify.com/admin/api/unstable/themes.json

Operating System Mac OS Sonoma 14.3.1

Shopify CLI version (check your project's package.json if you're not sure) 3.64.1

Shell zsh

Node version (run node -v if you're not sure) v22.5.1

What language and version are you using in your application? 3.3.3

majovanilla avatar Jul 29 '24 16:07 majovanilla

👋🏻 Hey @hectorcymbiotika, thanks for the report. Would you be able to run the command with --verbose at the end and provide the output here? Thanks so much.

@majovanilla If you could do it too, that would be helpful

lukeh-shopify avatar Aug 01 '24 23:08 lukeh-shopify

Hi @lukeh-shopify, I have the same issue too.

Operating System MacOS Monterey 12.5.1

Shopify CLI version (check your project's package.json if you're not sure) 3.64.1

Shell zsh

Node version (run node -v if you're not sure) v20.16.0

What language and version are you using in your application? ruby 3.3.4

Verbose output, right where it fails:

2024-08-02T14:36:59.454Z: 
Running system process:

  · Command: bundle exec ruby /Users/myuser/.nvm/versions/node/v20.16.0/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify theme serve /Users/myuser/myproject --live-reload hot-reload --theme 123412341234 --overwrite-json undefined
  · Working directory: /Users/myuser/myproject

/Users/myuser/.nvm/versions/node/v20.16.0/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:15: warning: observer was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add observer to your Gemfile or gemspec.
/Users/myuser/.nvm/versions/node/v20.16.0/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:15: warning: base64 was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec.
DEBUG timeout in GET https://mystore.myshopify.com/admin/api/unstable/themes.json
DEBUG timeout in GET https://mystore.myshopify.com/admin/api/unstable/themes.json
DEBUG timeout in GET https://mystore.myshopify.com/admin/api/unstable/themes.json
DEBUG timeout in GET https://mystore.myshopify.com/admin/api/unstable/themes.json
✗ An unexpected error occurred.

Please note that command shopify theme push -d doesn't fail. Just shopify theme dev.

stephatcoldsmoke avatar Aug 02 '24 14:08 stephatcoldsmoke

Same as @stephatcoldsmoke I don't have a problem when running shopify theme push. But when I run shopify theme dev or shopify theme pull get this: Verbose `2024-08-02T16:47:31.254Z: Running system process: · Command: /opt/homebrew/opt/ruby/bin/ruby -v · Working directory: /Users/myuser/Documents/Shopify/My Store/theme_export__mystore-com-mystore

2024-08-02T16:47:31.262Z: Running system process: · Command: /opt/homebrew/opt/ruby/bin/bundle -v · Working directory: /Users/myuser/Documents/Shopify/My Store/theme_export__mystore-com-mystore

2024-08-02T16:47:31.345Z: Reading the content of file at /opt/homebrew/Cellar/shopify-cli/3.64.1/libexec/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/Gemfile... 2024-08-02T16:47:31.346Z: Running system process: · Command: /opt/homebrew/opt/ruby/bin/bundle install · Working directory: /opt/homebrew/Cellar/shopify-cli/3.64.1/libexec/lib/node_modules/@shopify/cli/dist/assets/cli-ruby

2024-08-02T16:47:31.540Z: Running system process: · Command: /opt/homebrew/opt/ruby/bin/bundle exec /opt/homebrew/opt/ruby/bin/ruby /opt/homebrew/Cellar/shopify-cli/3.64.1/libexec/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify theme serve /Users/myuser/Documents/Shopify/My Store/theme_export__mystore-com-mystore --live-reload hot-reload --theme 129274511427 --overwrite-json undefined · Working directory: /Users/myuser/Documents/Shopify/My Store/theme_export__mystore-com-mystore

/opt/homebrew/Cellar/shopify-cli/3.64.1/libexec/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:15: warning: observer was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add observer to your Gemfile or gemspec. /opt/homebrew/Cellar/shopify-cli/3.64.1/libexec/lib/node_modules/@shopify/cli/dist/assets/cli-ruby/bin/shopify:15: warning: base64 was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec. DEBUG timeout in GET https://mystore.myshopify.com/admin/api/unstable/themes.json DEBUG timeout in GET https://mystore.myshopify.com/admin/api/unstable/themes.json DEBUG timeout in GET https://mystore.myshopify.com/admin/api/unstable/themes.json DEBUG timeout in GET https://mystore.myshopify.com/admin/api/unstable/themes.json ✗ An unexpected error occurred. To submit an issue include the stack trace. To print the stack trace, add the environment variable SHOPIFY_CLI_STACKTRACE=1.`

majovanilla avatar Aug 02 '24 17:08 majovanilla

Hi guys, I hope this helps. I could partially figure it out running:

  1. brew update
  2. brew doctor
  3. brew upgrade
  4. and restarting my laptop.

FYI: This issue seems to be related to the new "Sonoma v14~" update because it started on Friday when I installed it. Even though it's not fixed, because there still exists an annoyance delay and intermittence, at least I'm able to work again. Waiting for a check and response on this, thanks.

jmanzo avatar Aug 05 '24 11:08 jmanzo

Hi @jmanzo , I don't have Sonoma and I still had the issue - I think it might be related to Ruby failing to load observer and base64 since the standard library updates of Ruby version 3.3.0, which is the same error @majovanilla and I have on our logs.

Hi @lukeh-shopify just updated the CLI to 3.65.0 and the issue still happens.

stephatcoldsmoke avatar Aug 05 '24 13:08 stephatcoldsmoke

Hi @jmanzo thanks for the suggestion... I tried it and it didn't work. What ruby version do you have installed? To rule out what @stephatcoldsmoke just said. Maybe downgrading could work.

I also upgraded to CLI 3.65.1 and nothing @lukeh-shopify

majovanilla avatar Aug 05 '24 17:08 majovanilla

Hey @stephatcoldsmoke @majovanilla and @jmanzo, thanks for the detailed responses! There are no known issues with the latest CLI and Ruby versions. I've tried both on my end and can't reproduce the error you're seeing. It makes me think there's something wrong on the client side, given it was solved for @jmanzo when 'resetting' his environment. Does running the brew commands he has listed and restarting your machine help?

Also given the timeout lines in your verbose logs, I'm wondering if there is a potential networking or auth issue going on. Just confirming that running shopify auth logout and reauthenticating doesn't solve the issue for you?

If all else fails feel free to downgrade to an earlier version of Ruby and see if it solves the issue

lukeh-shopify avatar Aug 06 '24 15:08 lukeh-shopify

Hi @lukeh-shopify and @stephatcoldsmoke,

I found a better solution for the issue we discussed earlier. The problem reappeared the day after the previous update. Upon investigation, I discovered that the node version (v18.6) needed an update. Using nvm, I upgraded to node version v22, and everything started working again.

However, I'm now facing a new issue: when I modify any file, it takes over a minute to sync with Shopify. Additionally, I keep getting prompts to report the issue to Shopify support, to which I've responded 'yes' multiple times without receiving any response.

Have you got any other light about this guys?

jmanzo avatar Aug 06 '24 17:08 jmanzo

👋 thanks for reporting @jmanzo , can you share the verbose logs for this new issue? if you're still getting prompts to report to Shopify i wonder if a timeout is still happening during API calls

mgmanzella avatar Aug 07 '24 16:08 mgmanzella

also to confirm does this issue match what you're experiencing @jmanzo ?

mgmanzella avatar Aug 07 '24 16:08 mgmanzella

@jmanzo did you install Shopify CLI using node or Homebrew?

majovanilla avatar Aug 07 '24 20:08 majovanilla

It is exactly the same issue @mgmanzella, thanks for sharing. I'll be helping and commenting on that issue as well. Still have the same issue. I tried removing everything shopify-cli related on my computer and re-installed it. But no luck

jmanzo avatar Aug 08 '24 01:08 jmanzo

Thank you for reporting, everyone!

I'm closing this issue as it was associated with an instability that transcends the Shopify CLI.

For anyone still facing this issue today, and using Shopify CLI 3.65.3 or greater, please create a new issue with your verbose logs, because we are likely dealing with a new scenario.

Thanks again for reporting, everyone!

karreiro avatar Aug 19 '24 06:08 karreiro

Hi everyone... I could found a solution to the issue here. It turns out it was my connection. I was using ethernet and had to change my TC/IP -> IPv6 to Link local only instead of Automatically.

majovanilla avatar Aug 22 '24 19:08 majovanilla

Thank you so much for sharing your solution @majovanilla, confirming it worked for me as well.

stephatcoldsmoke avatar Aug 27 '24 07:08 stephatcoldsmoke