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]: Script exceeds 2048 KB limit #5460

Open
2 tasks done
keiraarts opened this issue Feb 25, 2025 · 1 comment
Open
2 tasks done

[Bug]: Script exceeds 2048 KB limit #5460

keiraarts opened this issue Feb 25, 2025 · 1 comment
Labels
Area: @shopify/app @shopify/app package issues Type: Bug Something isn't working

Comments

@keiraarts
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?

Extension

Expected behavior

From February 24th deploying a bundle of 50+ Shopify Functions scripts worked. On February 25th one small edit to localizations happened and Shopify CLI is returning the error: Script exceeds 2048 KB limit. Rolling back versions and attempting deployment also returns this error.

I would expect that either the deployment works or Shopify CLI described the problematic file.

Actual behavior

╭─ error ──────────────────────────────────────────────────────────────────────╮
│ │
│ Version couldn't be created. │
│ │
│ Script exceeds 2048 KB limit │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯

Verbose output

Verbose output
With request headers:
- User-Agent: Shopify CLI; v=3.69.4
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: darwin
- Content-Type: application/json

2025-02-25T15:16:06.998Z: Request to https://partners.shopify.com/api/cli/graphql completed in 4683 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"ec0e91c4cff263dee5b73c647e1607c5"
- server-timing: processing;dur=3681, socket_queue;dur=3.208, util;dur=0.4, cfRequestDuration;dur=4529.000044
- x-request-id: 00f1eeea-39d9-494a-9148-1f735aa1cd5d-1740496562
  

╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Version couldn't be created.                                                │
│                                                                              │
│  Script exceeds 2048 KB limit                                                │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

2025-02-25T15:16:07.008Z: 
Running system process:
· Command: npm prefix
· Working directory: /Users/****/Developer/****/apps/****

2025-02-25T15:16:07.130Z: Obtaining the dependency manager in directory ../.....
2025-02-25T15:16:07.132Z: 
Running system process:
· Command: ruby -v
· Working directory: /Users/****/Developer/****/apps/****

2025-02-25T15:16:07.347Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 176 ms
With response headers:
- x-request-id: 1a932069-b2d5-4505-a007-67ebef4d0a91
  
2025-02-25T15:16:07.347Z: Analytics event sent: {
"command": "app deploy",
"time_start": ****,
"time_end": ****,
"total_time": 50158,
"success": false,
"cli_version": "3.69.4",
"ruby_version": "2.7.5",
"node_version": "22.11.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": "****",
"env_cloud": "localhost",
"env_package_manager": "yarn",
"env_is_global": true,
"env_auth_method": "device_auth",
"cmd_app_warning_api_key_deprecation_displayed": false,
"cmd_deploy_flag_message_used": false,
"cmd_deploy_flag_version_used": false,
"cmd_deploy_flag_source_url_used": false,
"cmd_app_all_configs_any": true,
"cmd_app_all_configs_clients": "{\"shopify.app.toml\":\"****\"}",
"cmd_app_linked_config_used": true,
"cmd_app_linked_config_name": "shopify.app.toml",
"cmd_app_linked_config_git_tracked": true,
"cmd_app_linked_config_source": "cached",
"app_extensions_any": true,
"app_extensions_breakdown": "{\"flow_action\":32,\"ui_extension\":26,\"function\":3,\"editor_extension_collection\":3,\"checkout_post_purchase\":1,\"flow_trigger\":12,\"theme\":1,\"web_pixel_extension\":1}",
"app_extensions_count": 79,
"app_extensions_custom_layout": false,
"app_extensions_function_any": true,
"app_extensions_function_count": 3,
"app_extensions_theme_any": true,
"app_extensions_theme_count": 1,
"app_extensions_ui_any": true,
"app_extensions_ui_count": 28,
"app_name_hash": "ff432b467f0803c332354c8259dbf1d890ab808c",
"app_path_hash": "c3836c21ec10a9bb9f3d82359a8c24db53635aeb",
"app_scopes": "[\"customer_read_customers\",\"customer_read_markets\",\"customer_read_orders\",\"customer_write_customers\",\"read_assigned_fulfillment_orders\",\"read_checkout_branding_settings\",\"read_customer_events\",\"read_customers\",\"read_discounts\",\"read_fulfillments\",\"read_inventory\",\"read_locales\",\"read_locations\",\"read_markets\",\"read_merchant_managed_fulfillment_orders\",\"read_metaobject_definitions\",\"read_metaobjects\",\"read_order_edits\",\"read_orders\",\"read_payment_customizations\",\"read_products\",\"read_themes\",\"read_translations\",\"unauthenticated_read_checkouts\",\"unauthenticated_read_content\",\"unauthenticated_read_customer_tags\",\"unauthenticated_read_customers\",\"unauthenticated_read_metaobjects\",\"unauthenticated_read_product_inventory\",\"unauthenticated_read_product_listings\",\"unauthenticated_read_product_pickup_locations\",\"unauthenticated_read_product_tags\",\"unauthenticated_read_selling_plans\",\"unauthenticated_write_checkouts\",\"unauthenticated_write_customers\",\"write_assigned_fulfillment_orders\",\"write_cart_transforms\",\"write_checkout_branding_settings\",\"write_customers\",\"write_draft_orders\",\"write_locales\",\"write_markets\",\"write_merchant_managed_fulfillment_orders\",\"write_metaobject_definitions\",\"write_metaobjects\",\"write_online_store_navigation\",\"write_order_edits\",\"write_orders\",\"write_payment_customizations\",\"write_pixels\",\"write_products\",\"write_shipping\",\"write_third_party_fulfillment_orders\"]",
"app_web_backend_any": false,
"app_web_backend_count": 0,
"app_web_custom_layout": false,
"app_web_frontend_any": false,
"app_web_frontend_count": 0,
"env_package_manager_workspaces": true,
"partner_id": 3244444,
"api_key": "****",
"cmd_deploy_include_config_used": true,
"cmd_deploy_config_modules_breakdown": "[\"access\",\"access_scopes\",\"app_proxy\",\"application_url\",\"auth\",\"embedded\",\"handle\",\"name\",\"pos\",\"webhooks\"]",
"cmd_deploy_confirm_new_registrations": 0,
"cmd_deploy_confirm_updated_registrations": 79,
"cmd_deploy_confirm_removed_registrations": 0,
"cmd_deploy_confirm_cancelled": false,
"cmd_deploy_confirm_time_to_complete_ms": 23780,
"cmd_all_timing_network_ms": 24969,
"cmd_all_timing_prompts_ms": 23779,
"cmd_all_launcher": "yarn",
"cmd_all_topic": "app",
"cmd_all_plugin": "@shopify/app",
"cmd_all_force": false,
"cmd_all_verbose": true,
"cmd_all_path_override": true,
"cmd_all_path_override_hash": "****",
"cmd_app_reset_used": false,
"cmd_all_last_graphql_request_id": "00f1eeea-39d9-494a-9148-1f735aa1cd5d-1740496562",
"cmd_all_timing_active_ms": 1408,
"cmd_all_exit": "expected_error",
"user_id": "fb7e5803-bc3e-45e5-85f7-456327e0f43b",
"args": "--verbose",
"error_message": "Version couldn't be created.",
"app_name": "extensions",
"env_plugin_installed_all": "[\"@shopify/cli\"]",
"metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2025-02-25T15:16:07.371Z: Reporting handled error to Bugsnag: Version couldn't be created.
2025-02-25T15:16:07.477Z: 
Running system process:
· Command: npm prefix
· Working directory: /Users/****/Developer/****/apps/****

2025-02-25T15:16:07.593Z: Obtaining the dependency manager in directory ../.....
error Command failed with exit code 1.

Reproduction steps

  1. Create a large number of Shopify customer account extensions.
  2. Push to production 50+ extensions.
  3. Non-descriptive script error is returned.

Operating System

Mac OS Montery

Shopify CLI version (shopify --version)

@shopify/cli/3.69.4 darwin-arm64 node-v22.11.0

Shell

No response

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

V22

What language and version are you using in your application?

Typescript

@keiraarts keiraarts added the Type: Bug Something isn't working label Feb 25, 2025
@isaacroldan isaacroldan added the Area: @shopify/app @shopify/app package issues label Feb 26, 2025
@isaacroldan
Copy link
Contributor

Hi @keiraarts!
I've been investigating this issue, does it still happen to you? were you able to deploy or identify which specific extension was causing the issue?

The localization strings are not considered for the script size (they have their own limits), only your JS code, so that shouldn't be what triggered the error 🤔

We are working on improving that error message to provide more actionable information.

Let me know if you can provide more details!

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

No branches or pull requests

2 participants