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]: Can't pull theme anymore #4470

Closed
2 tasks done
ThomasB-Sunology opened this issue Sep 18, 2024 · 4 comments · Fixed by #4475 or #4484
Closed
2 tasks done

[Bug]: Can't pull theme anymore #4470

ThomasB-Sunology opened this issue Sep 18, 2024 · 4 comments · Fixed by #4475 or #4484
Assignees
Labels
Area: @shopify/theme @shopify/theme package issues #gsd:40767 Fortify local development experience for Liquid themes important second highest severity for theme related bug Type: Bug Something isn't working

Comments

@ThomasB-Sunology
Copy link

Please confirm that you have:

  • 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.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Theme

Expected behavior

I should pull theme from a store.

Actual behavior

It crash when I try that when I'm at around 17%.

Image

Verbose output

2024-09-18T19:48:28.760Z: Running command theme pull
2024-09-18T19:48:28.770Z: Ensuring that the user is authenticated with the Theme API with the following scopes:
[]

2024-09-18T19:48:28.770Z: Ensuring that the user is authenticated with the Admin API with the following scopes for the store shopsunology.myshopify.com:
[]

2024-09-18T19:48:28.770Z: Getting session store...
2024-09-18T19:48:28.772Z: 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": "shopsunology.myshopify.com"
}
}

2024-09-18T19:48:28.772Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2024-09-18T19:48:28.772Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:

  • User-Agent: Shopify CLI; v=3.67.0
  • Keep-Alive: timeout=30
  • Sec-CH-UA-PLATFORM: darwin
  • Content-Type: application/json

2024-09-18T19:48:29.009Z: Request to https://accounts.shopify.com/oauth/introspection completed in 237 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/"fe1e9b79ca7fba0e4d205a1ba0708b4f"
  • server-timing: processing;dur=32, socket_queue;dur=1.636, edge;dur=1.021, util;dur=0.25, cfRequestDuration;dur=151.999950
  • x-request-id: 041b7968-ba20-4206-83df-4ac75a0325b6-1726688908

2024-09-18T19:48:29.014Z: The identity token is valid: true
2024-09-18T19:48:29.014Z:
The validation of the token for application/identity completed with the following results:

  • It's expired: false
  • It's invalid in identity: false

2024-09-18T19:48:29.015Z: Getting development theme...
2024-09-18T19:48:29.177Z: Request to https://shopsunology.myshopify.com/admin/api/unstable/themes.json?fields=id%2Cname%2Crole%2Cprocessing completed in 160 ms
With response headers:

  • content-type: application/json; charset=utf-8
  • server-timing: processing;dur=52, cfRequestDuration;dur=100.000143, ipv6
  • x-request-id: 490f9926-c2ac-41dc-8a89-571ad8a09078-1726688909

2024-09-18T19:48:29.259Z: Reading the content of file at templates/customers/register.pro.liquid...
2024-09-18T19:48:29.259Z: Reading the content of file at templates/customers/register.json...
2024-09-18T19:48:29.259Z: Reading the content of file at templates/customers/reset_password.json...
2024-09-18T19:48:29.423Z: Request to https://shopsunology.myshopify.com/admin/api/unstable/themes/172708823385/assets.json?fields=key%2Cchecksum completed in 233 ms
With response headers:

  • content-type: application/json; charset=utf-8
  • server-timing: processing;dur=132, cfRequestDuration;dur=199.999809, ipv6
  • x-request-id: cc09f283-94cc-49ad-8b59-8fe13c1a2c3c-1726688909

2024-09-18T19:48:29.534Z: Ignoring theme file assets/manifest.json via .shopifyignore...
2024-09-18T19:48:29.790Z: Request to https://shopsunology.myshopify.com/admin/api/unstable/themes/172708823385/assets.json?asset%5Bkey%5D=assets%2Fjoin0us.scss completed in 144 ms
With response headers:

  • content-type: application/json; charset=utf-8
  • server-timing: processing;dur=70, cfRequestDuration;dur=118.999958, ipv6
  • x-request-id: 59db872a-9a0c-4397-b2c4-7d366ff1650b-1726688909

╭─ error ──────────────────────────────────────────────────────────────────────╮
│ │
│ Cannot read properties of undefined (reading 'length') │
│ │
│ To investigate the issue, examine this stack trace: │
│ at buildThemeAsset (Users/thomasblanchard/.nvm/versions/node/v20.17.0/li │
│ b/node_modules/@shopify/cli/dist/index.js:145173) │
│ at fetchThemeAsset (Users/thomasblanchard/.nvm/versions/node/v20.17.0/li │
│ b/node_modules/@shopify/cli/dist/index.js:145207) │
│ at processTicksAndRejections (node:internal/process/task_queues:95) │
│ at async downloadFile (Users/thomasblanchard/.nvm/versions/node/v20.17.0 │
│ /lib/node_modules/@shopify/cli/dist/index.js:149722) │
│ at async runTask2 (Users/thomasblanchard/.nvm/versions/node/v20.17.0/lib │
│ /node_modules/@shopify/cli/dist/chunk-7QTS6ZWN.js:31139) │
│ at (Users/thomasblanchard/.nvm/versions/node/v20.17.0/lib/node_modules/@ │
│ shopify/cli/dist/chunk-7QTS6ZWN.js:31153) │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯

2024-09-18T19:48:29.809Z:
Running system process:
· Command: npm prefix
· Working directory: /Users/thomasblanchard/Sites/sunology-eshop

2024-09-18T19:48:29.908Z: Obtaining the dependency manager in directory /Users/thomasblanchard/Sites/sunology-eshop...
2024-09-18T19:48:29.994Z:
Running system process:
· Command: ruby -v
· Working directory: /Users/thomasblanchard/Sites/sunology-eshop

2024-09-18T19:48:30.197Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 186 ms
With response headers:

  • x-request-id: b72199a2-7c36-4f8f-9ccc-90a27725f7d6

2024-09-18T19:48:30.197Z: Analytics event sent: {
"command": "theme pull",
"time_start": 1726688908761,
"time_end": 1726688909805,
"total_time": 1044,
"success": false,
"cli_version": "3.67.0",
"ruby_version": "2.6.10",
"node_version": "20.17.0",
"is_employee": false,
"uname": "darwin arm64",
"env_ci": false,
"env_plugin_installed_any_custom": false,
"env_plugin_installed_shopify": "["@shopify/cli"]",
"env_shell": "zsh",
"env_device_id": "f561d6a93e4f365a78d6f17582f99696b881c631",
"env_cloud": "localhost",
"env_package_manager": "yarn",
"env_is_global": true,
"cmd_app_warning_api_key_deprecation_displayed": false,
"cmd_all_timing_network_ms": 775,
"cmd_all_timing_prompts_ms": 0,
"cmd_all_launcher": "unknown",
"cmd_all_topic": "theme",
"cmd_all_plugin": "@shopify/theme",
"cmd_all_force": false,
"cmd_all_verbose": true,
"cmd_all_path_override": true,
"cmd_all_path_override_hash": "d5c865c2280a0b41050b0a6d12c7f72fc8520c5c",
"cmd_all_timing_active_ms": 268,
"cmd_all_exit": "unexpected_error",
"args": "-l --verbose",
"error_message": "Cannot read properties of undefined (reading 'length')",
"env_plugin_installed_all": "["@shopify/cli"]",
"metadata": "{"extraPublic":{},"extraSensitive":{}}"
}
2024-09-18T19:48:30.206Z: Reporting unhandled error to Bugsnag: Cannot read properties of undefined (reading 'length')
2024-09-18T19:48:30.348Z:
Running system process:
· Command: npm prefix
· Working directory: /Users/thomasblanchard/Sites/sunology-eshop

2024-09-18T19:48:30.429Z: Obtaining the dependency manager in directory /Users/thomasblanchard/Sites/sunology-eshop...

Reproduction steps

  1. Launch command shopify theme pull -l
  2. Wait until crash

Operating System

Mac OS Sonoma 14.5

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

3.67.0

Shell

zsh

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

v20.17.0

What language and version are you using in your application?

No response

@ThomasB-Sunology ThomasB-Sunology added the Type: Bug Something isn't working label Sep 18, 2024
@nardelli
Copy link

+1 Getting the same error on CLI v3.67.0 doing a theme pull.

@jamesmengo jamesmengo added Area: @shopify/theme @shopify/theme package issues #gsd:40767 Fortify local development experience for Liquid themes labels Sep 18, 2024
@jamesmengo
Copy link
Contributor

jamesmengo commented Sep 18, 2024

Thanks for reporting - will look into this!

I can't replicate this currently, so it may be related to the theme specifically.
I see that this failed on an scss file. Could you check if that file is empty @ThomasB-Sunology?

@nardelli Can you verify if you have any empty files in your theme?

In the meantime, can you try use the --legacy flag and reporting back if that works as a temporary workaround?

Side note: removing sass from your theme may make it more stable in the future. More info here

@jamesmengo jamesmengo self-assigned this Sep 18, 2024
@jamesmengo jamesmengo removed the #gsd:40767 Fortify local development experience for Liquid themes label Sep 18, 2024
@ThomasB-Sunology
Copy link
Author

@jamesmengo All good, that was 2 empty files that triggered this error, thanks for your help !

@nardelli
Copy link

@jamesmengo Thanks for the update. I can verify that the empty files were causing me issues. I've corrected the empty files, but a fix would be helpful in the event another empty file surfaces in the future.

@karreiro karreiro added important second highest severity for theme related bug #gsd:40767 Fortify local development experience for Liquid themes labels Sep 19, 2024
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 #gsd:40767 Fortify local development experience for Liquid themes important second highest severity for theme related bug Type: Bug Something isn't working
Projects
None yet
4 participants