Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: shopify theme dev is losing track of the development theme #3715

Closed
karreiro opened this issue Apr 15, 2024 · 17 comments
Closed

[Bug]: shopify theme dev is losing track of the development theme #3715

karreiro opened this issue Apr 15, 2024 · 17 comments
Assignees
Labels
Area: @shopify/theme @shopify/theme package issues blocking highest severity for theme related bug Type: Bug Something isn't working

Comments

@karreiro
Copy link
Contributor

karreiro commented Apr 15, 2024

In which of these areas are you experiencing a problem?

Theme

Expected behavior

When users run shopify theme dev, a development theme should be created and assign as [yours] (your development theme should never be re-assigned).

Actual behavior

When users run shopify theme dev, the development theme seems to be re-assigned and in some contexts the CLI is election even non-development themes.

@karreiro karreiro added Type: Bug Something isn't working Area: @shopify/theme @shopify/theme package issues labels Apr 15, 2024
@JamiesonRoberts
Copy link

This has been a huge pain all day today. Not sure what's going on, but its made it basically impossible to reliably build things with the session re-assignment happening

@andre-ani
Copy link

andre-ani commented Apr 15, 2024

Getting the same issue, started a few days ago. This problem has come up in the past and was resolved with an update. It's really frustrating. When running shopify theme dev my dev code is being run with the primary published theme, instead of the development theme.

The only way I can keep working is to do so within the theme editor.

@DreamyTalesPAN
Copy link

Still having the same issue since a couple of days. Tried to delete the development theme with shopify theme --delete and re-run shopify theme dev in an incognito tab but no success so far.

@sameerxanand
Copy link

Here's how I'm working around it:

shopify theme list

Find your development theme in the list

shopify theme delete -t {ID of your development theme}

Run shopify theme dev and it should use a new development theme instead of the live theme.


Agree this whole issue has been a pain in the a**. Shopify pushed a new CLI update today which now shows a new warning:

Warning: Could not find ts-node at /opt/homebrew/Cellar/shopify-cli/3.59.0/libexec/lib/node_modules/@shopify/cli/dist/index-e6f8190d.js. Please ensure that ts-node is a devDependency. Falling back to compiled source.

@davidhollenbeckx
Copy link

@karreiro emailed you a few examples of this - came here to find you've already flagged it!

appreciate all your help here

@mgmanzella
Copy link
Contributor

another example: #3794

@karreiro
Copy link
Contributor Author

Thank you for sharing that context in the email, @davidhollenbeckx! That not only helps the team understand the issue itself, but it also helps us understand how developers use CLI in their workflows.

For anyone experiencing this problem, you can adopt the following steps as a temporary workaround:

  • Run shopify theme push -u -t <name_of_your_dev_theme> to create a new theme
  • Run shopify theme dev -t <name_of_your_dev_theme> to force the CLI to use that specific theme in the development server

As soon as we get this fixed, we will update this issue.

Thanks everyone for reporting this problem.

@karreiro
Copy link
Contributor Author

Thank you, everyone, for reporting this problem and providing details.

This issue has been fixed by #3809, so upgrading to the latest release (3.59.2) fixes this problem.

@nboliver-ventureweb
Copy link

@karreiro Using v3.59.2, I am continuing to see theme mismatch problems. Not sure if this is the same issue or something new. The correct dev theme is usually loaded when first running shopify theme dev; however, when refreshing the page, it then swaps between the live theme and the dev theme on each subsequent reload.
The full command being used is: shopify theme dev --live-reload full-page.
I can provide a video or more details via DM, if that's helpful.

@nboliver-ventureweb
Copy link

@karreiro This is definitely not fixed. See here: https://shopifypartners.slack.com/archives/CKQTKDZV2/p1714579081291059

@davidhollenbeckx
Copy link

seeing this issue again with version 3.64.1 and 3.64 @karreiro

step 1: shopify theme dev
step 2: click 192...ip preview
step 3: refresh
step 4: surprise! it's the live theme

@jamesmengo jamesmengo reopened this Jul 22, 2024
@lukeh-shopify
Copy link
Contributor

Hi @nboliver-ventureweb and @davidhollenbeckx. Thanks for reporting this issue, we need some more information in order to investigate further. We have tried to recreate it on our end but have not been able to reproduce the bug. Please see the screen recording showing the latest version of the CLI working as expected:

dev.mp4
  1. Could you please share your CLI output with the --verbose flag when you encounter this bug?
  2. If possible, could you please show a screen recording so we can see what steps you are taking when you encounter this bug?

If anyone else is having this issue, feel free to provide the requested information as well. Thanks in advance

@tpage99
Copy link

tpage99 commented Jul 26, 2024

@lukeh-shopify definitely still an issue. Deleting the dev theme and starting fresh seems to fix it for a while at least.

Shopify CLI Version 3.64.1

CLI Output

2024-07-26T13:25:06.782Z: Running command theme dev
2024-07-26T13:25:06.794Z: Ensuring that the user is authenticated with the Theme API with the following scopes:
[]

2024-07-26T13:25:06.794Z: Ensuring that the user is authenticated with the Admin API with the following scopes for the store xxxx.myshopify.com:
[]

2024-07-26T13:25:06.794Z: Getting session store...
2024-07-26T13:25:06.796Z: Validating existing session against the scopes:
[
  "openid",
  "https://api.shopify.com/auth/shop.admin.graphql",
  "https://api.shopify.com/auth/shop.admin.themes",
  "https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
  "https://api.shopify.com/auth/shop.storefront-renderer.devtools",
  "https://api.shopify.com/auth/partners.app.cli.access",
  "https://api.shopify.com/auth/destinations.readonly"
]
For applications:
{
  "adminApi": {
    "scopes": [],
    "storeFqdn": "xxxx.myshopify.com"
  }
}

2024-07-26T13:25:06.796Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2024-07-26T13:25:06.797Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
 - User-Agent: Shopify CLI; v=3.64.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-07-26T13:25:07.042Z: Request to https://accounts.shopify.com/oauth/introspection completed in 238 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"5f4fae0e4423fe17b927f052424be550"
 - x-request-id: c5425019-8124-439c-9690-464bdbf52fd9-1722000306

2024-07-26T13:25:07.049Z: The identity token is valid: true
2024-07-26T13:25:07.049Z:
The validation of the token for application/identity completed with the following results:
- It's expired: false
- It's invalid in identity: false

2024-07-26T13:25:07.049Z: The current session is valid but needs refresh. Refreshing...
2024-07-26T13:25:07.050Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=refresh_token&access_token=atkn_CjQIqMaOtQYQyP6OtQZSJggBEhDS-rQLM09CZbnWPtfNVqgRGhCnYuSO0lxJU6m5lfXrJuhCEkBj89P1alUdNojliMbneDm0RrTfd4aD9SHT5tfJV6o9l5CcGlK2jR3VJFtlesT2szQstpYLYiFucUYmarG9K4IN&refresh_token=atkn_CiEIqMaOtQYQqOCstgaiARIKEKdi5I7SXElTqbmV9esm6EISQPilCgO5_hBcCt6kb6SmpcaJ4q_xtLXdfqPW-43sQxBWjGcCqWamtMe5p5jfhlgC8_B16D65xqHjn5JKasc42AU&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3
With request headers:
 - User-Agent: Shopify CLI; v=3.64.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-07-26T13:25:07.329Z: Request to https://accounts.shopify.com/oauth/token?grant_type=refresh_token&access_token=atkn_CjQIqMaOtQYQyP6OtQZSJggBEhDS-rQLM09CZbnWPtfNVqgRGhCnYuSO0lxJU6m5lfXrJuhCEkBj89P1alUdNojliMbneDm0RrTfd4aD9SHT5tfJV6o9l5CcGlK2jR3VJFtlesT2szQstpYLYiFucUYmarG9K4IN&refresh_token=atkn_CiEIqMaOtQYQqOCstgaiARIKEKdi5I7SXElTqbmV9esm6EISQPilCgO5_hBcCt6kb6SmpcaJ4q_xtLXdfqPW-43sQxBWjGcCqWamtMe5p5jfhlgC8_B16D65xqHjn5JKasc42AU&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3 completed in 277 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"54b602158393c80565b1553ae4104519"
 - x-request-id: 0ce697f6-d6ef-4cda-bf0a-af3ae336cb30-1722000307

2024-07-26T13:25:07.331Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=271e16d403dfa18082ffb3d197bd2b5f4479c3fc32736d69296829cbb28d41a6&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=****
With request headers:
 - User-Agent: Shopify CLI; v=3.64.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-07-26T13:25:07.331Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=ee139b3d-5861-4d45-b387-1bc3ada7811c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools&subject_token=****
With request headers:
 - User-Agent: Shopify CLI; v=3.64.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-07-26T13:25:07.331Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=32ff8ee5-82b8-4d93-9f8a-c6997cefb7dc&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly&subject_token=****
With request headers:
 - User-Agent: Shopify CLI; v=3.64.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-07-26T13:25:07.331Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=7ee65a63608843c577db8b23c4d7316ea0a01bd2f7594f8a9c06ea668c1b775c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.graphql+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.themes+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly&subject_token=****&destination=https%3A%2F%2Fxxxx.myshopify.com%2Fadmin
With request headers:
 - User-Agent: Shopify CLI; v=3.64.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-07-26T13:25:07.534Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=32ff8ee5-82b8-4d93-9f8a-c6997cefb7dc&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fdestinations.readonly&subject_token=**** completed in 201 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"73e5d08fec7fe61b67bcf54ccbb360ea"
 - x-request-id: 33bff5f3-a114-4ec1-b32d-64665abdfa2e-1722000307

2024-07-26T13:25:07.537Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=271e16d403dfa18082ffb3d197bd2b5f4479c3fc32736d69296829cbb28d41a6&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=**** completed in 205 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"d4daf60264110edb0e4e8e1058962abf"
 - x-request-id: 5aad84d2-c9a4-4925-a46f-ee417b067f7a-1722000307

2024-07-26T13:25:07.544Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=7ee65a63608843c577db8b23c4d7316ea0a01bd2f7594f8a9c06ea668c1b775c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.graphql+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.admin.themes+https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.collaborator-relationships.readonly&subject_token=****&destination=https%3A%2F%2Fxxxx.myshopify.com%2Fadmin completed in 209 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"def487afb142cdf4ef7572badf4b53bf"
 - x-request-id: 4f16454c-e145-4654-9239-d5c48d162a57-1722000307

2024-07-26T13:25:07.591Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=ee139b3d-5861-4d45-b387-1bc3ada7811c&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fshop.storefront-renderer.devtools&subject_token=**** completed in 258 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"cc16fb118b48034f608f9d3ec72ddc43"
 - x-request-id: 419b7728-7473-497b-bb27-c9d4e35b049b-1722000307

2024-07-26T13:25:07.593Z: Setting session store...
2024-07-26T13:25:07.601Z: Ensuring that the user is authenticated with the Storefront API with the following scopes:
[]

2024-07-26T13:25:07.602Z: Getting session store...
2024-07-26T13:25:07.603Z: Validating existing session against the scopes:
[
  "openid",
  "https://api.shopify.com/auth/shop.admin.graphql",
  "https://api.shopify.com/auth/shop.admin.themes",
  "https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
  "https://api.shopify.com/auth/shop.storefront-renderer.devtools",
  "https://api.shopify.com/auth/partners.app.cli.access",
  "https://api.shopify.com/auth/destinations.readonly"
]
For applications:
{
  "storefrontRendererApi": {
    "scopes": []
  }
}

2024-07-26T13:25:07.603Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2024-07-26T13:25:07.603Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
 - User-Agent: Shopify CLI; v=3.64.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-07-26T13:25:07.821Z: Request to https://accounts.shopify.com/oauth/introspection completed in 217 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"ae2d5283167116218b445588f97bfea1"
 - x-request-id: 629ced98-c410-41e3-a26f-2b95dbbd02aa-1722000307

2024-07-26T13:25:07.824Z: The identity token is valid: true
2024-07-26T13:25:07.824Z:
The validation of the token for application/identity completed with the following results:
- It's expired: false
- It's invalid in identity: false

2024-07-26T13:25:07.829Z:
Running system process:
  · Command: /opt/homebrew/opt/ruby/bin/ruby -v
  · Working directory: /Users/taylorpage/Client-Work/GreeneryMarket

2024-07-26T13:25:07.837Z:
Running system process:
  · Command: /opt/homebrew/opt/ruby/bin/bundle -v
  · Working directory: /Users/taylorpage/Client-Work/GreeneryMarket

2024-07-26T13:25:07.935Z: 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-07-26T13:25:07.937Z:
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-07-26T13:25:08.100Z:
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 token --admin atkn_Cp8DCLPHjrUGENP_jrUGYpADCAESEKcZXUlfA0fqrJgPp1uVZ9MaqAFodHRwczovL2FwaS5zaG9waWZ5LmNvbS9hdXRoL3BhcnRuZXJzLmNvbGxhYm9yYXRvci1yZWxhdGlvbnNoaXBzLnJlYWRvbmx5IGh0dHBzOi8vYXBpLnNob3BpZnkuY29tL2F1dGgvc2hvcC5hZG1pbi5ncmFwaHFsIGh0dHBzOi8vYXBpLnNob3BpZnkuY29tL2F1dGgvc2hvcC5hZG1pbi50aGVtZXMgDSinUzIQNVZxmOKOTWSN0Wnsn5fK4jokOGJjZDAyYTMtNzgzZS00ZjdhLThhYTYtMmNiYjcxMGU2ZjJjQgdBY2NvdW50ShBTSd-v4GdDcqySDx8QTyi_UlN7InN1YiI6ImZiZGIyNjQ5LWUzMjctNDkwNy04ZjY3LTkwOGQyNGNmZDdlMyIsImlzcyI6Imh0dHBzOi8vYWNjb3VudHMuc2hvcGlmeS5jb20ifWIQ7w2uuzZbQM-zS4bSQO8nzWoQcXp6BoenQSiGMvGxwDjfghJAHD9sVzIiT5EfUB0kxtXfL1X9In-kSjRSJ7VD7wXGFGl21ueaYdCvGUNLdjoi6qXpex5LYUrkumXLHD24a7uUCQ --sfr atkn_CqMCCLPHjrUGENP_jrUGYpQCCAESEADZAbl7i0aaiWwDnB2ffzAaPmh0dHBzOi8vYXBpLnNob3BpZnkuY29tL2F1dGgvc2hvcC5zdG9yZWZyb250LXJlbmRlcmVyLmRldnRvb2xzINhSKKdTOiQ4YmNkMDJhMy03ODNlLTRmN2EtOGFhNi0yY2JiNzEwZTZmMmNCB0FjY291bnRKEFNJ36_gZ0NyrJIPHxBPKL9SU3sic3ViIjoiZmJkYjI2NDktZTMyNy00OTA3LThmNjctOTA4ZDI0Y2ZkN2UzIiwiaXNzIjoiaHR0cHM6Ly9hY2NvdW50cy5zaG9waWZ5LmNvbSJ9YhDvDa67NltAz7NLhtJA7yfNahBxenoGh6dBKIYy8bHAON-CEkAJgJuFcp5XrpufHQiy0-aKX8VWk2eZtyk0WeryCR9eFJa7AHQTWw9q44U2_Qef1H-Ijko_tKJj1gs00qT57U4H
  · Working directory: /Users/taylorpage/Client-Work/GreeneryMarket

2024-07-26T13:25:08.375Z: Getting development theme...
2024-07-26T13:25:08.623Z: Request to https://xxxx.myshopify.com/admin/api/unstable/themes/133654052908.json?fields=id%2Cname%2Crole%2Cprocessing completed in 246 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - x-request-id: 28514cdb-4f3d-489a-b4d2-5796a08d3447-1722000308

╭─ success ──────────────────────────────────────────────────────────────╮
│                                                                        │
│  Preview your theme                                                    │
│    • http://127.0.0.1:9292 [1]                                         │
│                                                                        │
│  Next steps                                                            │
│    • Customize your theme at the theme editor [2]                      │
│    • Share your theme preview [3] (https://xxxx.myshopi  │
│      fy.com/?preview_theme_id=133654052908)                            │
│                                                                        │
╰────────────────────────────────────────────────────────────────────────╯
[1] http://127.0.0.1:9292
[2]
https://xxxx.myshopify.com/admin/themes/133654052908/editor
[3]
https://xxxx.myshopify.com/?preview_theme_id=133654052908

2024-07-26T13:25:08.663Z:
Running system process:
  · Command: /opt/homebrew/opt/ruby/bin/ruby -v
  · Working directory: /Users/taylorpage/Client-Work/GreeneryMarket

2024-07-26T13:25:08.669Z:
Running system process:
  · Command: /opt/homebrew/opt/ruby/bin/bundle -v
  · Working directory: /Users/taylorpage/Client-Work/GreeneryMarket

2024-07-26T13:25:08.754Z: 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-07-26T13:25:08.755Z:
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-07-26T13:25:08.921Z:
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/taylorpage/Client-Work/GreeneryMarket --live-reload hot-reload --theme 133654052908 --overwrite-json undefined
  · Working directory: /Users/taylorpage/Client-Work/GreeneryMarket

/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 GET https://xxxx.myshopify.com/admin/api/unstable/themes.json with request_id: 7d6e6018-45b1-4f10-a568-f5724a0d2eda-1722000309
* Syncing theme #133654052908 on xxxx.myshopify.com
DEBUG GET https://xxxx.myshopify.com/admin/api/unstable/themes/133654052908/assets.json with request_id: 8ba37489-79e6-4f75-b78d-0870517f6457-1722000309
DEBUG [BulkJob #1960] job request: size=1, bytesize=556               100%
DEBUG PUT https://xxxx.myshopify.com/admin/api/unstable/themes/133654052908/assets/bulk.json with request_id: c675ac21-78e7-4554-89db-f86c9f9b2931-1722000309
DEBUG [BulkJob #1960] bulk rest_request time: 314.64799999999997ms
DEBUG [BulkJob #1960] job response: http_status=207
DEBUG [BulkJob #1960] bulk item success (item=snippets/package.json)
DEBUG [Bulk] shutdown, remaining_items=0                              100%
                                                                      100%
[2024-07-26 09:25:10] INFO  WEBrick 1.7.0
[2024-07-26 09:25:10] INFO  ruby 3.3.4 (2024-07-09) [arm64-darwin23]
[2024-07-26 09:25:10] INFO  WEBrick::HTTPServer#start: pid=8956 port=9292
DEBUG Refreshing preview _shopify_essential cookie
DEBUG Proxying HEAD https://xxxx.myshopify.com/?preview_theme_id=133654052908&_fd=0&pb=0
DEBUG `-> 302 request_id: 29e9dabb-b204-4dcc-ba5e-aa790873cc6f-1722000312
DEBUG Proxying GET https://xxxx.myshopify.com/?preview_theme_id=133654052908&_fd=0&pb=0
DEBUG `-> 302 request_id: 2a1a96d6-73a4-4c31-a045-1e0d9e116dcf-1722000313
DEBUG Proxying GET https://xxxx.myshopify.com/?_fd=0&pb=0&_fd=0&pb=0
DEBUG `-> 200 request_id: 25312818-2fca-4d54-8a83-c455a6b4a649-1722000313
DEBUG New _shopify_essential cookie from response
DEBUG Proxying GET https://xxxx.myshopify.com/checkouts/internal/preloads.js?locale=en-US&_fd=0&pb=0
DEBUG [HotReload] Connected to SSE stream
DEBUG Proxying GET https://xxxx.myshopify.com/cart?t=1722000313907&view=ajax&_fd=0&pb=0
DEBUG `-> 200 request_id:
DEBUG `-> 200 request_id: b74cf21b-4279-4318-965c-2ef1575ee7b2-1722000314
DEBUG Proxying GET https://xxxx.myshopify.com/.json?_fd=0&pb=0
DEBUG `-> 200 request_id: 77d94284-2db7-42f9-9bca-f77e8bf091fa-1722000314
DEBUG Proxying GET https://xxxx.myshopify.com/cart.js?_fd=0&pb=0
DEBUG `-> 200 request_id: 06c893a6-8ce2-40f0-8c8f-278ac15f424e-1722000314
DEBUG Proxying GET https://xxxx.myshopify.com/cart.js?_fd=0&pb=0
DEBUG `-> 200 request_id: 80d1fa53-b181-4638-a9ba-70beb851a2ad-1722000315
DEBUG Proxying GET https://xxxx.myshopify.com/cart.js?_fd=0&pb=0
DEBUG `-> 200 request_id: 8a66e61f-49fc-494d-8673-0694f8e427a5-1722000315
DEBUG Proxying GET https://xxxx.myshopify.com/collections/new?_fd=0&pb=0
DEBUG `-> 200 request_id: f5770dac-9e56-4580-a227-761c6cf86e4c-1722000321
DEBUG Proxying GET https://xxxx.myshopify.com/checkouts/internal/preloads.js?locale=en-US&_fd=0&pb=0
DEBUG [HotReload] Connected to SSE stream
DEBUG `-> 200 request_id:
DEBUG Proxying GET https://xxxx.myshopify.com/collections/new.json?_fd=0&pb=0
DEBUG `-> 200 request_id: f67f2762-3f4f-4f5d-8a3e-32379551f46d-1722000322
DEBUG Proxying GET https://xxxx.myshopify.com/cart.js?_fd=0&pb=0
DEBUG `-> 200 request_id: 2ab56e82-545a-4945-a997-1d3a9c036c88-1722000327
DEBUG Proxying GET https://xxxx.myshopify.com/cart.js?_fd=0&pb=0
DEBUG `-> 200 request_id: 3e8c9f07-8d6a-445b-8ce6-5cfa5953656e-1722000327

Video
https://vimeo.com/990591560/197aae9229

@davidhollenbeckx
Copy link

@lukeh-shopify the issue will kick in after making a change to the theme and refreshing. there are loads of reproductions and logs in this thread.

also worth nothing it tends to show up randomly after a dev theme has been around for a bit - like, day two of a new theme build, I'll pull up the project to start working on it and the bug will appear again. next time it happens I'll screen record

I'm curious if you & the rest of the team at Shopify are testing this from a special shopify staff account, or if you've tried to reproduce in a regular vanilla partner account. last time this bug came up Shopify staff had a really hard time reproducing it even though thousands of partners were affected.

also not that it should matter, but I'm on the most recent version of the CLI with node 20. unix terminal

@mgmanzella mgmanzella added the blocking highest severity for theme related bug label Aug 2, 2024
@karreiro
Copy link
Contributor Author

karreiro commented Aug 5, 2024

👋 Hey @tpage99, thanks a lot for sharing the video and the request IDs. We've been able to reproduce a scenario similar to the one you shared, and we've changed how shopify theme dev selects the correct theme to handle that scenario.

Could you please retry using the most recent version of Shopify CLI (3.65)? With that change, you should no longer face that issue.

I'm going to wait for your feedback before closing this one, because while I was able to reproduce a similar problem, I can't reproduce using the exact same steps since I can't use your store.

Thank you for reporting this.

@tpage99
Copy link

tpage99 commented Aug 5, 2024

Thanks @karreiro! This looks to have been resolved, or at least initially here pulling in and working on a handful of themes across different shops I'm not getting the issue.

Seems to be working as intended! Thanks so much for working on this 🙏

@karreiro karreiro self-assigned this Aug 6, 2024
@karreiro karreiro closed this as completed Aug 6, 2024
@faddies
Copy link

faddies commented Aug 23, 2024

i am facing same issue but not in local environment but on live. i have other themes in my theme library and when i preview it, it giving me live site preview.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: @shopify/theme @shopify/theme package issues blocking highest severity for theme related bug Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests